From 92977b7b27ffe385fda85a083c619833f5cefaaf Mon Sep 17 00:00:00 2001 From: Alessandro Burato Date: Tue, 3 Jan 2017 10:56:18 +0100 Subject: [PATCH] - automargin label redraw optimization - effing copyright not changed to 2017 in ALL headers --- CHANGELOG.md | 10 +- dist/plotly-ion.js | 523 +++++++++--------- dist/plotly-ion.min.js | 12 +- lib/bar.js | 2 +- lib/box.js | 2 +- lib/candlestick.js | 2 +- lib/choropleth.js | 2 +- lib/contour.js | 2 +- lib/contourgl.js | 2 +- lib/core.js | 2 +- lib/filter.js | 2 +- lib/groupby.js | 2 +- lib/heatmap.js | 2 +- lib/heatmapgl.js | 2 +- lib/histogram.js | 2 +- lib/histogram2d.js | 2 +- lib/histogram2dcontour.js | 2 +- lib/index-basic.js | 2 +- lib/index-cartesian.js | 2 +- lib/index-finance.js | 2 +- lib/index-geo.js | 2 +- lib/index-gl2d.js | 2 +- lib/index-gl3d.js | 2 +- lib/index-ion.js | 2 +- lib/index-mapbox.js | 2 +- lib/index.js | 2 +- lib/mesh3d.js | 2 +- lib/ohlc.js | 2 +- lib/pie.js | 2 +- lib/pointcloud.js | 2 +- lib/scatter.js | 2 +- lib/scatter3d.js | 2 +- lib/scattergeo.js | 2 +- lib/scattergl.js | 2 +- lib/scattermapbox.js | 2 +- lib/scatterternary.js | 2 +- lib/surface.js | 2 +- package.json | 2 +- sample/chart_perf.js | 8 +- src/assets/geo_assets.js | 4 +- .../annotations/annotation_defaults.js | 2 +- src/components/annotations/arrow_paths.js | 2 +- src/components/annotations/attributes.js | 2 +- src/components/annotations/calc_autorange.js | 2 +- src/components/annotations/defaults.js | 2 +- src/components/annotations/draw.js | 2 +- src/components/annotations/draw_arrow_head.js | 2 +- src/components/annotations/index.js | 2 +- src/components/color/attributes.js | 2 +- src/components/color/index.js | 2 +- src/components/colorbar/attributes.js | 2 +- src/components/colorbar/defaults.js | 2 +- src/components/colorbar/draw.js | 2 +- src/components/colorbar/has_colorbar.js | 2 +- src/components/colorbar/index.js | 2 +- src/components/colorscale/attributes.js | 2 +- src/components/colorscale/calc.js | 2 +- src/components/colorscale/color_attributes.js | 2 +- src/components/colorscale/default_scale.js | 2 +- src/components/colorscale/defaults.js | 2 +- src/components/colorscale/extract_scale.js | 2 +- src/components/colorscale/flip_scale.js | 2 +- src/components/colorscale/get_scale.js | 2 +- src/components/colorscale/has_colorscale.js | 2 +- src/components/colorscale/index.js | 2 +- src/components/colorscale/is_valid_scale.js | 2 +- .../colorscale/is_valid_scale_array.js | 2 +- .../colorscale/make_color_scale_func.js | 2 +- src/components/colorscale/scales.js | 2 +- src/components/dragelement/align.js | 2 +- src/components/dragelement/cursor.js | 2 +- src/components/dragelement/index.js | 2 +- src/components/dragelement/unhover.js | 2 +- src/components/drawing/index.js | 2 +- src/components/drawing/symbol_defs.js | 2 +- src/components/errorbars/attributes.js | 2 +- src/components/errorbars/calc.js | 2 +- src/components/errorbars/compute_error.js | 2 +- src/components/errorbars/defaults.js | 2 +- src/components/errorbars/index.js | 2 +- src/components/errorbars/plot.js | 2 +- src/components/errorbars/style.js | 2 +- src/components/images/attributes.js | 2 +- src/components/images/defaults.js | 2 +- src/components/images/draw.js | 2 +- src/components/images/index.js | 2 +- src/components/legend/anchor_utils.js | 2 +- src/components/legend/attributes.js | 2 +- src/components/legend/constants.js | 2 +- src/components/legend/defaults.js | 2 +- src/components/legend/draw.js | 2 +- src/components/legend/get_legend_data.js | 2 +- src/components/legend/helpers.js | 2 +- src/components/legend/index.js | 2 +- src/components/legend/style.js | 2 +- src/components/modebar/buttons.js | 2 +- src/components/modebar/index.js | 2 +- src/components/modebar/manage.js | 2 +- src/components/modebar/modebar.js | 2 +- src/components/rangeselector/attributes.js | 2 +- .../rangeselector/button_attributes.js | 2 +- src/components/rangeselector/constants.js | 2 +- src/components/rangeselector/defaults.js | 2 +- src/components/rangeselector/draw.js | 2 +- .../rangeselector/get_update_object.js | 2 +- src/components/rangeselector/index.js | 2 +- src/components/rangeslider/attributes.js | 2 +- src/components/rangeslider/constants.js | 2 +- src/components/rangeslider/defaults.js | 2 +- src/components/rangeslider/draw.js | 2 +- src/components/rangeslider/index.js | 2 +- src/components/shapes/attributes.js | 2 +- src/components/shapes/calc_autorange.js | 2 +- src/components/shapes/constants.js | 2 +- src/components/shapes/defaults.js | 2 +- src/components/shapes/draw.js | 2 +- src/components/shapes/helpers.js | 2 +- src/components/shapes/index.js | 2 +- src/components/shapes/shape_defaults.js | 2 +- src/components/sliders/attributes.js | 2 +- src/components/sliders/constants.js | 2 +- src/components/sliders/defaults.js | 2 +- src/components/sliders/draw.js | 2 +- src/components/sliders/index.js | 2 +- src/components/titles/index.js | 2 +- src/components/updatemenus/attributes.js | 2 +- src/components/updatemenus/constants.js | 2 +- src/components/updatemenus/defaults.js | 2 +- src/components/updatemenus/draw.js | 2 +- src/components/updatemenus/index.js | 2 +- src/constants/gl2d_dashes.js | 2 +- src/constants/gl3d_dashes.js | 2 +- src/constants/gl_markers.js | 2 +- src/constants/numerical.js | 2 +- src/constants/string_mappings.js | 2 +- src/constants/xmlns_namespaces.js | 2 +- src/core.js | 4 +- src/fonts/mathjax_config.js | 2 +- src/lib/array_to_calc_item.js | 2 +- src/lib/clean_number.js | 2 +- src/lib/coerce.js | 2 +- src/lib/dates.js | 2 +- src/lib/events.js | 2 +- src/lib/extend.js | 2 +- src/lib/filter_unique.js | 2 +- src/lib/filter_visible.js | 2 +- src/lib/geo_location_utils.js | 2 +- src/lib/geojson_utils.js | 2 +- src/lib/gl_format_color.js | 2 +- src/lib/html2unicode.js | 2 +- src/lib/index.js | 2 +- src/lib/is_array.js | 2 +- src/lib/is_plain_object.js | 2 +- src/lib/loggers.js | 2 +- src/lib/matrix.js | 2 +- src/lib/nested_property.js | 2 +- src/lib/notifier.js | 2 +- src/lib/polygon.js | 2 +- src/lib/queue.js | 2 +- src/lib/search.js | 2 +- src/lib/setcursor.js | 2 +- src/lib/show_no_webgl_msg.js | 2 +- src/lib/stats.js | 2 +- src/lib/str2rgbarray.js | 2 +- src/lib/svg_text_utils.js | 2 +- src/lib/topojson_utils.js | 2 +- src/lib/typed_array_truncate.js | 2 +- src/plot_api/helpers.js | 2 +- src/plot_api/plot_api.js | 12 +- src/plot_api/plot_config.js | 2 +- src/plot_api/plot_schema.js | 2 +- src/plot_api/register.js | 2 +- src/plot_api/set_plot_config.js | 2 +- src/plot_api/subroutines.js | 2 +- src/plot_api/to_image.js | 2 +- src/plot_api/validate.js | 2 +- src/plotly.js | 2 +- src/plots/animation_attributes.js | 2 +- src/plots/array_container_defaults.js | 2 +- src/plots/attributes.js | 2 +- src/plots/cartesian/attributes.js | 2 +- src/plots/cartesian/axes.js | 7 +- src/plots/cartesian/axis_autotype.js | 2 +- src/plots/cartesian/axis_defaults.js | 2 +- src/plots/cartesian/axis_ids.js | 2 +- .../cartesian/category_order_defaults.js | 2 +- src/plots/cartesian/constants.js | 2 +- src/plots/cartesian/dragbox.js | 2 +- src/plots/cartesian/graph_interact.js | 2 +- src/plots/cartesian/index.js | 2 +- src/plots/cartesian/layout_attributes.js | 2 +- src/plots/cartesian/layout_defaults.js | 2 +- src/plots/cartesian/ordered_categories.js | 2 +- src/plots/cartesian/position_defaults.js | 2 +- src/plots/cartesian/select.js | 2 +- src/plots/cartesian/set_convert.js | 2 +- src/plots/cartesian/tick_label_defaults.js | 2 +- src/plots/cartesian/tick_mark_defaults.js | 2 +- src/plots/cartesian/tick_value_defaults.js | 2 +- src/plots/cartesian/transition_axes.js | 2 +- src/plots/command.js | 2 +- src/plots/font_attributes.js | 2 +- src/plots/frame_attributes.js | 2 +- src/plots/geo/constants.js | 2 +- src/plots/geo/geo.js | 2 +- src/plots/geo/index.js | 2 +- src/plots/geo/layout/attributes.js | 2 +- src/plots/geo/layout/axis_attributes.js | 2 +- src/plots/geo/layout/axis_defaults.js | 2 +- src/plots/geo/layout/defaults.js | 2 +- src/plots/geo/layout/layout_attributes.js | 2 +- src/plots/geo/projections.js | 2 +- src/plots/geo/set_scale.js | 2 +- src/plots/geo/zoom.js | 2 +- src/plots/geo/zoom_reset.js | 2 +- src/plots/gl2d/camera.js | 2 +- src/plots/gl2d/convert.js | 2 +- src/plots/gl2d/index.js | 2 +- src/plots/gl2d/scene2d.js | 2 +- src/plots/gl3d/camera.js | 2 +- src/plots/gl3d/index.js | 2 +- src/plots/gl3d/layout/attributes.js | 2 +- src/plots/gl3d/layout/axis_attributes.js | 2 +- src/plots/gl3d/layout/axis_defaults.js | 2 +- src/plots/gl3d/layout/convert.js | 2 +- src/plots/gl3d/layout/defaults.js | 2 +- src/plots/gl3d/layout/layout_attributes.js | 2 +- src/plots/gl3d/layout/spikes.js | 2 +- src/plots/gl3d/layout/tick_marks.js | 2 +- src/plots/gl3d/project.js | 2 +- src/plots/gl3d/scene.js | 2 +- src/plots/gl3d/set_convert.js | 2 +- src/plots/layout_attributes.js | 2 +- src/plots/mapbox/constants.js | 2 +- src/plots/mapbox/convert_text_opts.js | 2 +- src/plots/mapbox/index.js | 2 +- src/plots/mapbox/layers.js | 2 +- src/plots/mapbox/layout_attributes.js | 2 +- src/plots/mapbox/layout_defaults.js | 2 +- src/plots/mapbox/mapbox.js | 2 +- src/plots/pad_attributes.js | 2 +- src/plots/plots.js | 2 +- src/plots/polar/area_attributes.js | 2 +- src/plots/polar/axis_attributes.js | 2 +- src/plots/polar/index.js | 2 +- src/plots/polar/micropolar.js | 2 +- src/plots/polar/micropolar_manager.js | 2 +- src/plots/polar/undo_manager.js | 2 +- src/plots/subplot_defaults.js | 2 +- src/plots/ternary/index.js | 2 +- src/plots/ternary/layout/attributes.js | 2 +- src/plots/ternary/layout/axis_attributes.js | 2 +- src/plots/ternary/layout/axis_defaults.js | 2 +- src/plots/ternary/layout/defaults.js | 2 +- src/plots/ternary/layout/layout_attributes.js | 2 +- src/plots/ternary/ternary.js | 2 +- src/registry.js | 2 +- src/snapshot/cloneplot.js | 2 +- src/snapshot/download.js | 2 +- src/snapshot/filesaver.js | 2 +- src/snapshot/helpers.js | 2 +- src/snapshot/index.js | 2 +- src/snapshot/svgtoimg.js | 2 +- src/snapshot/toimage.js | 2 +- src/snapshot/tosvg.js | 2 +- src/traces/bar/arrays_to_calcdata.js | 2 +- src/traces/bar/attributes.js | 2 +- src/traces/bar/calc.js | 2 +- src/traces/bar/defaults.js | 2 +- src/traces/bar/hover.js | 2 +- src/traces/bar/index.js | 2 +- src/traces/bar/layout_attributes.js | 2 +- src/traces/bar/layout_defaults.js | 2 +- src/traces/bar/plot.js | 2 +- src/traces/bar/set_positions.js | 2 +- src/traces/bar/sieve.js | 2 +- src/traces/bar/style.js | 2 +- src/traces/bar/style_defaults.js | 2 +- src/traces/box/attributes.js | 2 +- src/traces/box/calc.js | 2 +- src/traces/box/defaults.js | 2 +- src/traces/box/hover.js | 2 +- src/traces/box/index.js | 2 +- src/traces/box/layout_attributes.js | 2 +- src/traces/box/layout_defaults.js | 2 +- src/traces/box/plot.js | 2 +- src/traces/box/set_positions.js | 2 +- src/traces/box/style.js | 2 +- src/traces/candlestick/attributes.js | 2 +- src/traces/candlestick/defaults.js | 2 +- src/traces/candlestick/index.js | 2 +- src/traces/candlestick/transform.js | 2 +- src/traces/choropleth/attributes.js | 2 +- src/traces/choropleth/calc.js | 2 +- src/traces/choropleth/defaults.js | 2 +- src/traces/choropleth/index.js | 2 +- src/traces/choropleth/plot.js | 2 +- src/traces/contour/attributes.js | 2 +- src/traces/contour/calc.js | 2 +- src/traces/contour/colorbar.js | 2 +- src/traces/contour/defaults.js | 2 +- src/traces/contour/hover.js | 2 +- src/traces/contour/index.js | 2 +- src/traces/contour/make_color_map.js | 2 +- src/traces/contour/plot.js | 2 +- src/traces/contour/style.js | 2 +- src/traces/contour/style_defaults.js | 2 +- src/traces/contourgl/convert.js | 2 +- src/traces/contourgl/index.js | 2 +- src/traces/heatmap/attributes.js | 2 +- src/traces/heatmap/calc.js | 2 +- src/traces/heatmap/colorbar.js | 2 +- src/traces/heatmap/convert_column_xyz.js | 2 +- src/traces/heatmap/defaults.js | 2 +- src/traces/heatmap/has_columns.js | 2 +- src/traces/heatmap/hover.js | 2 +- src/traces/heatmap/index.js | 2 +- src/traces/heatmap/max_row_length.js | 2 +- src/traces/heatmap/plot.js | 2 +- src/traces/heatmap/style.js | 2 +- src/traces/heatmap/xyz_defaults.js | 2 +- src/traces/heatmapgl/attributes.js | 2 +- src/traces/heatmapgl/convert.js | 2 +- src/traces/heatmapgl/index.js | 2 +- src/traces/histogram/attributes.js | 2 +- src/traces/histogram/average.js | 2 +- src/traces/histogram/bin_defaults.js | 2 +- src/traces/histogram/bin_functions.js | 2 +- src/traces/histogram/calc.js | 2 +- src/traces/histogram/clean_bins.js | 2 +- src/traces/histogram/defaults.js | 2 +- src/traces/histogram/index.js | 2 +- src/traces/histogram/norm_functions.js | 2 +- src/traces/histogram2d/attributes.js | 2 +- src/traces/histogram2d/calc.js | 2 +- src/traces/histogram2d/defaults.js | 2 +- src/traces/histogram2d/index.js | 2 +- src/traces/histogram2d/sample_defaults.js | 2 +- src/traces/histogram2dcontour/attributes.js | 2 +- src/traces/histogram2dcontour/defaults.js | 2 +- src/traces/histogram2dcontour/index.js | 2 +- src/traces/mesh3d/attributes.js | 2 +- src/traces/mesh3d/convert.js | 2 +- src/traces/mesh3d/defaults.js | 2 +- src/traces/mesh3d/index.js | 2 +- src/traces/ohlc/attributes.js | 2 +- src/traces/ohlc/defaults.js | 2 +- src/traces/ohlc/direction_defaults.js | 2 +- src/traces/ohlc/helpers.js | 2 +- src/traces/ohlc/index.js | 2 +- src/traces/ohlc/ohlc_defaults.js | 2 +- src/traces/ohlc/transform.js | 2 +- src/traces/pie/attributes.js | 2 +- src/traces/pie/base_plot.js | 2 +- src/traces/pie/calc.js | 2 +- src/traces/pie/defaults.js | 2 +- src/traces/pie/helpers.js | 2 +- src/traces/pie/index.js | 2 +- src/traces/pie/layout_attributes.js | 2 +- src/traces/pie/layout_defaults.js | 2 +- src/traces/pie/plot.js | 2 +- src/traces/pie/style.js | 2 +- src/traces/pie/style_one.js | 2 +- src/traces/pointcloud/attributes.js | 2 +- src/traces/pointcloud/convert.js | 2 +- src/traces/pointcloud/defaults.js | 2 +- src/traces/pointcloud/index.js | 2 +- src/traces/scatter/arrays_to_calcdata.js | 2 +- src/traces/scatter/attributes.js | 2 +- src/traces/scatter/calc.js | 2 +- src/traces/scatter/clean_data.js | 2 +- src/traces/scatter/colorbar.js | 2 +- src/traces/scatter/colorscale_calc.js | 2 +- src/traces/scatter/constants.js | 2 +- src/traces/scatter/defaults.js | 2 +- src/traces/scatter/fillcolor_defaults.js | 2 +- src/traces/scatter/get_trace_color.js | 2 +- src/traces/scatter/hover.js | 2 +- src/traces/scatter/index.js | 2 +- src/traces/scatter/line_defaults.js | 2 +- src/traces/scatter/line_points.js | 2 +- src/traces/scatter/line_shape_defaults.js | 2 +- src/traces/scatter/link_traces.js | 2 +- src/traces/scatter/make_bubble_size_func.js | 2 +- src/traces/scatter/marker_defaults.js | 2 +- src/traces/scatter/plot.js | 2 +- src/traces/scatter/select.js | 2 +- src/traces/scatter/style.js | 2 +- src/traces/scatter/subtypes.js | 2 +- src/traces/scatter/text_defaults.js | 2 +- src/traces/scatter/xy_defaults.js | 2 +- src/traces/scatter3d/attributes.js | 2 +- src/traces/scatter3d/calc.js | 2 +- src/traces/scatter3d/calc_errors.js | 2 +- src/traces/scatter3d/convert.js | 2 +- src/traces/scatter3d/defaults.js | 2 +- src/traces/scatter3d/index.js | 2 +- src/traces/scattergeo/attributes.js | 2 +- src/traces/scattergeo/calc.js | 2 +- src/traces/scattergeo/defaults.js | 2 +- src/traces/scattergeo/event_data.js | 2 +- src/traces/scattergeo/hover.js | 2 +- src/traces/scattergeo/index.js | 2 +- src/traces/scattergeo/plot.js | 2 +- src/traces/scattergl/attributes.js | 2 +- src/traces/scattergl/convert.js | 2 +- src/traces/scattergl/defaults.js | 2 +- src/traces/scattergl/index.js | 2 +- src/traces/scattermapbox/attributes.js | 2 +- src/traces/scattermapbox/calc.js | 2 +- src/traces/scattermapbox/convert.js | 2 +- src/traces/scattermapbox/defaults.js | 2 +- src/traces/scattermapbox/event_data.js | 2 +- src/traces/scattermapbox/hover.js | 2 +- src/traces/scattermapbox/index.js | 2 +- src/traces/scattermapbox/plot.js | 2 +- src/traces/scatterternary/attributes.js | 2 +- src/traces/scatterternary/calc.js | 2 +- src/traces/scatterternary/defaults.js | 2 +- src/traces/scatterternary/hover.js | 2 +- src/traces/scatterternary/index.js | 2 +- src/traces/scatterternary/plot.js | 2 +- src/traces/scatterternary/select.js | 2 +- src/traces/scatterternary/style.js | 2 +- src/traces/surface/attributes.js | 2 +- src/traces/surface/calc.js | 2 +- src/traces/surface/colorbar.js | 2 +- src/traces/surface/convert.js | 2 +- src/traces/surface/defaults.js | 2 +- src/traces/surface/index.js | 2 +- src/transforms/filter.js | 2 +- src/transforms/groupby.js | 2 +- 432 files changed, 726 insertions(+), 702 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7419e9824e..55841516833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,17 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.20.2-d30] -- 2017-01-03 + +### Changed + +- Tweak to avoid useless and time consuming label redraws in automargin. + This boosts the resize performance by about 2x. + + ## [1.20.2-d30] -- 2016-12-30 -### Added +### Changed - Optimizations for IE performance. diff --git a/dist/plotly-ion.js b/dist/plotly-ion.js index 96cfec1229a..929d7b1bb4e 100644 --- a/dist/plotly-ion.js +++ b/dist/plotly-ion.js @@ -1,6 +1,6 @@ /** -* plotly.js (ion) v1.20.2-d30 -* Copyright 2012-2016, Plotly, Inc. +* plotly.js (ion) v1.20.2-d31 +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ @@ -190,7 +190,7 @@ module.exports = { },{}],3:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -203,7 +203,7 @@ module.exports = require('../src/traces/bar'); },{"../src/traces/bar":208}],4:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -216,7 +216,7 @@ module.exports = require('../src/traces/choropleth'); },{"../src/traces/choropleth":219}],5:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -229,7 +229,7 @@ module.exports = require('../src/core'); },{"../src/core":110}],6:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -255,7 +255,7 @@ module.exports = Plotly; },{"./bar":3,"./choropleth":4,"./core":5,"./pie":7,"./scattergeo":8}],7:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -268,7 +268,7 @@ module.exports = require('../src/traces/pie'); },{"../src/traces/pie":227}],8:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -13560,7 +13560,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); },{}],18:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -13661,7 +13661,7 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op },{"../../lib":122,"../../plots/cartesian/axes":150,"../color":27,"./attributes":20}],19:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -13723,7 +13723,7 @@ module.exports = [ },{}],20:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -13921,7 +13921,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/cartesian/constants":155,"../../plots/font_attributes":170,"./arrow_paths":19}],21:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14008,7 +14008,7 @@ function annAutorange(gd) { },{"../../lib":122,"../../plots/cartesian/axes":150,"./draw":23}],22:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14033,7 +14033,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { },{"../../plots/array_container_defaults":147,"./annotation_defaults":18}],23:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14797,7 +14797,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { },{"../../lib":122,"../../lib/setcursor":132,"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/cartesian/axes":150,"../../plots/plots":186,"../color":27,"../dragelement":48,"../drawing":50,"./annotation_defaults":18,"./defaults":22,"./draw_arrow_head":24,"d3":10,"fast-isnumeric":13}],24:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14916,7 +14916,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag) { },{"../color":27,"../drawing":50,"./arrow_paths":19,"d3":10,"fast-isnumeric":13}],25:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14942,7 +14942,7 @@ module.exports = { },{"./attributes":20,"./calc_autorange":21,"./defaults":22,"./draw":23}],26:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -14982,7 +14982,7 @@ exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4); },{}],27:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -15148,7 +15148,7 @@ function cleanOne(val) { },{"./attributes":26,"fast-isnumeric":13,"tinycolor2":16}],28:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -15304,7 +15304,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/cartesian/layout_attributes":159,"../../plots/font_attributes":170}],29:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -15371,7 +15371,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) { },{"../../lib":122,"../../plots/cartesian/tick_label_defaults":165,"../../plots/cartesian/tick_mark_defaults":166,"../../plots/cartesian/tick_value_defaults":167,"./attributes":28}],30:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16003,7 +16003,7 @@ module.exports = function draw(gd, id) { },{"../../lib":122,"../../lib/extend":117,"../../lib/setcursor":132,"../../plotly":145,"../../plots/cartesian/axes":150,"../../plots/cartesian/axis_defaults":152,"../../plots/cartesian/layout_attributes":159,"../../plots/cartesian/position_defaults":162,"../../plots/plots":186,"../../registry":194,"../color":27,"../dragelement":48,"../drawing":50,"../titles":101,"./attributes":28,"d3":10,"tinycolor2":16}],31:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16022,7 +16022,7 @@ module.exports = function hasColorbar(container) { },{"../../lib":122}],32:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16077,7 +16077,7 @@ module.exports = { },{}],33:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16143,7 +16143,7 @@ module.exports = function calc(trace, vals, containerStr, cLetter) { },{"../../lib":122,"./flip_scale":38,"./scales":45}],34:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16187,7 +16187,7 @@ module.exports = function makeColorScaleAttributes(context) { },{"../../lib/extend":117,"./attributes":32,"./scales.js":45}],35:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16203,7 +16203,7 @@ module.exports = scales.RdBu; },{"./scales":45}],36:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16267,7 +16267,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, },{"../../lib":122,"../colorbar/defaults":29,"../colorbar/has_colorbar":31,"./flip_scale":38,"./is_valid_scale":42,"fast-isnumeric":13}],37:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16304,7 +16304,7 @@ module.exports = function extractScale(scl, cmin, cmax) { },{}],38:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16329,7 +16329,7 @@ module.exports = function flipScale(scl) { },{}],39:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16369,7 +16369,7 @@ module.exports = function getScale(scl, dflt) { },{"./default_scale":35,"./is_valid_scale_array":43,"./scales":45}],40:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16415,7 +16415,7 @@ module.exports = function hasColorscale(trace, containerStr) { },{"../../lib":122,"./is_valid_scale":42,"fast-isnumeric":13}],41:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16449,7 +16449,7 @@ exports.makeColorScaleFunc = require('./make_color_scale_func'); },{"./attributes":32,"./calc":33,"./default_scale":35,"./defaults":36,"./extract_scale":37,"./flip_scale":38,"./get_scale":39,"./has_colorscale":40,"./is_valid_scale":42,"./make_color_scale_func":44,"./scales":45}],42:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16470,7 +16470,7 @@ module.exports = function isValidScale(scl) { },{"./is_valid_scale_array":43,"./scales":45}],43:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16507,7 +16507,7 @@ module.exports = function isValidScaleArray(scl) { },{"tinycolor2":16}],44:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16603,7 +16603,7 @@ function colorArray2rbga(colorArray) { },{"../color":27,"d3":10,"fast-isnumeric":13,"tinycolor2":16}],45:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16734,7 +16734,7 @@ module.exports = { },{}],46:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16767,7 +16767,7 @@ module.exports = function align(v, dv, v0, v1, anchor) { },{}],47:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16805,7 +16805,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) { },{"../../lib":122}],48:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -16992,7 +16992,7 @@ function finishDrag(gd) { },{"../../lib":122,"../../plotly":145,"../../plots/cartesian/constants":155,"./align":46,"./cursor":47,"./unhover":49}],49:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -17043,7 +17043,7 @@ unhover.raw = function unhoverRaw(gd, evt) { },{"../../lib/events":116}],50:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -17618,7 +17618,7 @@ drawing.setClipUrl = function(s, localId) { },{"../../constants/xmlns_namespaces":109,"../../lib":122,"../../lib/svg_text_utils":134,"../../registry":194,"../../traces/scatter/make_bubble_size_func":249,"../../traces/scatter/subtypes":254,"../color":27,"../colorscale":41,"./symbol_defs":51,"d3":10,"fast-isnumeric":13}],51:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18094,7 +18094,7 @@ module.exports = { },{"d3":10}],52:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18193,7 +18193,7 @@ module.exports = { },{}],53:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18256,7 +18256,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { },{"../../plots/cartesian/axes":150,"../../registry":194,"./compute_error":54,"fast-isnumeric":13}],54:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18352,7 +18352,7 @@ function makeComputeErrorValue(type, value) { },{}],55:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18429,7 +18429,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { },{"../../lib":122,"../../registry":194,"./attributes":52,"fast-isnumeric":13}],56:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18488,7 +18488,7 @@ errorBars.hoverInfo = function(calcPoint, trace, hoverPoint) { },{"./attributes":52,"./calc":53,"./defaults":55,"./plot":57,"./style":58}],57:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18652,7 +18652,7 @@ function errorCoords(d, xa, ya) { },{"../../traces/scatter/subtypes":254,"d3":10,"fast-isnumeric":13}],58:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18689,7 +18689,7 @@ module.exports = function style(traces) { },{"../color":27,"d3":10}],59:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18811,7 +18811,7 @@ module.exports = { },{"../../plots/cartesian/constants":155}],60:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -18871,7 +18871,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) { },{"../../lib":122,"../../plots/array_container_defaults":147,"../../plots/cartesian/axes":150,"./attributes":59}],61:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19051,7 +19051,7 @@ module.exports = function draw(gd) { },{"../../constants/xmlns_namespaces":109,"../../plots/cartesian/axes":150,"../drawing":50,"d3":10}],62:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19072,7 +19072,7 @@ module.exports = { },{"./attributes":59,"./defaults":60,"./draw":61}],63:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19121,7 +19121,7 @@ exports.isMiddleAnchor = function isMiddleAnchor(opts) { },{}],64:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19212,7 +19212,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/font_attributes":170,"../color/attributes":26}],65:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19230,7 +19230,7 @@ module.exports = { },{}],66:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -19323,7 +19323,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { },{"../../lib":122,"../../plots/layout_attributes":184,"../../registry":194,"./attributes":64,"./helpers":69}],67:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20042,7 +20042,7 @@ function expandHorizontalMargin(gd) { },{"../../lib":122,"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/plots":186,"../../registry":194,"../color":27,"../dragelement":48,"../drawing":50,"./anchor_utils":63,"./constants":65,"./get_legend_data":68,"./helpers":69,"./style":71,"d3":10}],68:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20147,7 +20147,7 @@ module.exports = function getLegendData(calcdata, opts) { },{"../../registry":194,"./helpers":69}],69:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20178,7 +20178,7 @@ exports.isReversed = function isReversed(legendLayout) { },{"../../registry":194}],70:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20202,7 +20202,7 @@ module.exports = { },{"./attributes":64,"./defaults":66,"./draw":67,"./style":71}],71:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20424,7 +20424,7 @@ function stylePies(d) { },{"../../lib":122,"../../registry":194,"../../traces/pie/style_one":232,"../../traces/scatter/subtypes":254,"../color":27,"../drawing":50,"d3":10}],72:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20943,7 +20943,7 @@ modeBarButtons.resetViews = { },{"../../../build/ploticon":2,"../../lib":122,"../../plotly":145,"../../plots/cartesian/axes":150,"../../plots/plots":186,"../../snapshot/download":196}],73:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -20957,7 +20957,7 @@ exports.manage = require('./manage'); },{"./manage":74}],74:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21185,7 +21185,7 @@ function fillCustomButton(customButtons) { },{"../../plots/cartesian/axes":150,"../../traces/scatter/subtypes":254,"./buttons":72,"./modebar":75}],75:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21475,7 +21475,7 @@ module.exports = createModeBar; },{"../../../build/ploticon":2,"../../lib":122,"d3":10}],76:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21565,7 +21565,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/font_attributes":170,"../color/attributes":26,"./button_attributes":77}],77:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21606,7 +21606,7 @@ module.exports = { },{}],78:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21635,7 +21635,7 @@ module.exports = { },{}],79:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -21728,7 +21728,7 @@ function getPosDflt(containerOut, layout, counterAxes) { },{"../../lib":122,"../color":27,"./attributes":76,"./button_attributes":77,"./constants":78}],80:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22003,7 +22003,7 @@ function reposition(gd, buttons, opts, axName) { },{"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/cartesian/axis_ids":153,"../../plots/plots":186,"../color":27,"../drawing":50,"../legend/anchor_utils":63,"./constants":78,"./get_update_object":81,"d3":10}],81:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22063,7 +22063,7 @@ function getXRange(axisLayout, buttonLayout) { },{"../../lib":122,"d3":10}],82:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22085,7 +22085,7 @@ module.exports = { },{"./attributes":76,"./defaults":79,"./draw":80}],83:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22143,7 +22143,7 @@ module.exports = { },{"../color/attributes":26}],84:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22196,7 +22196,7 @@ module.exports = { },{}],85:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22259,7 +22259,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName, counterAxe },{"../../lib":122,"./attributes":83}],86:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22784,7 +22784,7 @@ function clearPushMargins(gd) { },{"../../lib":122,"../../lib/setcursor":132,"../../plotly":145,"../../plots/cartesian":158,"../../plots/cartesian/axes":150,"../../plots/plots":186,"../color":27,"../dragelement":48,"../drawing":50,"./constants":84,"d3":10}],87:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22806,7 +22806,7 @@ module.exports = { },{"./attributes":83,"./defaults":85,"./draw":86}],88:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22904,7 +22904,7 @@ module.exports = { },{"../../lib/extend":117,"../../traces/scatter/attributes":234,"../annotations/attributes":20}],89:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -22981,7 +22981,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) { },{"../../lib":122,"../../plots/cartesian/axes":150,"./constants":90,"./helpers":93}],90:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23045,7 +23045,7 @@ module.exports = { },{}],91:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23070,7 +23070,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { },{"../../plots/array_container_defaults":147,"./shape_defaults":95}],92:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23641,7 +23641,7 @@ function movePath(pathIn, moveX, moveY) { },{"../../lib":122,"../../lib/setcursor":132,"../../plotly":145,"../../plots/cartesian/axes":150,"../color":27,"../dragelement":48,"../drawing":50,"./constants":90,"./defaults":91,"./helpers":93,"./shape_defaults":95,"fast-isnumeric":13}],93:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23722,7 +23722,7 @@ exports.getPixelToData = function(gd, axis, isVertical) { },{}],94:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23748,7 +23748,7 @@ module.exports = { },{"./attributes":88,"./calc_autorange":89,"./defaults":91,"./draw":92}],95:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -23851,7 +23851,7 @@ module.exports = function handleShapeDefaults(shapeIn, shapeOut, fullLayout, opt },{"../../lib":122,"../../plots/cartesian/axes":150,"./attributes":88,"./helpers":93}],96:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -24085,7 +24085,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/animation_attributes":146,"../../plots/font_attributes":170,"../../plots/pad_attributes":185,"./constants":97}],97:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -24182,7 +24182,7 @@ module.exports = { },{}],98:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -24295,7 +24295,7 @@ function stepsDefaults(sliderIn, sliderOut) { },{"../../lib":122,"../../plots/array_container_defaults":147,"./attributes":96,"./constants":97}],99:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -24869,7 +24869,7 @@ function clearPushMargins(gd) { },{"../../lib":122,"../../lib/svg_text_utils":134,"../../plots/plots":186,"../color":27,"../drawing":50,"../legend/anchor_utils":63,"./constants":97,"d3":10}],100:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -24892,7 +24892,7 @@ module.exports = { },{"./attributes":96,"./constants":97,"./defaults":98,"./draw":99}],101:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -25143,7 +25143,7 @@ Titles.draw = function(gd, titleClass, options) { },{"../../lib":122,"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/plots":186,"../color":27,"../drawing":50,"d3":10,"fast-isnumeric":13}],102:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -25289,7 +25289,7 @@ module.exports = { },{"../../lib/extend":117,"../../plots/font_attributes":170,"../../plots/pad_attributes":185,"../color/attributes":26}],103:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -25365,7 +25365,7 @@ module.exports = { },{}],104:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -25459,7 +25459,7 @@ function buttonsDefaults(menuIn, menuOut) { },{"../../lib":122,"../../plots/array_container_defaults":147,"./attributes":102,"./constants":103}],105:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26044,7 +26044,7 @@ function clearPushMargins(gd) { arguments[4][100][0].apply(exports,arguments) },{"./attributes":102,"./constants":103,"./defaults":104,"./draw":105,"dup":100}],107:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26086,7 +26086,7 @@ module.exports = { },{}],108:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26124,7 +26124,7 @@ module.exports = { },{}],109:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26148,7 +26148,7 @@ exports.svgAttrs = { },{}],110:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26164,7 +26164,7 @@ exports.svgAttrs = { var Plotly = require('./plotly'); // package version injected by `npm run preprocess` -exports.version = '1.20.2-d30'; +exports.version = '1.20.2-d31'; // inject promise polyfill require('es6-promise').polyfill(); @@ -26232,7 +26232,7 @@ exports.d3 = require('d3'); },{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":25,"./components/color":27,"./components/images":62,"./components/legend":70,"./components/rangeselector":82,"./components/rangeslider":87,"./components/shapes":94,"./components/sliders":100,"./components/updatemenus":106,"./fonts/mathjax_config":111,"./lib/queue":130,"./plot_api/plot_schema":139,"./plot_api/register":140,"./plot_api/set_plot_config":141,"./plot_api/to_image":143,"./plot_api/validate":144,"./plotly":145,"./snapshot":199,"./snapshot/download":196,"./traces/scatter":244,"d3":10,"es6-promise":11}],111:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26265,7 +26265,7 @@ if(typeof MathJax !== 'undefined') { },{}],112:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26282,7 +26282,7 @@ module.exports = function arrayToCalcItem(traceAttr, calcItem, calcAttr, i) { },{}],113:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26316,7 +26316,7 @@ module.exports = function cleanNumber(v) { },{"../constants/numerical":107,"fast-isnumeric":13}],114:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26626,7 +26626,7 @@ exports.validate = function(value, opts) { },{"../components/colorscale/get_scale":39,"../components/colorscale/scales":45,"./nested_property":127,"fast-isnumeric":13,"tinycolor2":16}],115:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -26866,7 +26866,7 @@ exports.cleanDate = function(v, dflt) { },{"../constants/numerical":107,"./loggers":125,"d3":10,"fast-isnumeric":13}],116:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27032,7 +27032,7 @@ module.exports = Events; },{"events":12}],117:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27146,7 +27146,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) { },{"./is_plain_object.js":124}],118:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27197,7 +27197,7 @@ module.exports = function filterUnique(array) { },{}],119:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27228,7 +27228,7 @@ module.exports = function filterVisible(container) { },{}],120:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27291,7 +27291,7 @@ function countryNameToISO3(countryName) { },{"../lib":122,"country-regex":9}],121:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -27423,7 +27423,7 @@ exports.makeBlank = function() { },{}],122:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28151,7 +28151,7 @@ lib.numSeparate = function(value, separators, separatethousands) { },{"./clean_number":113,"./coerce":114,"./dates":115,"./extend":117,"./filter_unique":118,"./filter_visible":119,"./is_array":123,"./is_plain_object":124,"./loggers":125,"./matrix":126,"./nested_property":127,"./notifier":128,"./search":131,"./stats":133,"d3":10}],123:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28169,7 +28169,7 @@ module.exports = function isArray(a) { },{}],124:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28198,7 +28198,7 @@ module.exports = function isPlainObject(obj) { },{}],125:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28265,7 +28265,7 @@ loggers.error = function() { },{"../plot_api/plot_config":138}],126:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28375,7 +28375,7 @@ exports.apply2DTransform2 = function(transform) { },{}],127:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28632,7 +28632,7 @@ function badContainer(container, propStr, propParts) { },{"./is_array":123,"fast-isnumeric":13}],128:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28709,7 +28709,7 @@ module.exports = function(text, displayLength) { },{"d3":10,"fast-isnumeric":13}],129:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -28949,7 +28949,7 @@ polygon.filter = function filter(pts, tolerance) { },{"./matrix":126}],130:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29160,7 +29160,7 @@ module.exports = queue; },{"../lib":122,"../plot_api/plot_config":138}],131:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29271,7 +29271,7 @@ exports.roundUp = function(val, arrayIn, reverse) { },{"./loggers":125,"fast-isnumeric":13}],132:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29294,7 +29294,7 @@ module.exports = function setCursor(el3, csr) { },{}],133:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29390,7 +29390,7 @@ exports.interp = function(arr, n) { },{"fast-isnumeric":13}],134:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29917,7 +29917,7 @@ exports.makeEditable = function(context, _delegate, options) { },{"../constants/string_mappings":108,"../constants/xmlns_namespaces":109,"../lib":122,"d3":10}],135:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -29953,7 +29953,7 @@ topojsonUtils.getTopojsonFeatures = function(trace, topojson) { },{"../plots/geo/constants":172,"topojson-client":17}],136:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -30434,7 +30434,7 @@ exports.manageArrayContainers = function(np, newVal, undoit) { },{"../components/color":27,"../lib":122,"../plots/cartesian/axes":150,"../plots/plots":186,"../registry":194,"fast-isnumeric":13,"gl-mat4/fromQuat":14}],137:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -30564,15 +30564,17 @@ Plotly.plot = function(gd, data, layout, config) { gd._replotPending = false; } + // ABURATO: moved this one up to optimize redraw code. + + // so we don't try to re-call Plotly.plot from inside + // legend and colorbar, if margins changed + gd._replotting = true; + Plots.supplyDefaults(gd); // Polar plots if(data && data[0] && data[0].r) return plotPolar(gd, data, layout); - // so we don't try to re-call Plotly.plot from inside - // legend and colorbar, if margins changed - gd._replotting = true; - // make or remake the framework if we need to if(graphWasEmpty) makePlotFramework(gd); @@ -33219,7 +33221,7 @@ function makePlotFramework(gd) { },{"../components/drawing":50,"../components/errorbars":56,"../constants/xmlns_namespaces":109,"../lib":122,"../lib/events":116,"../lib/queue":130,"../lib/svg_text_utils":134,"../plotly":145,"../plots/cartesian/graph_interact":157,"../plots/plots":186,"../plots/polar":189,"../registry":194,"./helpers":136,"./subroutines":142,"d3":10,"fast-isnumeric":13}],138:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -33354,7 +33356,7 @@ function defaultSetBackground(gd, bgColor) { },{}],139:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -33726,7 +33728,7 @@ function handleRegisteredComponent(layoutAttributes, _module, astr) { },{"../lib":122,"../plots/animation_attributes":146,"../plots/attributes":148,"../plots/frame_attributes":171,"../plots/layout_attributes":184,"../plots/polar/area_attributes":187,"../plots/polar/axis_attributes":188,"../registry":194}],140:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -33825,7 +33827,7 @@ function registerComponentModule(newModule) { },{"../lib":122,"../registry":194}],141:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -33851,7 +33853,7 @@ module.exports = function setPlotConfig(configObj) { },{"../lib":122,"../plotly":145}],142:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34198,7 +34200,7 @@ exports.doModeBar = function(gd) { },{"../components/color":27,"../components/drawing":50,"../components/modebar":73,"../components/titles":101,"../lib":122,"../plotly":145,"../plots/plots":186,"../registry":194}],143:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34308,7 +34310,7 @@ module.exports = toImage; },{"../lib":122,"../plotly":145,"../snapshot/cloneplot":195,"../snapshot/helpers":198,"../snapshot/svgtoimg":200,"../snapshot/tosvg":202,"fast-isnumeric":13}],144:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34678,7 +34680,7 @@ function convertPathToAttributeString(path) { },{"../lib":122,"../plots/plots":186,"./plot_schema":139}],145:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34711,7 +34713,7 @@ require('./plot_api/plot_api'); },{"./components/modebar":73,"./plot_api/plot_api":137,"./plot_api/plot_config":138,"./plots/cartesian/axes":150,"./plots/cartesian/graph_interact":157,"./plots/plots":186}],146:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34813,7 +34815,7 @@ module.exports = { },{}],147:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34882,7 +34884,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut },{"../lib":122}],148:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34965,7 +34967,7 @@ module.exports = { },{}],149:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -34992,7 +34994,7 @@ module.exports = { },{}],150:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -36822,7 +36824,10 @@ axes.doTicks = function(gd, axid, skipTitle) { ax._lastangle = autoangle; } - performLabelEllipsis(); + if (ax._lastangle) { + // last angle set to 0 means labels do not collide, so no need for ellipsis. + performLabelEllipsis(); + } // update the axis title // (so it can move out of the way if needed) @@ -37264,7 +37269,7 @@ function mod(v, d) { return ((v % d) + d) % d; } },{"../../components/color":27,"../../components/drawing":50,"../../components/titles":101,"../../constants/numerical":107,"../../lib":122,"../../lib/svg_text_utils":134,"../../plots/plots":186,"../../registry":194,"./axis_ids":153,"./layout_attributes":159,"./layout_defaults":160,"./set_convert":164,"d3":10,"fast-isnumeric":13}],151:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -37339,7 +37344,7 @@ function category(a) { },{"../../constants/numerical":107,"../../lib":122,"fast-isnumeric":13}],152:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -37562,7 +37567,7 @@ function getFirstNonEmptyTrace(data, id, axLetter) { },{"../../components/color/attributes":26,"../../lib":122,"../../registry":194,"./axis_autotype":151,"./axis_ids":153,"./category_order_defaults":154,"./layout_attributes":159,"./ordered_categories":161,"./set_convert":164,"./tick_label_defaults":165,"./tick_mark_defaults":166,"./tick_value_defaults":167,"fast-isnumeric":13,"tinycolor2":16}],153:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -37684,7 +37689,7 @@ exports.getFromTrace = function(gd, fullTrace, type) { },{"../../lib":122,"../../registry":194,"../plots":186,"./constants":155}],154:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -37718,7 +37723,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut, },{}],155:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -37793,7 +37798,7 @@ module.exports = { },{}],156:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -38599,7 +38604,7 @@ function isSelectOrLasso(dragmode) { },{"../../components/color":27,"../../components/dragelement":48,"../../components/drawing":50,"../../lib":122,"../../lib/setcursor":132,"../../lib/svg_text_utils":134,"../../plotly":145,"../../registry":194,"./axes":150,"./constants":155,"./select":163,"d3":10,"tinycolor2":16}],157:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -39951,7 +39956,7 @@ fx.inbox = function(v0, v1) { },{"../../components/color":27,"../../components/dragelement":48,"../../components/drawing":50,"../../lib":122,"../../lib/events":116,"../../lib/svg_text_utils":134,"../layout_attributes":184,"./axes":150,"./constants":155,"./dragbox":156,"d3":10,"fast-isnumeric":13,"tinycolor2":16}],158:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -40325,7 +40330,7 @@ function joinLayer(parent, nodeType, className) { },{"../../lib":122,"../plots":186,"./attributes":149,"./axes":150,"./constants":155,"./layout_attributes":159,"./transition_axes":168,"d3":10}],159:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -40668,7 +40673,7 @@ module.exports = { },{"../../components/color/attributes":26,"../../lib/extend":117,"../font_attributes":170,"./constants":155}],160:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -40842,7 +40847,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { },{"../../components/color":27,"../../lib":122,"../../registry":194,"../layout_attributes":184,"./axis_defaults":152,"./axis_ids":153,"./constants":155,"./layout_attributes":159,"./position_defaults":162}],161:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -40921,7 +40926,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya },{"d3":10}],162:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -40986,7 +40991,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer },{"../../lib":122,"fast-isnumeric":13}],163:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -41186,7 +41191,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) { },{"../../components/color":27,"../../lib/polygon":129,"./axes":150,"./constants":155}],164:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -41553,7 +41558,7 @@ module.exports = function setConvert(ax) { },{"../../constants/numerical":107,"../../lib":122,"./axis_ids":153,"./constants":155,"d3":10,"fast-isnumeric":13}],165:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -41637,7 +41642,7 @@ function getShowAttrDflt(containerIn) { },{"../../lib":122}],166:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -41670,7 +41675,7 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce, },{"../../lib":122,"./layout_attributes":159}],167:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -41754,7 +41759,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe },{"../../constants/numerical":107,"../../lib":122,"fast-isnumeric":13}],168:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -42066,7 +42071,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo },{"../../lib":122,"../../plotly":145,"../../registry":194,"./axes":150,"d3":10}],169:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -42478,7 +42483,7 @@ function crawl(attrs, callback, path, depth) { },{"../lib":122,"../plotly":145}],170:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -42509,7 +42514,7 @@ module.exports = { },{}],171:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -42550,7 +42555,7 @@ module.exports = { },{}],172:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -42708,7 +42713,7 @@ params.baseLayersOverChoropleth = ['rivers', 'lakes']; },{}],173:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43270,7 +43275,7 @@ function createMockAxis(fullLayout) { },{"../../components/color":27,"../../components/drawing":50,"../../constants/xmlns_namespaces":109,"../../lib/topojson_utils":135,"../../plots/cartesian/axes":150,"../../plots/cartesian/graph_interact":157,"./constants":172,"./projections":180,"./set_scale":181,"./zoom":182,"./zoom_reset":183,"d3":10,"topojson-client":17}],174:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43389,7 +43394,7 @@ function getSubplotCalcData(calcData, id) { },{"../../plots/plots":186,"./geo":173,"./layout/attributes":175,"./layout/defaults":178,"./layout/layout_attributes":179}],175:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43410,7 +43415,7 @@ module.exports = { },{}],176:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43465,7 +43470,7 @@ module.exports = { },{"../../../components/color/attributes":26}],177:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43539,7 +43544,7 @@ module.exports = function supplyGeoAxisLayoutDefaults(geoLayoutIn, geoLayoutOut) },{"../../../lib":122,"../constants":172,"./axis_attributes":176}],178:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43658,7 +43663,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) { },{"../../subplot_defaults":193,"../constants":172,"./axis_defaults":177,"./layout_attributes":179}],179:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -43891,7 +43896,7 @@ module.exports = { },{"../../../components/color/attributes":26,"../constants":172,"./axis_attributes":176}],180:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -44337,7 +44342,7 @@ module.exports = addProjectionsToD3; },{}],181:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -44488,7 +44493,7 @@ function getBounds(projection, rangeBox) { },{"./constants":172,"d3":10}],182:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -44923,7 +44928,7 @@ function d3_eventDispatch(target) { },{"d3":10}],183:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -44958,7 +44963,7 @@ module.exports = createGeoZoomReset; },{"../cartesian/graph_interact":157}],184:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -45115,7 +45120,7 @@ module.exports = { },{"../components/color/attributes":26,"../lib":122,"./font_attributes":170}],185:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -45153,7 +45158,7 @@ module.exports = { },{}],186:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -47139,7 +47144,7 @@ plots.doCalcdata = function(gd, traces) { },{"../components/color":27,"../components/errorbars":56,"../lib":122,"../plotly":145,"../registry":194,"./animation_attributes":146,"./attributes":148,"./command":169,"./font_attributes":170,"./frame_attributes":171,"./layout_attributes":184,"d3":10,"fast-isnumeric":13}],187:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -47164,7 +47169,7 @@ module.exports = { },{"../../traces/scatter/attributes":234}],188:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -47279,7 +47284,7 @@ module.exports = { },{"../../lib/extend":117,"../cartesian/layout_attributes":159}],189:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -47294,7 +47299,7 @@ Polar.manager = require('./micropolar_manager'); },{"./micropolar":190,"./micropolar_manager":191}],190:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -48713,7 +48718,7 @@ var µ = module.exports = { version: '0.2.2' }; },{"../../lib":122,"d3":10}],191:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -48799,7 +48804,7 @@ manager.fillLayout = function(_gd) { },{"../../components/color":27,"../../lib":122,"./micropolar":190,"./undo_manager":192,"d3":10}],192:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -48865,7 +48870,7 @@ module.exports = function UndoManager() { },{}],193:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -48940,7 +48945,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o },{"../lib":122,"./plots":186}],194:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49108,7 +49113,7 @@ function getTraceType(traceType) { },{"./lib":122,"./plots/attributes":148}],195:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49266,7 +49271,7 @@ module.exports = function clonePlot(graphObj, options) { },{"../lib":122,"../plots/plots":186}],196:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49332,7 +49337,7 @@ module.exports = downloadImage; },{"../lib":122,"../plot_api/to_image":143,"./filesaver":197}],197:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49400,7 +49405,7 @@ module.exports = fileSaver; },{}],198:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49433,7 +49438,7 @@ exports.getRedrawFunc = function(gd) { },{}],199:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49459,7 +49464,7 @@ module.exports = Snapshot; },{"./cloneplot":195,"./download":196,"./helpers":198,"./svgtoimg":200,"./toimage":201,"./tosvg":202}],200:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49590,7 +49595,7 @@ module.exports = svgToImg; },{"../lib":122,"events":12}],201:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49670,7 +49675,7 @@ module.exports = toImage; },{"../lib":122,"../plotly":145,"./cloneplot":195,"./helpers":198,"./svgtoimg":200,"./tosvg":202,"events":12}],202:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49789,7 +49794,7 @@ module.exports = function toSVG(gd, format) { },{"../components/color":27,"../components/drawing":50,"../constants/xmlns_namespaces":109,"../lib/svg_text_utils":134,"d3":10}],203:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49821,7 +49826,7 @@ module.exports = function arraysToCalcdata(cd) { },{"../../lib":122}],204:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -49916,7 +49921,7 @@ module.exports = { },{"../../components/colorbar/attributes":28,"../../components/colorscale/color_attributes":34,"../../components/errorbars/attributes":52,"../../lib/extend":117,"../scatter/attributes":234}],205:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50012,7 +50017,7 @@ module.exports = function calc(gd, trace) { },{"../../components/colorscale/calc":33,"../../components/colorscale/has_colorscale":40,"../../plots/cartesian/axes":150,"fast-isnumeric":13}],206:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50057,7 +50062,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout },{"../../components/color":27,"../../components/errorbars/defaults":55,"../../lib":122,"../bar/style_defaults":215,"../scatter/xy_defaults":256,"./attributes":204}],207:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50150,7 +50155,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { },{"../../components/color":27,"../../components/errorbars":56,"../../plots/cartesian/graph_interact":157}],208:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50186,7 +50191,7 @@ module.exports = Bar; },{"../../plots/cartesian":158,"../scatter/colorbar":237,"./arrays_to_calcdata":203,"./attributes":204,"./calc":205,"./defaults":206,"./hover":207,"./layout_attributes":209,"./layout_defaults":210,"./plot":211,"./set_positions":212,"./style":214}],209:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50230,7 +50235,7 @@ module.exports = { },{}],210:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50288,7 +50293,7 @@ module.exports = function(layoutIn, layoutOut, fullData) { },{"../../lib":122,"../../plots/cartesian/axes":150,"../../registry":194,"./layout_attributes":209}],211:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -50409,7 +50414,7 @@ module.exports = function plot(gd, plotinfo, cdbar) { },{"../../components/color":27,"../../components/errorbars":56,"../../lib":122,"./arrays_to_calcdata":203,"d3":10,"fast-isnumeric":13}],212:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51005,7 +51010,7 @@ function getAxisLetter(ax) { },{"../../plots/cartesian/axes":150,"../../registry":194,"./sieve.js":213,"fast-isnumeric":13}],213:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51106,7 +51111,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) { },{"../../lib":122}],214:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51184,7 +51189,7 @@ module.exports = function style(gd) { },{"../../components/color":27,"../../components/drawing":50,"../../components/errorbars":56,"d3":10}],215:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51221,7 +51226,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default },{"../../components/color":27,"../../components/colorscale/defaults":36,"../../components/colorscale/has_colorscale":40}],216:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51269,7 +51274,7 @@ module.exports = extendFlat({}, { },{"../../components/colorbar/attributes":28,"../../components/colorscale/attributes":32,"../../lib/extend":117,"../../plots/attributes":148,"../scattergeo/attributes":257}],217:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51288,7 +51293,7 @@ module.exports = function calc(gd, trace) { },{"../../components/colorscale/calc":33}],218:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51343,7 +51348,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout },{"../../components/colorscale/defaults":36,"../../lib":122,"./attributes":216}],219:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51376,7 +51381,7 @@ module.exports = Choropleth; },{"../../plots/geo":174,"../heatmap/colorbar":221,"./attributes":216,"./calc":217,"./defaults":218,"./plot":220}],220:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51605,7 +51610,7 @@ function makeEventDataFunc(trace) { },{"../../components/color":27,"../../components/colorscale":41,"../../components/drawing":50,"../../lib/array_to_calc_item":112,"../../lib/geo_location_utils":120,"../../lib/topojson_utils":135,"../../plots/cartesian/axes":150,"../../plots/cartesian/graph_interact":157,"../../plots/geo/constants":172,"./attributes":216,"d3":10}],221:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51656,7 +51661,7 @@ module.exports = function colorbar(gd, cd) { },{"../../components/colorbar/draw":30,"../../components/colorscale":41,"../../lib":122,"../../plots/plots":186,"fast-isnumeric":13}],222:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51842,7 +51847,7 @@ module.exports = { },{"../../components/color/attributes":26,"../../lib/extend":117,"../../plots/attributes":148,"../../plots/font_attributes":170}],223:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -51889,7 +51894,7 @@ function getCdModule(calcdata, _module) { },{"../../registry":194}],224:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52041,7 +52046,7 @@ function nextDefaultColor(index) { },{"../../components/color":27,"./helpers":226,"fast-isnumeric":13,"tinycolor2":16}],225:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52125,7 +52130,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout },{"../../lib":122,"./attributes":222}],226:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52154,7 +52159,7 @@ exports.formatPieValue = function formatPieValue(v, separators) { },{"../../lib":122}],227:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52186,7 +52191,7 @@ module.exports = Pie; },{"./attributes":222,"./base_plot":223,"./calc":224,"./defaults":225,"./layout_attributes":228,"./layout_defaults":229,"./plot":230,"./style":231,"./style_one":232}],228:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52206,7 +52211,7 @@ module.exports = { },{}],229:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52228,7 +52233,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) { },{"../../lib":122,"./layout_attributes":228}],230:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52924,7 +52929,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { },{"../../components/color":27,"../../components/drawing":50,"../../lib/svg_text_utils":134,"../../plots/cartesian/graph_interact":157,"./helpers":226,"d3":10}],231:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52953,7 +52958,7 @@ module.exports = function style(gd) { },{"./style_one":232,"d3":10}],232:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -52980,7 +52985,7 @@ module.exports = function styleOne(s, pt, trace) { },{"../../components/color":27}],233:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53018,7 +53023,7 @@ module.exports = function arraysToCalcdata(cd) { },{"../../lib":122}],234:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53280,7 +53285,7 @@ module.exports = { },{"../../components/colorbar/attributes":28,"../../components/colorscale/color_attributes":34,"../../components/drawing":50,"../../components/errorbars/attributes":52,"../../lib/extend":117,"./constants":239}],235:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53411,7 +53416,7 @@ module.exports = function calc(gd, trace) { },{"../../lib":122,"../../plots/cartesian/axes":150,"./colorscale_calc":238,"./subtypes":254,"fast-isnumeric":13}],236:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53450,7 +53455,7 @@ module.exports = function cleanData(fullData) { },{}],237:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53507,7 +53512,7 @@ module.exports = function colorbar(gd, cd) { },{"../../components/colorbar/draw":30,"../../components/colorscale":41,"../../lib":122,"../../plots/plots":186,"fast-isnumeric":13}],238:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53540,7 +53545,7 @@ module.exports = function calcMarkerColorscale(trace) { },{"../../components/colorscale/calc":33,"../../components/colorscale/has_colorscale":40,"./subtypes":254}],239:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53556,7 +53561,7 @@ module.exports = { },{}],240:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53636,7 +53641,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout },{"../../components/errorbars/defaults":55,"../../lib":122,"./attributes":234,"./constants":239,"./fillcolor_defaults":241,"./line_defaults":245,"./line_shape_defaults":247,"./marker_defaults":250,"./subtypes":254,"./text_defaults":255,"./xy_defaults":256}],241:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53674,7 +53679,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe },{"../../components/color":27}],242:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53727,7 +53732,7 @@ module.exports = function getTraceColor(trace, di) { },{"../../components/color":27,"./subtypes":254}],243:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53910,7 +53915,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) { },{"../../components/color":27,"../../components/errorbars":56,"../../lib":122,"../../plots/cartesian/constants":155,"../../plots/cartesian/graph_interact":157,"./get_trace_color":242}],244:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53954,7 +53959,7 @@ module.exports = Scatter; },{"../../plots/cartesian":158,"./arrays_to_calcdata":233,"./attributes":234,"./calc":235,"./clean_data":236,"./colorbar":237,"./defaults":240,"./hover":243,"./plot":251,"./select":252,"./style":253,"./subtypes":254}],245:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -53987,7 +53992,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, },{"../../components/colorscale/defaults":36,"../../components/colorscale/has_colorscale":40}],246:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54160,7 +54165,7 @@ module.exports = function linePoints(d, opts) { },{"../../constants/numerical":107}],247:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54179,7 +54184,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) { },{}],248:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54220,7 +54225,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) { },{}],249:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54262,7 +54267,7 @@ module.exports = function makeBubbleSizeFn(trace) { },{"fast-isnumeric":13}],250:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54322,7 +54327,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout },{"../../components/color":27,"../../components/colorscale/defaults":36,"../../components/colorscale/has_colorscale":40,"./subtypes":254}],251:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54860,7 +54865,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { },{"../../components/drawing":50,"../../components/errorbars":56,"../../lib":122,"../../lib/polygon":129,"./arrays_to_calcdata":233,"./line_points":246,"./link_traces":248,"./subtypes":254,"d3":10}],252:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54932,7 +54937,7 @@ module.exports = function selectPoints(searchInfo, polygon) { },{"./subtypes":254}],253:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -54974,7 +54979,7 @@ module.exports = function style(gd) { },{"../../components/drawing":50,"../../components/errorbars":56,"d3":10}],254:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55010,7 +55015,7 @@ module.exports = { },{"../../lib":122}],255:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55031,7 +55036,7 @@ module.exports = function(traceIn, traceOut, layout, coerce) { },{"../../lib":122}],256:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55076,7 +55081,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, coerce) { },{}],257:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55165,7 +55170,7 @@ module.exports = { },{"../../components/colorscale/color_attributes":34,"../../lib/extend":117,"../../plots/attributes":148,"../scatter/attributes":234}],258:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55222,7 +55227,7 @@ module.exports = function calc(gd, trace) { },{"../scatter/colorscale_calc":238,"fast-isnumeric":13}],259:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55302,7 +55307,7 @@ function handleLonLatLocDefaults(traceIn, traceOut, coerce) { },{"../../lib":122,"../scatter/fillcolor_defaults":241,"../scatter/line_defaults":245,"../scatter/marker_defaults":250,"../scatter/subtypes":254,"../scatter/text_defaults":255,"./attributes":257}],260:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55323,7 +55328,7 @@ module.exports = function eventData(out, pt) { },{}],261:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55433,7 +55438,7 @@ function getExtraText(trace, pt, axis) { },{"../../plots/cartesian/axes":150,"../../plots/cartesian/graph_interact":157,"../scatter/get_trace_color":242,"./attributes":257}],262:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the @@ -55466,7 +55471,7 @@ module.exports = ScatterGeo; },{"../../plots/geo":174,"../scatter/colorbar":237,"./attributes":257,"./calc":258,"./defaults":259,"./event_data":260,"./hover":261,"./plot":263}],263:[function(require,module,exports){ /** -* Copyright 2012-2016, Plotly, Inc. +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the diff --git a/dist/plotly-ion.min.js b/dist/plotly-ion.min.js index 438bc6b7ba9..1605918f82a 100644 --- a/dist/plotly-ion.min.js +++ b/dist/plotly-ion.min.js @@ -1,6 +1,6 @@ /** -* plotly.js (ion - minified) v1.20.2-d30 -* Copyright 2012-2016, Plotly, Inc. +* plotly.js (ion - minified) v1.20.2-d31 +* Copyright 2012-2017, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ @@ -14,12 +14,12 @@ e.length},rr.prototype={start:function(){return this.edge.l===this.site?this.edg var r=t("d3"),a=t("tinycolor2"),o=t("../../plotly"),i=t("../../plots/plots"),l=t("../../registry"),s=t("../../plots/cartesian/axes"),c=t("../dragelement"),u=t("../../lib"),f=t("../../lib/extend").extendFlat,d=t("../../lib/setcursor"),h=t("../drawing"),p=t("../color"),g=t("../titles"),m=t("../../plots/cartesian/axis_defaults"),v=t("../../plots/cartesian/position_defaults"),y=t("../../plots/cartesian/layout_attributes"),x=t("./attributes");e.exports=function(t,e){function n(){function x(t,e){return u.coerce(J,K,y,t,e)}function w(){if(["top","bottom"].indexOf(_.titleside)!==-1){var e=ot.select(".cbtitle"),n=e.select("text"),o=[-_.outlinewidth/2,_.outlinewidth/2],i=e.select(".h"+K._id+"title-math-group").node(),l=15.6;if(n.node()&&(l=1.3*parseInt(n.style("font-size"),10)),i?(lt=h.bBox(i).height,lt>l&&(o[1]-=(lt-l)/2)):n.node()&&!n.classed("js-placeholder")&&(lt=h.bBox(e.node()).height),lt){if(lt+=5,"top"===_.titleside)K.domain[1]-=lt/T.h,o[1]*=-1;else{K.domain[0]+=lt/T.h;var c=Math.max(1,n.selectAll("tspan.line").size());o[1]+=(1-c)*l}e.attr("transform","translate("+o+")"),K.setScale()}}ot.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(T.h*(1-K.domain[1]))+")");var f=ot.select(".cbfills").selectAll("rect.cbfill").data(S);f.enter().append("rect").classed("cbfill",!0).style("stroke","none"),f.exit().remove(),f.each(function(t,e){var n=[0===e?C[0]:(S[e]+S[e-1])/2,e===S.length-1?C[1]:(S[e]+S[e+1])/2].map(K.c2p).map(Math.round);e!==S.length-1&&(n[1]+=n[1]>n[0]?1:-1);var o=P(t).replace("e-",""),i=a(o).toHexString();r.select(this).attr({x:Y,width:Math.max(B,2),y:r.min(n),height:Math.max(r.max(n)-r.min(n),2),fill:i})});var d=ot.select(".cblines").selectAll("path.cbline").data(_.line.color&&_.line.width?z:[]);return d.enter().append("path").classed("cbline",!0),d.exit().remove(),d.each(function(t){r.select(this).attr("d","M"+Y+","+(Math.round(K.c2p(t))+_.line.width/2%1)+"h"+B).call(h.lineGroupStyle,_.line.width,O(t),_.line.dash)}),K._axislayer.selectAll("g."+K._id+"tick,path").remove(),K._pos=Y+B+(_.outlinewidth||0)/2-("outside"===_.ticks?1:0),K.side="right",u.syncOrAsync([function(){return s.doTicks(t,K,!0)},function(){if(["top","bottom"].indexOf(_.titleside)===-1){var e=K.titlefont.size,n=K._offset+K._length/2,a=T.l+(K.position||0)*T.w+("right"===K.side?10+e*(K.showticklabels?1:.5):-10-e*(K.showticklabels?.5:0));M("h"+K._id+"title",{avoid:{selection:r.select(t).selectAll("g."+K._id+"tick"),side:_.titleside,offsetLeft:T.l,offsetTop:T.t,maxShift:A.width},attributes:{x:a,y:n,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function M(e,n){var r,a=b();r=l.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var o={propContainer:K,propName:r,traceIndex:a.index,dfltName:"colorscale",containerGroup:ot.select(".cbtitle")},i="h"===e.charAt(0)?e.substr(1):"h"+e;ot.selectAll("."+i+",."+i+"-math-group").remove(),g.draw(t,e,f(o,n||{}))}function k(){var n=B+_.outlinewidth/2+h.bBox(K._axislayer.node()).width;if(j=it.select("text"),j.node()&&!j.classed("js-placeholder")){var r,a=it.select(".h"+K._id+"title-math-group").node();r=a&&["top","bottom"].indexOf(_.titleside)!==-1?h.bBox(a).width:h.bBox(it.node()).right-Y-T.l,n=Math.max(n,r)}var o=2*_.xpad+n+_.borderwidth+_.outlinewidth/2,l=Q-$;ot.select(".cbbg").attr({x:Y-_.xpad-(_.borderwidth+_.outlinewidth)/2,y:$-U,width:Math.max(o,2),height:Math.max(l+2*U,2)}).call(p.fill,_.bgcolor).call(p.stroke,_.bordercolor).style({"stroke-width":_.borderwidth}),ot.selectAll(".cboutline").attr({x:Y,y:$+_.ypad+("top"===_.titleside?lt:0),width:Math.max(B,2),height:Math.max(l-2*_.ypad-lt,2)}).call(p.stroke,_.outlinecolor).style({fill:"None","stroke-width":_.outlinewidth});var s=({center:.5,right:1}[_.xanchor]||0)*o;ot.attr("transform","translate("+(T.l-s)+","+T.t+")"),i.autoMargin(t,e,{x:_.x,y:_.y,l:o*({right:1,center:.5}[_.xanchor]||0),r:o*({left:1,center:.5}[_.xanchor]||0),t:l*({bottom:1,middle:.5}[_.yanchor]||0),b:l*({top:1,middle:.5}[_.yanchor]||0)})}var A=t._fullLayout,T=A._size;if("function"!=typeof _.fillcolor&&"function"!=typeof _.line.color)return void A._infolayer.selectAll("g."+e).remove();var L,C=r.extent(("function"==typeof _.fillcolor?_.fillcolor:_.line.color).domain()),z=[],S=[],O="function"==typeof _.line.color?_.line.color:function(){return _.line.color},P="function"==typeof _.fillcolor?_.fillcolor:function(){return _.fillcolor},E=_.levels.end+_.levels.size/100,N=_.levels.size,D=1.001*C[0]-.001*C[1],R=1.001*C[1]-.001*C[0];for(L=_.levels.start;(L-E)*N<0;L+=N)L>D&&LC[0]&&L1){var at=Math.pow(10,Math.floor(Math.log(rt)/Math.LN10));et*=at*u.roundUp(rt/at,[2,5,10]),(Math.abs(_.levels.start)/_.levels.size+1e-6)%1<2e-6&&(K.tick0=0)}K.dtick=et}K.domain=[W+X,W+V-X],K.setScale();var ot=A._infolayer.selectAll("g."+e).data([0]);ot.enter().append("g").classed(e,!0).each(function(){var t=r.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),ot.attr("transform","translate("+Math.round(T.l)+","+Math.round(T.t)+")");var it=ot.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(T.l)+",-"+Math.round(T.t)+")");K._axislayer=ot.select(".cbaxis");var lt=0;if(["top","bottom"].indexOf(_.titleside)!==-1){var st,ct=T.l+(_.x+G)*T.w,ut=K.titlefont.size;st="top"===_.titleside?(1-(W+V-X))*T.h+T.t+3+.75*ut:(1-(W+X))*T.h+T.t-3-.25*ut,M(K._id+"title",{attributes:{x:ct,y:st,"text-anchor":"start"}})}var ft=u.syncOrAsync([i.previousPromises,w,i.previousPromises,k],t);if(ft&&ft.then&&(t._promises||[]).push(ft),t._context.editable){var dt,ht,pt;c.init({element:ot.node(),prepFn:function(){dt=ot.attr("transform"),d(ot)},moveFn:function(t,e){ot.attr("transform",dt+" translate("+t+","+e+")"),ht=c.align(Z+t/T.w,q,0,1,_.xanchor),pt=c.align(W-e/T.h,V,0,1,_.yanchor);var n=c.getCursor(ht,pt,_.xanchor,_.yanchor);d(ot,n)},doneFn:function(e){d(ot),e&&void 0!==ht&&void 0!==pt&&o.restyle(t,{"colorbar.x":ht,"colorbar.y":pt},b().index)}})}return ft}function b(){var n,r,a=e.substr(2);for(n=0;n=0?a.Reds:a.Blues,s.colorscale=d,l.reversescale&&(d=o(d)),l.colorscale=d)}},{"../../lib":122,"./flip_scale":38,"./scales":45}],34:[function(t,e,n){"use strict";var r=t("./attributes"),a=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:a({},r.colorscale,{}),cauto:a({},r.zauto,{}),cmax:a({},r.zmax,{}),cmin:a({},r.zmin,{}),autocolorscale:a({},r.autocolorscale,{}),reversescale:a({},r.reversescale,{})}}},{"../../lib/extend":117,"./attributes":32,"./scales.js":45}],35:[function(t,e,n){"use strict";var r=t("./scales");e.exports=r.RdBu},{"./scales":45}],36:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("../colorbar/has_colorbar"),i=t("../colorbar/defaults"),l=t("./is_valid_scale"),s=t("./flip_scale");e.exports=function(t,e,n,c,u){var f=u.prefix,d=u.cLetter,h=f.slice(0,f.length-1),p=f?a.nestedProperty(t,h).get()||{}:t,g=f?a.nestedProperty(e,h).get()||{}:e,m=p[d+"min"],v=p[d+"max"],y=p.colorscale,x=r(m)&&r(v)&&m=0;a--,o++)e=t[a],r[o]=[1-e[0],e[1]];return r}},{}],39:[function(t,e,n){"use strict";var r=t("./scales"),a=t("./default_scale"),o=t("./is_valid_scale_array");e.exports=function(t,e){function n(){try{t=r[t]||JSON.parse(t)}catch(n){t=e}}return e||(e=a),t?("string"==typeof t&&(n(),"string"==typeof t&&n()),o(t)?t:e):e}},{"./default_scale":35,"./is_valid_scale_array":43,"./scales":45}],40:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../../lib"),o=t("./is_valid_scale");e.exports=function(t,e){var n=e?a.nestedProperty(t,e).get()||{}:t,i=n.color,l=!1;if(Array.isArray(i))for(var s=0;s4/3-l?i:l}},{}],47:[function(t,e,n){"use strict";var r=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,n,o){return t="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:r.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":122}],48:[function(t,e,n){"use strict";function r(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function a(t){t._dragging=!1,t._replotPending&&o.plot(t)}var o=t("../../plotly"),i=t("../../lib"),l=t("../../plots/cartesian/constants"),s=e.exports={};s.align=t("./align"),s.getCursor=t("./cursor");var c=t("./unhover");s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(t){function e(e){return t.element.onmousemove=p,g._dragged=!1,g._dragging=!0,c=e.clientX,u=e.clientY,h=e.target,f=(new Date).getTime(),f-g._mouseDownTimev&&(m=Math.max(m-1,1)),t.doneFn&&t.doneFn(g._dragged,m),!g._dragged){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",e.bubbles,e.cancelable,e.view,0,0,0,0,0,!1,!1,!1,!1,e.button,null),h.dispatchEvent(n)}return a(g),g._dragged=!1,i.pauseEvent(e)}var c,u,f,d,h,p,g=i.getPlotDiv(t.element)||{},m=1,v=l.DBLCLICKDELAY;g._mouseDownTime||(g._mouseDownTime=0),p=t.element.onmousemove,t.setCursor&&(t.element.onmousemove=t.setCursor),t.element.onmousedown=e,t.element.style.pointerEvents="all"},s.coverSlip=r},{"../../lib":122,"../../plotly":145,"../../plots/cartesian/constants":155,"./align":46,"./cursor":47,"./unhover":49}],49:[function(t,e,n){"use strict";var r=t("../../lib/events"),a=e.exports={};a.wrapped=function(t,e,n){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),a.raw(t,e,n)},a.raw=function(t,e){var n=t._fullLayout;e||(e={}),e.target&&r.triggerHandler(t,"plotly_beforehover",e)===!1||(n._hoverlayer.selectAll("g").remove(),e.target&&t._hoverdata&&t.emit("plotly_unhover",{points:t._hoverdata}),t._hoverdata=void 0)}},{"../../lib/events":116}],50:[function(t,e,n){"use strict";function r(t,e,n,r,a,o,i){if(l.traceIs(n,"symbols")){var c=p(n);e.attr("d",function(t){var e;e="various"===t.ms||"various"===o.size?3:h.isBubble(n)?c(t.ms):(o.size||6)/2,t.mrc=e;var r=g.symbolNumber(t.mx||o.symbol)||0,a=r%100;return t.om=r%200>=100,g.symbolFuncs[a](e)+(r>=200?y:"")}).style("opacity",function(t){return(t.mo+1||o.opacity+1)-1})}var u,f,d;t.so?(d=i.outlierwidth,f=i.outliercolor,u=o.outliercolor):(d=(t.mlw+1||i.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,f="mlc"in t?t.mlcc=a(t.mlc):Array.isArray(i.color)?s.defaultLine:i.color,u="mc"in t?t.mcc=r(t.mc):Array.isArray(o.color)?s.defaultLine:o.color||"rgba(0,0,0,0)"),t.om?e.call(s.stroke,u).style({"stroke-width":(d||1)+"px",fill:"none"}):(e.style("stroke-width",d+"px").call(s.fill,u),d&&e.call(s.stroke,f))}function a(t,e,n,r){var a=t[0]-e[0],i=t[1]-e[1],l=n[0]-e[0],s=n[1]-e[1],c=Math.pow(a*a+i*i,_/2),u=Math.pow(l*l+s*s,_/2),f=(u*u*a-c*c*l)*r,d=(u*u*i-c*c*s)*r,h=3*u*(c+u),p=3*c*(c+u);return[[o.round(e[0]+(h&&f/h),2),o.round(e[1]+(h&&d/h),2)],[o.round(e[0]-(p&&f/p),2),o.round(e[1]-(p&&d/p),2)]]}var o=t("d3"),i=t("fast-isnumeric"),l=t("../../registry"),s=t("../color"),c=t("../colorscale"),u=t("../../lib"),f=t("../../lib/svg_text_utils"),d=t("../../constants/xmlns_namespaces"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/scatter/make_bubble_size_func"),g=e.exports={};g.font=function(t,e,n,r){e&&e.family&&(r=e.color,n=e.size,e=e.family),e&&t.style("font-family",e),n+1&&t.style("font-size",n+"px"),r&&t.call(s.fill,r)},g.setPosition=function(t,e,n){t.attr("x",e).attr("y",n)},g.setSize=function(t,e,n){t.attr("width",e).attr("height",n)},g.setRect=function(t,e,n,r,a){t.call(g.setPosition,e,n).call(g.setSize,r,a)},g.translatePoint=function(t,e,n,r){var a=t.xp||n.c2p(t.x),o=t.yp||r.c2p(t.y);i(a)&&i(o)?"text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"):e.remove()},g.translatePoints=function(t,e,n,r){t.each(function(t){var a=o.select(this);g.translatePoint(t,a,e,n,r)})},g.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},g.crispRound=function(t,e,n){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):n||0},g.singleLineStyle=function(t,e,n,r,a){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},i=n||o.width||0,l=a||o.dash||"";s.stroke(e,r||o.color),g.dashLine(e,l,i)},g.lineGroupStyle=function(t,e,n,r){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},i=e||a.width||0,l=r||a.dash||"";o.select(this).call(s.stroke,n||a.color).call(g.dashLine,l,i)})},g.dashLine=function(t,e,n){var r=Math.max(n,3);"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t.style({"stroke-dasharray":e,"stroke-width":n+"px"})},g.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var n=o.select(this);try{n.call(s.fill,e[0].trace.fillcolor)}catch(e){u.error(e,t),n.remove()}})};var m=t("./symbol_defs");g.symbolNames=[],g.symbolFuncs=[],g.symbolNeedLines={},g.symbolNoDot={},g.symbolList=[],Object.keys(m).forEach(function(t){var e=m[t];g.symbolList=g.symbolList.concat([e.n,t,e.n+100,t+"-open"]),g.symbolNames[e.n]=t,g.symbolFuncs[e.n]=e.f,e.needLine&&(g.symbolNeedLines[e.n]=!0),e.noDot?g.symbolNoDot[e.n]=!0:g.symbolList=g.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var v=g.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";g.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=g.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=v||t>=400?0:Math.floor(Math.max(t,0))},g.singlePointStyle=function(t,e,n){var a=n.marker,o=a.line,i=g.tryColorscale(a,""),l=g.tryColorscale(a,"line");r(t,e,n,i,l,a,o)},g.pointStyle=function(t,e){if(t.size()){var n=e.marker,r=g.tryColorscale(n,""),a=g.tryColorscale(n,"line");t.each(function(t){g.singlePointStyle(t,o.select(this),e,r,a)})}},g.tryColorscale=function(t,e){var n=e?u.nestedProperty(t,e).get():t,r=n.colorscale,a=n.color;return r&&Array.isArray(a)?c.makeColorScaleFunc(c.extractScale(r,n.cmin,n.cmax)):u.identity};var x={start:1,end:-1,middle:0,bottom:1,top:-1},b=1.3;g.textPointStyle=function(t,e){t.each(function(t){var n=o.select(this),r=t.tx||e.text;if(!r||Array.isArray(r))return void n.remove();var a=t.tp||e.textposition,l=a.indexOf("top")!==-1?"top":a.indexOf("bottom")!==-1?"bottom":"middle",s=a.indexOf("left")!==-1?"end":a.indexOf("right")!==-1?"start":"middle",c=t.ts||e.textfont.size,u=t.mrc?t.mrc/.8+1:0;c=i(c)&&c>0?c:0,n.call(g.font,t.tf||e.textfont.family,c,t.tc||e.textfont.color).attr("text-anchor",s).text(r).call(f.convertToTspans);var d=o.select(this.parentNode),h=n.selectAll("tspan.line"),p=((h[0].length||1)-1)*b+1,m=x[s]*u,v=.75*c+x[l]*u+(x[l]-1)*p*c/2;d.attr("transform","translate("+m+","+v+")"),p>1&&h.attr({x:n.attr("x"),y:n.attr("y")})})};var _=.5;g.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var n,r="M"+t[0],o=[];for(n=1;n=A&&(o.selectAll("[data-bb]").attr("data-bb",null),k=[]),t.setAttribute("data-bb",k.length),k.push(s),u.extendFlat({},s)},g.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var n="#"+e,r=o.select("base");r.size()&&r.attr("href")&&(n=window.location.href+n),t.attr("clip-path","url("+n+")")}},{"../../constants/xmlns_namespaces":109,"../../lib":122,"../../lib/svg_text_utils":134,"../../registry":194,"../../traces/scatter/make_bubble_size_func":249,"../../traces/scatter/subtypes":254,"../color":27,"../colorscale":41,"./symbol_defs":51,d3:10,"fast-isnumeric":13}],51:[function(t,e,n){"use strict";var r=t("d3");e.exports={circle:{n:0,f:function(t){var e=r.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=r.round(.4*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H"+e+"V"+n+"H-"+e+"V"+e+"H-"+n+"V-"+e+"H-"+e+"V-"+n+"H"+e+"V-"+e+"H"+n+"Z"}},x:{n:4,f:function(t){var e=r.round(.8*t/Math.sqrt(2),2),n="l"+e+","+e,a="l"+e+",-"+e,o="l-"+e+",-"+e,i="l-"+e+","+e;return"M0,"+e+n+a+o+a+o+i+o+i+n+i+n+"Z"}},"triangle-up":{n:5,f:function(t){var e=r.round(2*t/Math.sqrt(3),2),n=r.round(t/2,2),a=r.round(t,2);return"M-"+e+","+n+"H"+e+"L0,-"+a+"Z"}},"triangle-down":{n:6,f:function(t){var e=r.round(2*t/Math.sqrt(3),2),n=r.round(t/2,2),a=r.round(t,2);return"M-"+e+",-"+n+"H"+e+"L0,"+a+"Z"}},"triangle-left":{n:7,f:function(t){var e=r.round(2*t/Math.sqrt(3),2),n=r.round(t/2,2),a=r.round(t,2);return"M"+n+",-"+e+"V"+e+"L-"+a+",0Z"}},"triangle-right":{n:8,f:function(t){var e=r.round(2*t/Math.sqrt(3),2),n=r.round(t/2,2),a=r.round(t,2);return"M-"+n+",-"+e+"V"+e+"L"+a+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+n+",-"+e+"H"+e+"V"+n+"Z"}},"triangle-se":{n:10,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+e+",-"+n+"V"+e+"H-"+n+"Z"}},"triangle-sw":{n:11,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M"+n+","+e+"H-"+e+"V-"+n+"Z"}},"triangle-nw":{n:12,f:function(t){var e=r.round(.6*t,2),n=r.round(1.2*t,2);return"M-"+e+","+n+"V-"+e+"H"+n+"Z"}},pentagon:{n:13,f:function(t){var e=r.round(.951*t,2),n=r.round(.588*t,2),a=r.round(-t,2),o=r.round(t*-.309,2),i=r.round(.809*t,2);return"M"+e+","+o+"L"+n+","+i+"H-"+n+"L-"+e+","+o+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+n+"V"+n+"L0,"+e+"L-"+a+","+n+"V-"+n+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=r.round(t,2),n=r.round(t/2,2),a=r.round(t*Math.sqrt(3)/2,2);return"M-"+n+","+a+"H"+n+"L"+e+",0L"+n+",-"+a+"H-"+n+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=r.round(.924*t,2),n=r.round(.383*t,2);return"M-"+n+",-"+e+"H"+n+"L"+e+",-"+n+"V"+n+"L"+n+","+e+"H-"+n+"L-"+e+","+n+"V-"+n+"Z"}},star:{n:17,f:function(t){var e=1.4*t,n=r.round(.225*e,2),a=r.round(.951*e,2),o=r.round(.363*e,2),i=r.round(.588*e,2),l=r.round(-e,2),s=r.round(e*-.309,2),c=r.round(.118*e,2),u=r.round(.809*e,2),f=r.round(.382*e,2);return"M"+n+","+s+"H"+a+"L"+o+","+c+"L"+i+","+u+"L0,"+f+"L-"+i+","+u+"L-"+o+","+c+"L-"+a+","+s+"H-"+n+"L0,"+l+"Z"}},hexagram:{n:18,f:function(t){var e=r.round(.66*t,2),n=r.round(.38*t,2),a=r.round(.76*t,2);return"M-"+a+",0l-"+n+",-"+e+"h"+a+"l"+n+",-"+e+"l"+n+","+e+"h"+a+"l-"+n+","+e+"l"+n+","+e+"h-"+a+"l-"+n+","+e+"l-"+n+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M-"+e+","+n+i+e+","+n+i+"0,-"+a+i+"-"+e+","+n+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=r.round(t*Math.sqrt(3)*.8,2),n=r.round(.8*t,2),a=r.round(1.6*t,2),o=r.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M"+e+",-"+n+i+"-"+e+",-"+n+i+"0,"+a+i+e+",-"+n+"Z"}},"star-square":{n:21,f:function(t){var e=r.round(1.1*t,2),n=r.round(2*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=r.round(1.4*t,2),n=r.round(1.9*t,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=r.round(.7*t,2),n=r.round(1.4*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=r.round(1.4*t,2),n=r.round(.7*t,2);return"M0,"+n+"L"+e+",0L0,-"+n+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"; },noDot:!0},"circle-cross":{n:27,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=r.round(t,2),n=r.round(t/Math.sqrt(2),2);return"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=r.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=r.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=r.round(1.3*t,2),n=r.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=r.round(1.2*t,2),n=r.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=r.round(t/2,2),n=r.round(t,2);return"M"+e+","+n+"V-"+n+"m-"+n+",0V"+n+"M"+n+","+e+"H-"+n+"m0,-"+n+"H"+n},needLine:!0},"y-up":{n:37,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+n+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+n+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+n+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=r.round(1.2*t,2),n=r.round(1.6*t,2),a=r.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+n+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=r.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=r.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=r.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=r.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:10}],52:[function(t,e,n){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],53:[function(t,e,n){"use strict";function r(t,e,n,r){var o=e["error_"+r]||{},s=o.visible&&["linear","log"].indexOf(n.type)!==-1,c=[];if(s){for(var u=l(o),f=0;f0;t.each(function(t){var e,f=t[0].trace,d=f.error_x||{},h=f.error_y||{};f.ids&&(e=function(t){return t.id});var p=i.hasMarkers(f)&&f.marker.maxdisplayed>0;if(h.visible||d.visible){var g=a.select(this).selectAll("g.errorbar").data(t,e);g.exit().remove(),g.style("opacity",1);var m=g.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(n.duration).style("opacity",1),g.each(function(t){var e=a.select(this),i=r(t,s,c);if(!p||t.vis){var f;if(h.visible&&o(i.x)&&o(i.yh)&&o(i.ys)){var g=h.width;f="M"+(i.x-g)+","+i.yh+"h"+2*g+"m-"+g+",0V"+i.ys,i.noYS||(f+="m-"+g+",0h"+2*g);var m=e.select("path.yerror");l=!m.size(),l?m=e.append("path").classed("yerror",!0):u&&(m=m.transition().duration(n.duration).ease(n.easing)),m.attr("d",f)}if(d.visible&&o(i.y)&&o(i.xh)&&o(i.xs)){var v=(d.copy_ystyle?h:d).width;f="M"+i.xh+","+(i.y-v)+"v"+2*v+"m0,-"+v+"H"+i.xs,i.noXS||(f+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");l=!y.size(),l?y=e.append("path").classed("xerror",!0):u&&(y=y.transition().duration(n.duration).ease(n.easing)),y.attr("d",f)}}})}})}},{"../../traces/scatter/subtypes":254,d3:10,"fast-isnumeric":13}],58:[function(t,e,n){"use strict";var r=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,n=e.error_y||{},o=e.error_x||{},i=r.select(this);i.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),o.copy_ystyle&&(o=n),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(a.stroke,o.color)})}},{"../color":27,d3:10}],59:[function(t,e,n){"use strict";var r=t("../../plots/cartesian/constants");e.exports={_isLinkedToArray:"image",visible:{valType:"boolean",dflt:!0},source:{valType:"string"},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},sizex:{valType:"number",dflt:0},sizey:{valType:"number",dflt:0},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain"},opacity:{valType:"number",min:0,max:1,dflt:1},x:{valType:"any",dflt:0},y:{valType:"any",dflt:0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper"}}},{"../../plots/cartesian/constants":155}],60:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return a.coerce(t,e,l,n,r)}var i=r("source"),s=r("visible",!!i);if(!s)return e;r("layer"),r("x"),r("y"),r("xanchor"),r("yanchor"),r("sizex"),r("sizey"),r("sizing"),r("opacity");for(var c={_fullLayout:n},u=["x","y"],f=0;f<2;f++)o.coerceRef(t,e,c,u[f],"paper");return e}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("../../plots/array_container_defaults"),l=t("./attributes"),s="images";e.exports=function(t,e){var n={name:s,handleItemDefaults:r};i(t,e,n)}},{"../../lib":122,"../../plots/array_container_defaults":147,"../../plots/cartesian/axes":150,"./attributes":59}],61:[function(t,e,n){"use strict";var r=t("d3"),a=t("../drawing"),o=t("../../plots/cartesian/axes"),i=t("../../constants/xmlns_namespaces");e.exports=function(t){function e(e){var n=r.select(this);if(!this.img||this.img.src!==e.source){n.attr("xmlns",i.svg);var a=new Promise(function(t){function r(){n.remove(),t()}var a=new Image;this.img=a,a.setAttribute("crossOrigin","anonymous"),a.onerror=r,a.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height;var e=t.getContext("2d");e.drawImage(this,0,0);var r=t.toDataURL("image/png");n.attr("xlink:href",r)},n.on("error",r),n.on("load",t),a.src=e.source}.bind(this));t._promises.push(a)}}function n(e){var n=r.select(this),i=o.getFromId(t,e.xref),s=o.getFromId(t,e.yref),c=l._size,u=i?Math.abs(i.l2p(e.sizex)-i.l2p(0)):e.sizex*c.w,f=s?Math.abs(s.l2p(e.sizey)-s.l2p(0)):e.sizey*c.h,d=u*h.x[e.xanchor].offset,p=f*h.y[e.yanchor].offset,g=h.x[e.xanchor].sizing+h.y[e.yanchor].sizing,m=(i?i.r2p(e.x)+i._offset:e.x*c.w+c.l)+d,v=(s?s.r2p(e.y)+s._offset:c.h-e.y*c.h+c.t)+p;switch(e.sizing){case"fill":g+=" slice";break;case"stretch":g="none"}n.attr({x:m,y:v,width:u,height:f,preserveAspectRatio:g,opacity:e.opacity});var y=i?i._id:"",x=s?s._id:"",b=y+x;b&&n.call(a.setClipUrl,"clip"+l._uid+b)}for(var l=t._fullLayout,s=[],c=[],u=[],f=0;f=2/3},n.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},n.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},n.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],64:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:o({},r,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":117,"../../plots/font_attributes":170,"../color/attributes":26}],65:[function(t,e,n){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],66:[function(t,e,n){"use strict";var r=t("../../registry"),a=t("../../lib"),o=t("./attributes"),i=t("../../plots/layout_attributes"),l=t("./helpers");e.exports=function(t,e,n){function s(t,e){return a.coerce(h,p,o,t,e)}for(var c,u,f,d,h=t.legend||{},p=e.legend={},g=0,m="normal",v=0;v1);if(x!==!1){if(s("bgcolor",e.paper_bgcolor),s("bordercolor"),s("borderwidth"),a.coerceFont(s,"font",e.font),s("orientation"),"h"===p.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(c=0,f="left",u=1.1,d="bottom"):(c=0,f="left",u=-.1,d="top")}s("traceorder",m),l.isGrouped(e.legend)&&s("tracegroupgap"),s("x",c),s("xanchor",f),s("y",u),s("yanchor",d),a.noneOrAll(h,p,["x","y"])}}},{"../../lib":122,"../../plots/layout_attributes":184,"../../registry":194,"./attributes":64,"./helpers":69}],67:[function(t,e,n){"use strict";function r(t,e){function n(n){v.convertToTspans(n,function(){n.selectAll("tspan.line").attr({x:n.attr("x")}),t.call(o,e)})}var r=t.data()[0][0],a=e._fullLayout,i=r.trace,l=h.traceIs(i,"pie"),s=i.index,c=l?r.label:i.name,f=t.selectAll("text.legendtext").data([0]);f.enter().append("text").classed("legendtext",!0),f.attr({x:40,y:0,"data-unformatted":c}).style("text-anchor","start").classed("user-select-none",!0).call(g.font,a.legend.font).text(c),e._context.editable&&!l?f.call(v.makeEditable).call(n).on("edit",function(t){this.attr({"data-unformatted":t}),this.text(t).call(n),this.text()||(t=" ");var a,o=r.trace._fullInput||{};if(["ohlc","candlestick"].indexOf(o.type)!==-1){var i=r.trace.transforms,l=i[i.length-1].direction;a=l+".legenditem.name"}else a="name";u.restyle(e,a,t,s)}):f.call(n)}function a(t,e){var n=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],r=t.selectAll("rect").data([0]);r.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(m.fill,"rgba(0,0,0,0)"),r.on("click",function(){if(!e._dragged){var r,a,o=t.data()[0][0],i=e._fullData,l=o.trace,s=l.legendgroup,c=[];if(h.traceIs(l,"pie")){var f=o.label,d=n.indexOf(f);d===-1?n.push(f):n.splice(d,1),u.relayout(e,"hiddenlabels",n)}else{if(""===s)c=[l.index];else for(var p=0;ptspan"),d=u[0].length||1;n=l*d,r=c.node()&&g.bBox(c.node()).width;var h=l*(.3+(1-d)/2);c.attr("y",h),u.attr("y",h)}n=Math.max(n,16)+3,a.height=n,a.width=r}function i(t,e,n){var r=t._fullLayout,a=r.legend,o=a.borderwidth,i=_.isGrouped(a);if(_.isVertical(a))i&&e.each(function(t,e){f.setTranslate(this,0,e*a.tracegroupgap)}),a.width=0,a.height=0,n.each(function(t){var e=t[0],n=e.height,r=e.width;f.setTranslate(this,o,5+o+a.height+n/2),a.height+=n,a.width=Math.max(a.width,r)}),a.width+=45+2*o,a.height+=10+2*o,i&&(a.height+=(a._lgroupsLength-1)*a.tracegroupgap),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0],r=c.select(this).select(".legendtoggle");r.call(g.setRect,0,-n.height/2,(t._context.editable?0:a.width)+40,n.height)});else if(i){a.width=0,a.height=0;for(var l=[a.width],s=e.data(),u=0,d=s.length;ur.width-(r.margin.r+r.margin.l)&&(x=0,m+=v,a.height=a.height+v,v=0),f.setTranslate(this,o+x,5+o+e.height/2+m),a.width+=i+n,a.height=Math.max(a.height,e.height),x+=i+n,v=Math.max(e.height,v)}),a.width+=2*o,a.height+=10+2*o,a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),n.each(function(e){var n=e[0],r=c.select(this).select(".legendtoggle");r.call(g.setRect,0,-n.height/2,t._context.editable?0:a.width,n.height)})}}function l(t){var e=t._fullLayout,n=e.legend,r="left";w.isRightAnchor(n)?r="right":w.isCenterAnchor(n)&&(r="center");var a="top";w.isBottomAnchor(n)?a="bottom":w.isMiddleAnchor(n)&&(a="middle"),d.autoMargin(t,"legend",{x:n.x,y:n.y,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:n.height*({top:1,middle:.5}[a]||0),t:n.height*({bottom:1,middle:.5}[a]||0)})}function s(t){var e=t._fullLayout,n=e.legend,r="left";w.isRightAnchor(n)?r="right":w.isCenterAnchor(n)&&(r="center"),d.autoMargin(t,"legend",{x:n.x,y:.5,l:n.width*({right:1,center:.5}[r]||0),r:n.width*({left:1,center:.5}[r]||0),b:0,t:0})}var c=t("d3"),u=t("../../plotly"),f=t("../../lib"),d=t("../../plots/plots"),h=t("../../registry"),p=t("../dragelement"),g=t("../drawing"),m=t("../color"),v=t("../../lib/svg_text_utils"),y=t("./constants"),x=t("./get_legend_data"),b=t("./style"),_=t("./helpers"),w=t("./anchor_utils");e.exports=function(t){function e(t,e){L.attr("data-scroll",e).call(f.setTranslate,0,e),C.call(g.setRect,F,t,y.scrollBarWidth,y.scrollBarHeight),A.select("rect").attr({y:v.borderwidth-e})}var n=t._fullLayout,o="legend"+n._uid;if(n._infolayer&&t.calcdata){var v=n.legend,_=n.showlegend&&x(t.calcdata,v),M=n.hiddenlabels||[];if(!n.showlegend||!_.length)return n._infolayer.selectAll(".legend").remove(),n._topdefs.select("#"+o).remove(),void d.autoMargin(t,"legend");var k=n._infolayer.selectAll("g.legend").data([0]);k.enter().append("g").attr({class:"legend","pointer-events":"all"});var A=n._topdefs.selectAll("#"+o).data([0]);A.enter().append("clipPath").attr("id",o).append("rect");var T=k.selectAll("rect.bg").data([0]);T.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),T.call(m.stroke,v.bordercolor),T.call(m.fill,v.bgcolor),T.style("stroke-width",v.borderwidth+"px");var L=k.selectAll("g.scrollbox").data([0]);L.enter().append("g").attr("class","scrollbox");var C=k.selectAll("rect.scrollbar").data([0]);C.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(m.fill,"#808BA4");var z=L.selectAll("g.groups").data(_);z.enter().append("g").attr("class","groups"),z.exit().remove();var S=z.selectAll("g.traces").data(f.identity);S.enter().append("g").attr("class","traces"),S.exit().remove(),S.call(b).style("opacity",function(t){var e=t[0].trace;return h.traceIs(e,"pie")?M.indexOf(t[0].label)!==-1?.5:1:"legendonly"===e.visible?.5:1}).each(function(){c.select(this).call(r,t).call(a,t)});var O=0!==k.enter().size();O&&(i(t,z,S),l(t));var P=0,E=n.width,N=0,D=n.height;i(t,z,S),v.height>D?s(t):l(t);var R=n._size,j=R.l+R.w*v.x,I=R.t+R.h*(1-v.y);w.isRightAnchor(v)?j-=v.width:w.isCenterAnchor(v)&&(j-=v.width/2),w.isBottomAnchor(v)?I-=v.height:w.isMiddleAnchor(v)&&(I-=v.height/2);var F=v.width;R.w;j+F>E&&(j=E-F),jq?(I=R.t,B=q):(I+B>D&&(I=D-B),In[1])return n[1]}return a}function n(t){return t[0]}var r,a,o=t[0],i=o.trace,l=h.hasMarkers(i),c=h.hasText(i),d=h.hasLines(i);if(l||c||d){var p={},g={};l&&(p.mc=e("marker.color",n),p.mo=e("marker.opacity",u.mean,[.2,1]),p.ms=e("marker.size",u.mean,[2,16]),p.mlc=e("marker.line.color",n),p.mlw=e("marker.line.width",u.mean,[0,5]),g.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),d&&(g.line={width:e("line.width",n,[0,10])}),c&&(p.tx="Aa",p.tp=e("textposition",n),p.ts=10,p.tc=e("textfont.color",n),p.tf=e("textfont.family",n)),r=[u.minExtend(o,p)],a=u.minExtend(i,g)}var m=s.select(this).select("g.legendpoints"),v=m.selectAll("path.scatterpts").data(l?r:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(f.pointStyle,a),l&&(r[0].mrc=3);var y=m.selectAll("g.pointtext").data(c?r:[]);y.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),y.exit().remove(),y.selectAll("text").call(f.textPointStyle,a)}function o(t){var e=t[0].trace,n=e.marker||{},r=n.line||{},a=s.select(this).select("g.legendpoints").selectAll("path.legendbar").data(c.traceIs(e,"bar")?[t]:[]);a.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),a.exit().remove(),a.each(function(t){var e=(t.mlw+1||r.width+1)-1,a=s.select(this);a.style("stroke-width",e+"px").call(d.fill,t.mc||n.color),e&&a.call(d.stroke,t.mlc||r.color)})}function i(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendbox").data(c.traceIs(e,"box")&&e.visible?[t]:[]);n.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.each(function(t){var n=(t.lw+1||e.line.width+1)-1,r=s.select(this);r.style("stroke-width",n+"px").call(d.fill,t.fc||e.fillcolor),n&&r.call(d.stroke,t.lc||e.line.color)})}function l(t){var e=t[0].trace,n=s.select(this).select("g.legendpoints").selectAll("path.legendpie").data(c.traceIs(e,"pie")&&e.visible?[t]:[]);n.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.size()&&n.call(p,t[0],e)}var s=t("d3"),c=t("../../registry"),u=t("../../lib"),f=t("../drawing"),d=t("../color"),h=t("../../traces/scatter/subtypes"),p=t("../../traces/pie/style_one");e.exports=function(t){t.each(function(t){var e=s.select(this),n=e.selectAll("g.legendfill").data([t]);n.enter().append("g").classed("legendfill",!0);var r=e.selectAll("g.legendlines").data([t]);r.enter().append("g").classed("legendlines",!0);var a=e.selectAll("g.legendsymbols").data([t]);a.enter().append("g").classed("legendsymbols",!0),a.style("opacity",t[0].trace.opacity),a.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(o).each(i).each(l).each(r).each(a)}},{"../../lib":122,"../../registry":194,"../../traces/pie/style_one":232,"../../traces/scatter/subtypes":254,"../color":27,"../drawing":50,d3:10}],72:[function(t,e,n){"use strict";function r(t,e){var n=e.currentTarget,r=n.getAttribute("data-attr"),a=n.getAttribute("data-val")||!0,o=t._fullLayout,i={};if("zoom"===r){for(var l,s,u="in"===a?.5:2,d=(1+u)/2,h=(1-u)/2,p=f.list(t,null,!0),g=0;g1)return r(["resetViews","toggleHover"]),i(m,n);u&&(r(["zoom3d","pan3d","orbitRotation","tableRotation"]),r(["resetCameraDefault3d","resetCameraLastSave3d"]),r(["hoverClosest3d"])),d&&(r(["zoomInGeo","zoomOutGeo","resetGeo"]),r(["hoverClosestGeo"]));var v=a(l),y=[];return((c||p)&&!v||g)&&(y=["zoom2d","pan2d"]),(c||g)&&o(s)&&(y.push("select2d"),y.push("lasso2d")),y.length&&r(y),!c&&!p||v||g||r(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),c&&h?r(["toggleHover"]):p?r(["hoverClosestGl2d"]):c?r(["hoverClosestCartesian","hoverCompareCartesian"]):h&&r(["hoverClosestPie"]),i(m,n)}function a(t){for(var e=s.list({_fullLayout:t},null,!0),n=!0,r=0;r0);if(p){var g=a(e,n,s);u("x",g[0]),u("y",g[1]),o.noneOrAll(t,e,["x","y"]),u("xanchor"),u("yanchor"),o.coerceFont(u,"font",n.font);var m=u("bgcolor");u("activecolor",i.contrast(m,c.lightAmount,c.darkAmount)),u("bordercolor"),u("borderwidth")}}},{"../../lib":122,"../color":27,"./attributes":76,"./button_attributes":77,"./constants":78}],80:[function(t,e,n){"use strict";function r(t){for(var e=v.list(t,"x",!0),n=[],r=0;rp&&(p=d)));return p>=h?[h,p]:void 0}}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./constants"),l=t("./helpers");e.exports=function(t){var e=t._fullLayout,n=a.filterVisible(e.shapes);if(n.length&&t._fullData.length)for(var l=0;le;o--)f(t,o).selectAll('[data-index="'+(o-1)+'"]').attr("data-index",o),a(t,o)}function u(t,e,n,r){function a(n){var r={"data-index":e,"fill-rule":"evenodd",d:h(t,C)},a=C.line.width?C.line.color:"rgba(0,0,0,0)",o=n.append("path").attr(r).style("opacity",C.opacity).call(y.stroke,a).call(y.fill,C.fillcolor).call(x.dashLine,C.line.dash,C.line.width);C.classes&&o.classed(C.classes,!0),z&&o.call(x.setClipUrl,"clip"+t._fullLayout._uid+z)}var o,i;f(t,e).selectAll('[data-index="'+e+'"]').remove();var l=t.layout.shapes[e];if(l){var s={};"string"==typeof n&&n?s[n]=r:m.isPlainObject(n)&&(s=n);var c=Object.keys(s);for(o=0;ol&&(t="X"),t});return r>l&&(s=s.replace(/[\s,]*X.*/,""),m.log("Ignoring extra params in segment "+t)),a+s})}var g=t("fast-isnumeric"),m=(t("../../plotly"),t("../../lib")),v=t("../../plots/cartesian/axes"),y=t("../color"),x=t("../drawing"),b=(t("../dragelement"),t("../../lib/setcursor"),t("./constants")),_=t("./helpers"),w=t("./shape_defaults"),M=t("./defaults");e.exports={draw:r,drawOne:a}},{"../../lib":122,"../../lib/setcursor":132,"../../plotly":145,"../../plots/cartesian/axes":150,"../color":27,"../dragelement":48,"../drawing":50,"./constants":90,"./defaults":91,"./helpers":93,"./shape_defaults":95,"fast-isnumeric":13}],93:[function(t,e,n){"use strict";n.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},n.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},n.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},n.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},n.getDataToPixel=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(i(t,!0))},"date"===e.type&&(a=n.decodeDate(a))}else a=r?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},n.getPixelToData=function(t,e,r){var a,o=t._fullLayout._size;if(e){var i=n.rangeToShapePosition(e);a=function(t){return i(e.p2r(t-e._offset))}}else a=r?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a}},{}],94:[function(t,e,n){"use strict";var r=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"), -draw:r.draw,drawOne:r.drawOne}},{"./attributes":88,"./calc_autorange":89,"./defaults":91,"./draw":92}],95:[function(t,e,n){"use strict";var r=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./attributes"),i=t("./helpers");e.exports=function(t,e,n,l,s){function c(n,a){return r.coerce(t,e,o,n,a)}l=l||{},s=s||{};var u=c("visible",!s.itemIsNotPlainObject);if(!u)return e;c("layer"),c("opacity"),c("fillcolor"),c("line.color"),c("line.width"),c("line.dash");for(var f=t.path?"path":"rect",d=c("type",f),h=["x","y"],p=0;p<2;p++){var g=h[p],m={_fullLayout:n},v=a.coerceRef(t,e,m,g,"","paper");if("path"!==d){var y,x,b,_=.25,w=.75;"paper"!==v?(y=a.getFromId(m,v),b=i.rangeToShapePosition(y),x=i.shapePositionToRange(y)):x=b=r.identity;var M=g+"0",k=g+"1",A=t[M],T=t[k];t[M]=x(t[M],!0),t[k]=x(t[k],!0),a.coercePosition(e,m,c,v,M,_),a.coercePosition(e,m,c,v,k,w),e[M]=b(e[M]),e[k]=b(e[k]),t[M]=A,t[k]=T}}return"path"===d?c("path"):r.noneOrAll(t,e,["x0","x1","y0","y1"]),t.classes&&(e.classes=t.classes),e}},{"../../lib":122,"../../plots/cartesian/axes":150,"./attributes":88,"./helpers":93}],96:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../../plots/pad_attributes"),o=t("../../lib/extend").extendFlat,i=t("../../lib/extend").extendDeep,l=t("../../plots/animation_attributes"),s=t("./constants"),c={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,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:i({},a,{},{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:l.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:o({},r,{})},font:o({},r,{}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}},{"../../lib/extend":117,"../../plots/animation_attributes":146,"../../plots/font_attributes":170,"../../plots/pad_attributes":185,"./constants":97}],97:[function(t,e,n){"use strict";e.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,fontSizeToHeight:1.3,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}},{}],98:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}var i=a(t,e),s=r("visible",i.length>0);if(s){r("active"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("len"),r("lenmode"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font);var c=r("currentvalue.visible");c&&(r("currentvalue.xanchor"),r("currentvalue.prefix"),r("currentvalue.suffix"),r("currentvalue.offset"),o.coerceFont(r,"currentvalue.font",e.font)),r("transition.duration"),r("transition.easing"),r("bgcolor"),r("activebgcolor"),r("bordercolor"),r("borderwidth"),r("ticklen"),r("tickwidth"),r("tickcolor"),r("minorticklen")}}function a(t,e){function n(t,e){return o.coerce(r,a,u,t,e)}for(var r,a,i=t.steps||[],l=e.steps=[],s=0;s0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*z.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+z.stepInset+(t.inputAreaLength-2*z.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-z.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*z.stepInset-2*t.inputAreaStart)))}function x(t,e,n){var r=t.selectAll("rect."+z.railTouchRectClass).data([0]);r.enter().append("rect").classed(z.railTouchRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,z.tickOffset+n.ticklen+n.labelHeight)}).call(A.fill,n.bgcolor).attr("opacity",0),k.setTranslate(r,0,n.currentValueTotalHeight)}function b(t,e){var n=t.selectAll("rect."+z.railRectClass).data([0]);n.enter().append("rect").classed(z.railRectClass,!0);var r=e.inputAreaLength-2*z.railInset;n.attr({width:r,height:z.railWidth,rx:z.railRadius,ry:z.railRadius,"shape-rendering":"crispEdges"}).call(A.stroke,e.bordercolor).call(A.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),k.setTranslate(n,z.railInset,.5*(e.inputAreaWidth-z.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},n=Object.keys(e),r=0;r0?[0]:[]);if(l.enter().append("g").classed(z.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==n.length){var s=l.selectAll("g."+z.groupClassName).data(n,a);s.enter().append("g").classed(z.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,z.autoMarginIdRoot+e._index)});for(var c=0;c0||d<0){var h={left:[-n,0],right:[n,0],top:[0,-n],bottom:[0,n]}[x.side];e.attr("transform","translate("+h+")")}}}function p(){L=0,C=!0,z=O,M._infolayer.select("."+e).attr({"data-unformatted":z}).text(z).on("mouseover.opacity",function(){r.select(this).transition().duration(100).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(1e3).style("opacity",0)})}var g=n.propContainer,m=n.propName,v=n.traceIndex,y=n.dfltName,x=n.avoid||{},b=n.attributes,_=n.transform,w=n.containerGroup,M=t._fullLayout,k=g.titlefont.family,A=g.titlefont.size,T=g.titlefont.color,L=1,C=!1,z=g.title.trim();""===z&&(L=0),z.match(/Click to enter .+ title/)&&(L=.2,C=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var S=w.selectAll("text").data([0]);S.enter().append("text"),S.text(z).attr("class",e),S.attr({"data-unformatted":z}).call(f);var O="Click to enter "+y+" title",P=t._context.editable;P&&(g===M?P=t._context.editableMainTitle:g===M.xaxis?P=t._context.editableAxisXTitle:g===M.yaxis?P=t._context.editableAxisYTitle:g===M.yaxis2?P=t._context.editableAxisY2Title:g===M.xaxis2&&(P=t._context.editableAxisX2Title)),P?(z||p(),S.call(u.makeEditable).on("edit",function(e){void 0!==v?o.restyle(t,m,e,v):o.relayout(t,m,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(b).selectAll("tspan.line").attr(b)})):z&&!z.match(/Click to enter .+ title/)||S.remove(),S.classed("js-placeholder",C),g._titleElement=S}},{"../../lib":122,"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/plots":186,"../color":27,"../drawing":50,d3:10,"fast-isnumeric":13}],102:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",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:l,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:o({},i,{}),font:o({},r,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":117,"../../plots/font_attributes":170,"../../plots/pad_attributes":185,"../color/attributes":26}],103:[function(t,e,n){"use strict";e.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,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],104:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}var i=a(t,e),s=r("visible",i.length>0);s&&(r("active"),r("direction"),r("type"),r("showactive"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("bgcolor",n.paper_bgcolor),r("bordercolor"),r("borderwidth"))}function a(t,e){function n(t,e){return o.coerce(r,a,u,t,e)}for(var r,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(c.enter().append("g").classed(T.containerClassName,!0).style("cursor","pointer"),c.exit().remove(),c.exit().size()&&y(t),0!==n.length){var u=c.selectAll("g."+T.headerGroupClassName).data(n,a);u.enter().append("g").classed(T.headerGroupClassName,!0);var f=c.selectAll("g."+T.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(T.dropdownButtonGroupClassName,!0).style("pointer-events","all"),u.enter().size()&&f.call(v).attr(T.menuIndexAttrName,"-1"),u.exit().each(function(e){x.select(this).remove(),f.call(v).attr(T.menuIndexAttrName,"-1"),b.autoMargin(t,T.autoMarginIdRoot+e._index)});for(var d=0;d",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],109:[function(t,e,n){"use strict";n.xmlns="http://www.w3.org/2000/xmlns/",n.svg="http://www.w3.org/2000/svg",n.xlink="http://www.w3.org/1999/xlink",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],110:[function(t,e,n){"use strict";var r=t("./plotly");n.version="1.20.2-d30",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),n.plot=r.plot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.setPlotConfig=t("./plot_api/set_plot_config"),n.register=t("./plot_api/register"),n.toImage=t("./plot_api/to_image"),n.downloadImage=t("./snapshot/download"),n.validate=t("./plot_api/validate"),n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.register(t("./traces/scatter")),n.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),n.Icons=t("../build/ploticon"),n.Plots=r.Plots,n.Fx=r.Fx,n.Snapshot=t("./snapshot"),n.PlotSchema=t("./plot_api/plot_schema"),n.Queue=t("./lib/queue");var a=t("./components/color");n.colorDefaults=a.overrideColorDefaults,n.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":25,"./components/color":27,"./components/images":62,"./components/legend":70,"./components/rangeselector":82,"./components/rangeslider":87,"./components/shapes":94,"./components/sliders":100,"./components/updatemenus":106,"./fonts/mathjax_config":111,"./lib/queue":130,"./plot_api/plot_schema":139,"./plot_api/register":140,"./plot_api/set_plot_config":141,"./plot_api/to_image":143,"./plot_api/validate":144,"./plotly":145,"./snapshot":199,"./snapshot/download":196,"./traces/scatter":244,d3:10,"es6-promise":11}],111:[function(t,e,n){"use strict";"undefined"!=typeof MathJax?(n.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):n.MathJax=!1},{}],112:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){Array.isArray(t)&&(e[n]=t[r])}},{}],113:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM,o=/^['"%,$#\s']+/,i=/['"%,$#\s']+$/;e.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"").replace(i,"")),r(t)?Number(t):a}},{"../constants/numerical":107,"fast-isnumeric":13}],114:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../components/colorscale/get_scale"),i=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),l=/^([2-9]|[1-9][0-9]+)$/;n.valObjects={data_array:{coerceFunction:function(t,e,n){Array.isArray(t)?e.set(t):void 0!==n&&e.set(n)}},enumerated:{coerceFunction:function(t,e,n,r){r.coerceNumber&&(t=+t),r.values.indexOf(t)===-1?e.set(n):e.set(t)}},boolean:{coerceFunction:function(t,e,n){t===!0||t===!1?e.set(t):e.set(n)}},number:{coerceFunction:function(t,e,n,a){!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},integer:{coerceFunction:function(t,e,n,a){t%1||!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},string:{coerceFunction:function(t,e,n,r){if("string"!=typeof t){var a="number"==typeof t;r.strict!==!0&&a?e.set(String(t)):e.set(n)}else r.noBlank&&!t?e.set(n):e.set(t)}},color:{coerceFunction:function(t,e,n){a(t).isValid()?e.set(t):e.set(n)}},colorscale:{coerceFunction:function(t,e,n){e.set(o(t,n))}},angle:{coerceFunction:function(t,e,n){"auto"===t?e.set("auto"):r(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(n)}},subplotid:{coerceFunction:function(t,e,n){var r=n.length;return"string"==typeof t&&t.substr(0,r)===n&&l.test(t.substr(r))?void e.set(t):void e.set(n)},validateFunction:function(t,e){var n=e.dflt,r=n.length;return t===n||"string"==typeof t&&!(t.substr(0,r)!==n||!l.test(t.substr(r)))}},flaglist:{coerceFunction:function(t,e,n,r){if("string"!=typeof t)return void e.set(n);if((r.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var a=t.split("+"),o=0;o0);if(s){r("active"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("len"),r("lenmode"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font);var c=r("currentvalue.visible");c&&(r("currentvalue.xanchor"),r("currentvalue.prefix"),r("currentvalue.suffix"),r("currentvalue.offset"),o.coerceFont(r,"currentvalue.font",e.font)),r("transition.duration"),r("transition.easing"),r("bgcolor"),r("activebgcolor"),r("bordercolor"),r("borderwidth"),r("ticklen"),r("tickwidth"),r("tickcolor"),r("minorticklen")}}function a(t,e){function n(t,e){return o.coerce(r,a,u,t,e)}for(var r,a,i=t.steps||[],l=e.steps=[],s=0;s0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*z.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+z.stepInset+(t.inputAreaLength-2*z.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-z.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*z.stepInset-2*t.inputAreaStart)))}function x(t,e,n){var r=t.selectAll("rect."+z.railTouchRectClass).data([0]);r.enter().append("rect").classed(z.railTouchRectClass,!0).call(h,e,t,n).style("pointer-events","all"),r.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,z.tickOffset+n.ticklen+n.labelHeight)}).call(A.fill,n.bgcolor).attr("opacity",0),k.setTranslate(r,0,n.currentValueTotalHeight)}function b(t,e){var n=t.selectAll("rect."+z.railRectClass).data([0]);n.enter().append("rect").classed(z.railRectClass,!0);var r=e.inputAreaLength-2*z.railInset;n.attr({width:r,height:z.railWidth,rx:z.railRadius,ry:z.railRadius,"shape-rendering":"crispEdges"}).call(A.stroke,e.bordercolor).call(A.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),k.setTranslate(n,z.railInset,.5*(e.inputAreaWidth-z.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},n=Object.keys(e),r=0;r0?[0]:[]);if(l.enter().append("g").classed(z.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==n.length){var s=l.selectAll("g."+z.groupClassName).data(n,a);s.enter().append("g").classed(z.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,z.autoMarginIdRoot+e._index)});for(var c=0;c0||d<0){var h={left:[-n,0],right:[n,0],top:[0,-n],bottom:[0,n]}[x.side];e.attr("transform","translate("+h+")")}}}function p(){L=0,C=!0,z=O,M._infolayer.select("."+e).attr({"data-unformatted":z}).text(z).on("mouseover.opacity",function(){r.select(this).transition().duration(100).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(1e3).style("opacity",0)})}var g=n.propContainer,m=n.propName,v=n.traceIndex,y=n.dfltName,x=n.avoid||{},b=n.attributes,_=n.transform,w=n.containerGroup,M=t._fullLayout,k=g.titlefont.family,A=g.titlefont.size,T=g.titlefont.color,L=1,C=!1,z=g.title.trim();""===z&&(L=0),z.match(/Click to enter .+ title/)&&(L=.2,C=!0),w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var S=w.selectAll("text").data([0]);S.enter().append("text"),S.text(z).attr("class",e),S.attr({"data-unformatted":z}).call(f);var O="Click to enter "+y+" title",P=t._context.editable;P&&(g===M?P=t._context.editableMainTitle:g===M.xaxis?P=t._context.editableAxisXTitle:g===M.yaxis?P=t._context.editableAxisYTitle:g===M.yaxis2?P=t._context.editableAxisY2Title:g===M.xaxis2&&(P=t._context.editableAxisX2Title)),P?(z||p(),S.call(u.makeEditable).on("edit",function(e){void 0!==v?o.restyle(t,m,e,v):o.relayout(t,m,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(f)}).on("input",function(t){this.text(t||" ").attr(b).selectAll("tspan.line").attr(b)})):z&&!z.match(/Click to enter .+ title/)||S.remove(),S.classed("js-placeholder",C),g._titleElement=S}},{"../../lib":122,"../../lib/svg_text_utils":134,"../../plotly":145,"../../plots/plots":186,"../color":27,"../drawing":50,d3:10,"fast-isnumeric":13}],102:[function(t,e,n){"use strict";var r=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""}};e.exports={_isLinkedToArray:"updatemenu",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:l,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:o({},i,{}),font:o({},r,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":117,"../../plots/font_attributes":170,"../../plots/pad_attributes":185,"../color/attributes":26}],103:[function(t,e,n){"use strict";e.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,fontSizeToHeight:1.3,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF"}},{}],104:[function(t,e,n){"use strict";function r(t,e,n){function r(n,r){return o.coerce(t,e,l,n,r)}var i=a(t,e),s=r("visible",i.length>0);s&&(r("active"),r("direction"),r("type"),r("showactive"),r("x"),r("y"),o.noneOrAll(t,e,["x","y"]),r("xanchor"),r("yanchor"),r("pad.t"),r("pad.r"),r("pad.b"),r("pad.l"),o.coerceFont(r,"font",n.font),r("bgcolor",n.paper_bgcolor),r("bordercolor"),r("borderwidth"))}function a(t,e){function n(t,e){return o.coerce(r,a,u,t,e)}for(var r,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(c.enter().append("g").classed(T.containerClassName,!0).style("cursor","pointer"),c.exit().remove(),c.exit().size()&&y(t),0!==n.length){var u=c.selectAll("g."+T.headerGroupClassName).data(n,a);u.enter().append("g").classed(T.headerGroupClassName,!0);var f=c.selectAll("g."+T.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(T.dropdownButtonGroupClassName,!0).style("pointer-events","all"),u.enter().size()&&f.call(v).attr(T.menuIndexAttrName,"-1"),u.exit().each(function(e){x.select(this).remove(),f.call(v).attr(T.menuIndexAttrName,"-1"),b.autoMargin(t,T.autoMarginIdRoot+e._index)});for(var d=0;d",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},unicodeToEntity:{"&":"amp","<":"lt",">":"gt",'"':"quot","'":"#x27","/":"#x2F"}}},{}],109:[function(t,e,n){"use strict";n.xmlns="http://www.w3.org/2000/xmlns/",n.svg="http://www.w3.org/2000/svg",n.xlink="http://www.w3.org/1999/xlink",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],110:[function(t,e,n){"use strict";var r=t("./plotly");n.version="1.20.2-d31",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),n.plot=r.plot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.setPlotConfig=t("./plot_api/set_plot_config"),n.register=t("./plot_api/register"),n.toImage=t("./plot_api/to_image"),n.downloadImage=t("./snapshot/download"),n.validate=t("./plot_api/validate"),n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.register(t("./traces/scatter")),n.register([t("./components/legend"),t("./components/annotations"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),n.Icons=t("../build/ploticon"),n.Plots=r.Plots,n.Fx=r.Fx,n.Snapshot=t("./snapshot"),n.PlotSchema=t("./plot_api/plot_schema"),n.Queue=t("./lib/queue");var a=t("./components/color");n.colorDefaults=a.overrideColorDefaults,n.d3=t("d3")},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":25,"./components/color":27,"./components/images":62,"./components/legend":70,"./components/rangeselector":82,"./components/rangeslider":87,"./components/shapes":94,"./components/sliders":100,"./components/updatemenus":106,"./fonts/mathjax_config":111,"./lib/queue":130,"./plot_api/plot_schema":139,"./plot_api/register":140,"./plot_api/set_plot_config":141,"./plot_api/to_image":143,"./plot_api/validate":144,"./plotly":145,"./snapshot":199,"./snapshot/download":196,"./traces/scatter":244,d3:10,"es6-promise":11}],111:[function(t,e,n){"use strict";"undefined"!=typeof MathJax?(n.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):n.MathJax=!1},{}],112:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){Array.isArray(t)&&(e[n]=t[r])}},{}],113:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM,o=/^['"%,$#\s']+/,i=/['"%,$#\s']+$/;e.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"").replace(i,"")),r(t)?Number(t):a}},{"../constants/numerical":107,"fast-isnumeric":13}],114:[function(t,e,n){"use strict";var r=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../components/colorscale/get_scale"),i=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),l=/^([2-9]|[1-9][0-9]+)$/;n.valObjects={data_array:{coerceFunction:function(t,e,n){Array.isArray(t)?e.set(t):void 0!==n&&e.set(n)}},enumerated:{coerceFunction:function(t,e,n,r){r.coerceNumber&&(t=+t),r.values.indexOf(t)===-1?e.set(n):e.set(t)}},boolean:{coerceFunction:function(t,e,n){t===!0||t===!1?e.set(t):e.set(n)}},number:{coerceFunction:function(t,e,n,a){!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},integer:{coerceFunction:function(t,e,n,a){t%1||!r(t)||void 0!==a.min&&ta.max?e.set(n):e.set(+t)}},string:{coerceFunction:function(t,e,n,r){if("string"!=typeof t){var a="number"==typeof t;r.strict!==!0&&a?e.set(String(t)):e.set(n)}else r.noBlank&&!t?e.set(n):e.set(t)}},color:{coerceFunction:function(t,e,n){a(t).isValid()?e.set(t):e.set(n)}},colorscale:{coerceFunction:function(t,e,n){e.set(o(t,n))}},angle:{coerceFunction:function(t,e,n){"auto"===t?e.set("auto"):r(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(n)}},subplotid:{coerceFunction:function(t,e,n){var r=n.length;return"string"==typeof t&&t.substr(0,r)===n&&l.test(t.substr(r))?void e.set(t):void e.set(n)},validateFunction:function(t,e){var n=e.dflt,r=n.length;return t===n||"string"==typeof t&&!(t.substr(0,r)!==n||!l.test(t.substr(r)))}},flaglist:{coerceFunction:function(t,e,n,r){if("string"!=typeof t)return void e.set(n);if((r.extras||[]).indexOf(t)!==-1)return void e.set(t);for(var a=t.split("+"),o=0;o=h&&t<=p?t:s;if("string"!=typeof t&&"number"!=typeof t)return s;var e,r,a,i,l=String(t).trim().split(" ");if(l.length>2)return s;var c=l[0].split("-"),u=!0;""===c[0]&&(u=!1,c.splice(0,1));var g=c.length;if(g>3||3!==g&&l[1]||!g)return s;if(4===c[0].length)e=Number(c[0]);else{if(2!==c[0].length)return s;if(!u)return s;var m=(new Date).getFullYear();e=((Number(c[0])-m+70)%100+200)%100+m-70}if(!o(e))return s;var v=new Date(0,0,1);if(v.setFullYear(u?e:-e),c.length>1){if(r=Number(c[1])-1,c[1].length>2||!(r>=0&&r<=11))return s;if(v.setMonth(r),c.length>2){if(a=Number(c[2]),c[2].length>2||!(a>=1&&a<=31))return s;if(v.setDate(a),v.getDate()!==a)return s;if(l[1]){if(c=l[1].split(":"),c.length>3)return s;if(i=Number(c[0]),c[0].length>2||!c[0].length||!(i>=0&&i<=23))return s;if(v.setHours(i),v.getHours()!==i)return s;if(c.length>1)return a=v.getTime(),r=Number(c[1]),2===c[1].length&&r>=0&&r<=59?(a+=f*r,2===c.length?a:2!==c[2].split(".")[0].length?s:(t=Number(c[2]),t>=0&&t<60?a+t*d:s)):s}}}return v.getTime()},h=n.MIN_MS=n.dateTime2ms("-9999"),p=n.MAX_MS=n.dateTime2ms("9999-12-31 23:59:59.9999"),n.isDateTime=function(t){return n.dateTime2ms(t)!==s};var g=90*c,m=3*u,v=5*f;n.ms2DateTime=function(t,e){if("number"!=typeof t||!(t>=h&&t<=p))return s;e||(e=0);var n=new Date(Math.floor(t)),o=a.time.format("%Y-%m-%d")(n),i=e0&&(r.push(a),a=[])}return r.push(a),r},n.makeLine=function(t,e){var n={};return n=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(n.trace=e),n},n.makePolygon=function(t,e){var n={};if(1===t.length)n={type:"Polygon",coordinates:t};else{for(var r=new Array(t.length),a=0;an?Math.max(n,Math.min(e,t)):Math.max(e,Math.min(n,t))},a.bBoxIntersect=function(t,e,n){return n=n||0,t.left<=e.right+n&&e.left<=t.right+n&&t.top<=e.bottom+n&&e.top<=t.bottom+n},a.identity=function(t){return t},a.noop=function(){},a.randstr=function t(e,n,r){if(r||(r=16),void 0===n&&(n=24),n<=0)return"0";var a,o,i,l=Math.log(Math.pow(2,n))/Math.log(r),s="";for(a=2;l===1/0;a*=2)l=Math.log(Math.pow(2,n/a))/Math.log(r)*a;var c=l-Math.floor(l);for(a=0;a-1||u!==1/0&&u>=Math.pow(2,n)?t(e,n,r):s},a.OptionControl=function(t,e){t||(t={}),e||(e="opt");var n={};return n.optionList=[],n._newoption=function(r){r[e]=t,n[r.name]=r,n.optionList.push(r)},n["_"+e]=t,n},a.smooth=function(t,e){if(e=Math.round(e)||0,e<2)return t;var n,r,a,o,i=t.length,l=2*i,s=2*e-1,c=new Array(s),u=new Array(i);for(n=0;n=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=i&&(a=l-1-a),o+=t[a]*c[r];u[n]=o}return u},a.syncOrAsync=function(t,e,n){function r(){return a.syncOrAsync(t,e,n)}for(var o,i;t.length;)if(i=t.splice(0,1)[0],o=i(e),o&&o.then)return o.then(r).then(void 0,a.promiseError);return n&&n(e)},a.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},a.noneOrAll=function(t,e,n){if(t){var r,a,o=!1,i=!0;for(r=0;r1?a+i[1]:"";if(o&&(i.length>1||l.length>4||n))for(;r.test(l);)l=l.replace(r,"$1"+o+"$2");return l+s}},{"./clean_number":113,"./coerce":114,"./dates":115,"./extend":117,"./filter_unique":118,"./filter_visible":119,"./is_array":123,"./is_plain_object":124,"./loggers":125,"./matrix":126,"./nested_property":127,"./notifier":128,"./search":131,"./stats":133,d3:10}],123:[function(t,e,n){"use strict";e.exports=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)}},{}],124:[function(t,e,n){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],125:[function(t,e,n){"use strict";var r=t("../plot_api/plot_config"),a=e.exports={};a.log=function(){if(r.logging>1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(r=t[e],i=!1,d(r))for(n=r.length-1;n>=0;n--)c(r[n])?i?r[n]=void 0:r.pop():i=!0;else if("object"==typeof r&&null!==r)for(o=Object.keys(r),i=!1,n=o.length-1;n>=0;n--)c(r[o[n]])&&!a(r[o[n]],o[n])?delete r[o[n]]:i=!0;if(i)return}}function c(t){return void 0===t||null===t||"object"==typeof t&&(d(t)?!t.length:!Object.keys(t).length)}function u(t,e,n){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:n,obj:t}}var f=t("fast-isnumeric"),d=t("./is_array");e.exports=function(t,e){if(f(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var n,a,i,l=0,s=e.split(".");lo||rl)&&(!e||!c(t))}function n(t,e){var n=t[0],s=t[1];if(no||sl)return!1;var c,u,f,d,h,p=r.length,g=r[0][0],m=r[0][1],v=0;for(c=1;cMath.max(u,g)||s>Math.max(f,m)))if(su||Math.abs(r(i,d))>a)return!0;return!1};a.filter=function(t,e){function n(n){t.push(n);var l=r.length,s=a;r.splice(i+1);for(var c=s+1;c1){var l=t.pop();n(l)}return{addPt:n,raw:t,filtered:r}}},{"./matrix":126}],130:[function(t,e,n){"use strict";function r(t,e){for(var n,r=[],o=0;oo.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)))},i.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},i.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},i.undo=function(t){var e,n;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;ne}function i(t,e){return t>=e}var l=t("fast-isnumeric"),s=t("./loggers");n.findBin=function(t,e,n){if(l(e.start))return n?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var c,u,f=0,d=e.length,h=0;for(u=e[e.length-1]>=e[0]?n?r:a:n?i:o;f90&&s.log("Long binary search..."),f-1},n.sorterAsc=function(t,e){return t-e},n.sorterDes=function(t,e){return e-t},n.distinctVals=function(t){var e=t.slice();e.sort(n.sorterAsc);for(var r=e.length-1,a=e[r]-e[0]||1,o=a/(r||1)/1e4,i=[e[0]],l=0;le[l]+o&&(a=Math.min(a,e[l+1]-e[l]),i.push(e[l+1]));return{vals:i,minDiff:a}},n.roundUp=function(t,e,n){for(var r,a=0,o=e.length-1,i=0,l=n?0:1,s=n?1:0,c=n?Math.ceil:Math.floor;at.length-1)return t[t.length-1];var n=e%1;return n*t[Math.ceil(e)]+(1-n)*t[Math.floor(e)]}},{"fast-isnumeric":13}],134:[function(t,e,n){"use strict";function r(t,e){return t.node().getBoundingClientRect()[e]}function a(t){return t.replace(/(<|<|<)/g,"\\lt ").replace(/(>|>|>)/g,"\\gt ")}function o(t,e,n){var r="math-output-"+d.randstr([],64),o=f.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(a(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var e=f.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())d.log("There was an error in the tex syntax.",t),n();else{var r=o.select("svg").node().getBoundingClientRect();n(o.select(".MathJax_SVG"),e,r)}o.remove()})}function i(t,e){for(var n=t||"",r=0;r]*>)/).map(function(t){var e=t.match(/<(\/?)([^ >]*)\s*(.*)>/i),r=e&&e[2].toLowerCase(),a=g[r];if(void 0!==a){var o=e[1],i=e[3],l=i.match(/^style\s*=\s*"([^"]+)"\s*/i);if("a"===r){if(o)return"";if("href"!==i.substr(0,4).toLowerCase())return"";var c=i.substr(4).replace(/["']/g,"").replace(/=/,""),u=document.createElement("a");return u.href=c,m.indexOf(u.protocol)===-1?"":''}if("br"===r)return"
";if(o)return"sup"===r?'':"sub"===r?'':"";var f=""}return n.xml_entity_encode(t).replace(/");a>0;a=e.indexOf("
",a+1))r.push(a);var o=0;r.forEach(function(t){for(var n=t+o,r=e.slice(0,n),a="",i=r.length-1;i>=0;i--){var l=r[i].match(/<(\/?).*>/i);if(l&&"
"!==r[i]){l[1]||(a=r[i]);break}}a&&(e.splice(n+1,0,a),e.splice(n,0,""),o+=2)});var i=e.join(""),c=i.split(/
/gi);return c.length>1&&(e=c.map(function(t,e){return''+t+""})),e.join("")}function u(t,e,n){var r,a,o,i=n.horizontalAlign,l=n.verticalAlign||"top",s=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return s.bottom-r.height}:"middle"===l?function(){return s.top+(s.height-r.height)/2}:function(){return s.top},o="right"===i?function(){return s.right-r.width}:"center"===i?function(){return s.left+(s.width-r.width)/2}:function(){return s.left},function(){return r=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:o()-c.left+"px","z-index":1e3}),this}}var f=t("d3"),d=t("../lib"),h=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings");f.selection.prototype.appendSVG=function(t){for(var e=['',t,""].join(""),n=(new DOMParser).parseFromString(e,"application/xml"),r=n.documentElement.firstChild;r;)this.node().appendChild(this.node().ownerDocument.importNode(r,!0)),r=r.nextSibling;return n.querySelector("parsererror")?(d.log(n.querySelector("parsererror div").textContent),null):f.select(this.node().lastChild)},n.html_entity_decode=function(t){var e=f.select("body").append("div").style({display:"none"}).html(""),n=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":e.html(t).text()});return e.remove(),n},n.xml_entity_encode=function(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")},n.convertToTspans=function(t,e){function n(){h.empty()||(p=l.attr("class")+"-math",h.select("svg."+p).remove()),t.text("").style({visibility:"inherit","white-space":"pre"}),u=t.appendSVG(i),u||t.text(a),t.select("a").size()&&t.style("pointer-events","all"),e&&e.call(l)}var a=t.text(),i=c(a),l=t,s=!l.attr("data-notex")&&i.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),u=a,h=f.select(l.node().parentNode);if(!h.empty()){var p=l.attr("class")?l.attr("class").split(" ")[0]:"text";p+="-math",h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove(),t.style({visibility:null});for(var g=t.node();g&&g.removeAttribute;g=g.parentNode)g.removeAttribute("data-bb");if(s){var m=d.getPlotDiv(l.node());(m&&m._promises||[]).push(new Promise(function(t){l.style({visibility:"hidden"});var a={fontSize:parseInt(l.style("font-size"),10)};o(s[2],a,function(a,o,i){h.selectAll("svg."+p).remove(),h.selectAll("g."+p+"-group").remove();var s=a&&a.select("svg");if(!s||!s.node())return n(),void t();var c=h.append("g").classed(p+"-group",!0).attr({"pointer-events":"none"});c.node().appendChild(s.node()),o&&o.node()&&s.node().insertBefore(o.node().cloneNode(!0),s.node().firstChild),s.attr({class:p,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=l.style("fill")||"black";s.select("g").attr({fill:u,stroke:u});var f=r(s,"width"),d=r(s,"height"),g=+l.attr("x")-f*{start:0,middle:.5,end:1}[l.attr("text-anchor")||"start"],m=parseInt(l.style("font-size"),10)||r(l,"height"),v=-m/4;"y"===p[0]?(c.attr({transform:"rotate("+[-90,+l.attr("x"),+l.attr("y")]+") translate("+[-f/2,v-d/2]+")"}),s.attr({x:+l.attr("x"),y:+l.attr("y")})):"l"===p[0]?s.attr({x:l.attr("x"),y:v-d/2}):"a"===p[0]?s.attr({x:0,y:v}):s.attr({x:g,y:+l.attr("y")+v-d/2}),e&&e.call(l,c),t(c)})}))}else n();return t}};var g={sup:'font-size:70%" dy="-0.6em',sub:'font-size:70%" dy="0.3em',b:"font-weight:bold",i:"font-style:italic",a:"",span:"",br:"",em:"font-style:italic;font-weight:bold"},m=["http:","https:","mailto:"],v=new RegExp("]*)?/?>","g"),y=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),x=Object.keys(p.unicodeToEntity).map(function(t){return{regExp:new RegExp(t,"g"),sub:"&"+p.unicodeToEntity[t]+";"}});n.plainText=function(t){return(t||"").replace(v," ")},n.makeEditable=function(t,e,n){function r(){o(),i.style({opacity:0});var t,e=c.attr("class");t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]",t&&f.select(i.node().parentNode).select(t).style({opacity:0})}function a(t){var e=t.node(),n=document.createRange();n.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),e.focus()}function o(){var t=f.select(d.getPlotDiv(i.node())),e=t.select(".svg-container"),r=e.append("div");r.classed("plugin-editable editable",!0).style({position:"absolute","font-family":i.style("font-family")||"Arial","font-size":i.style("font-size")||12,color:n.fill||i.style("fill")||"black",opacity:1,"background-color":n.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(i.style("font-size"))/8+1,0,0,-1].join("px ")+"px", -padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(n.text||i.attr("data-unformatted")).call(u(i,e,n)).on("blur",function(){i.text(this.textContent).style({opacity:1});var t,e=f.select(this).attr("class");t=e?"."+e.split(" ")[0]+"-math-group":"[class*=-math-group]",t&&f.select(i.node().parentNode).select(t).style({opacity:0});var n=this.textContent;f.select(this).transition().duration(0).remove(),f.select(document).on("mouseup",null),l.edit.call(i,n)}).on("focus",function(){var t=this;f.select(document).on("mouseup",function(){return f.event.target!==t&&void(document.activeElement===r.node()&&r.node().blur())})}).on("keyup",function(){27===f.event.which?(i.style({opacity:1}),f.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),l.cancel.call(i,this.textContent)):(l.input.call(i,this.textContent),f.select(this).call(u(i,e,n)))}).on("keydown",function(){13===f.event.which&&this.blur()}).call(a)}n||(n={});var i=this,l=f.dispatch("edit","input","cancel"),s=f.select(this.node()).style({"pointer-events":"all"}),c=e||s;return e&&s.style({"pointer-events":"none"}),n.immediate?r():c.on("click",r),f.rebind(this,l,"on")}},{"../constants/string_mappings":108,"../constants/xmlns_namespaces":109,"../lib":122,d3:10}],135:[function(t,e,n){"use strict";var r=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,o=t("topojson-client").feature;r.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(t,e){return t+e+".json"},r.getTopojsonFeatures=function(t,e){var n=a[t.locationmode],r=e.objects[n];return o(e,r).features}},{"../plots/geo/constants":172,"topojson-client":17}],136:[function(t,e,n){"use strict";function r(t,e){var n=t[e],r=e.charAt(0);n&&"paper"!==n&&(t[e]=f.cleanId(n,r))}function a(t){var e="middle",n="center";return t.indexOf("top")!==-1?e="top":t.indexOf("bottom")!==-1&&(e="bottom"),t.indexOf("left")!==-1?n="left":t.indexOf("right")!==-1&&(n="right"),e+" "+n}function o(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}var i=t("fast-isnumeric"),l=t("gl-mat4/fromQuat"),s=t("../registry"),c=t("../lib"),u=t("../plots/plots"),f=t("../plots/cartesian/axes"),d=t("../components/color");n.getGraphDiv=function(t){var e;if("string"==typeof t){if(e=document.getElementById(t),null===e)throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},n.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},n.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=f.list({_fullLayout:t});for(e=0;e3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=u.getSubplotIds(t,"gl3d");for(e=0;e=t.data.length||a<-t.data.length)throw new Error(n+" must be valid indices for gd.data.");if(e.indexOf(a,r+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function s(t,e,n){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),"undefined"==typeof n||Array.isArray(n)||(n=[n]),"undefined"!=typeof n&&l(t,n,"newIndices"),"undefined"!=typeof n&&e.length!==n.length)throw new Error("current and new indices must be of equal length.")}function c(t,e,n){var r,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),r=0;r=0&&sO.range[0]?[1,2]:[2,1]);else{var P=O.range[0],E=O.range[1];"log"===b?(P<=0&&E<=0&&n(L+".autorange",!0),P<=0?P=E/1e6:E<=0&&(E=P/1e6),n(L+".range[0]",Math.log(P)/Math.LN10),n(L+".range[1]",Math.log(E)/Math.LN10)):(n(L+".range[0]",Math.pow(10,P)),n(L+".range[1]",Math.pow(10,E)))}else n(L+".autorange",!0)}if("reverse"===A)C.range?C.range.reverse():(n(L+".autorange",!0),C.range=[1,0]),z.autorange?h.docalc=!0:h.doplot=!0;else if("annotations"===v.parts[0]||"shapes"===v.parts[0]){var N=v.parts[1],D=v.parts[0],R=o[D]||[],j=R[N]||{};2===v.parts.length&&(null===b&&(e[m]="remove"),"add"===e[m]||x.isPlainObject(e[m])?g[m]="remove":"remove"===e[m]?N===-1?(g[D]=R,delete g[m]):g[m]=j:x.log("???",e)),!r(j,"x")&&!r(j,"y")||x.containsAny(m,["color","opacity","align","dash"])||(h.docalc=!0);var I=w.getComponentMethod(D,"drawOne");I(t,N,v.parts.slice(2).join("."),e[m]),delete e[m]}else if(M.layoutArrayContainers.indexOf(v.parts[0])!==-1||"mapbox"===v.parts[0]&&"layers"===v.parts[1])S.manageArrayContainers(v,b,g),h.doplot=!0;else{var F=String(v.parts[1]||"");0===v.parts[0].indexOf("scene")?h.doplot=!0:0===v.parts[0].indexOf("geo")?h.doplot=!0:0===v.parts[0].indexOf("ternary")?h.doplot=!0:"paper_bgcolor"===m?h.doplot=!0:!i._has("gl2d")||m.indexOf("axis")===-1&&"plot_bgcolor"!==v.parts[0]?"hiddenlabels"===m?h.docalc=!0:v.parts[0].indexOf("legend")!==-1?h.dolegend=!0:m.indexOf("title")!==-1?h.doticks=!0:v.parts[0].indexOf("bgcolor")!==-1?h.dolayoutstyle=!0:v.parts.length>1&&x.containsAny(F,["tick","exponent","grid","zeroline"])?h.doticks=!0:m.indexOf(".linewidth")!==-1&&m.indexOf("axis")!==-1?h.doticks=h.dolayoutstyle=!0:v.parts.length>1&&F.indexOf("line")!==-1?h.dolayoutstyle=!0:v.parts.length>1&&"mirror"===F?h.doticks=h.dolayoutstyle=!0:"margin.pad"===m?h.doticks=h.dolayoutstyle=!0:"margin"===v.parts[0]||"autorange"===v.parts[1]||"rangemode"===v.parts[1]||"type"===v.parts[1]||"domain"===v.parts[1]||m.match(/^(bar|box|font)/)?h.docalc=!0:["hovermode","dragmode"].indexOf(m)!==-1?h.domodebar=!0:["hovermode","dragmode","height","width","autosize"].indexOf(m)===-1&&(h.doplot=!0):h.doplot=!0,v.set(b)}}}var B=t._fullLayout.width,q=t._fullLayout.height;M.supplyDefaults(t),t.layout.autosize&&M.plotAutoSize(t,t.layout,t._fullLayout);var H=e.height||e.width||t._fullLayout.width!==B||t._fullLayout.height!==q;return H&&(h.docalc=!0),(h.doplot||h.docalc)&&(h.layoutReplot=!0),{flags:h,undoit:g,redoit:p,eventData:x.extendDeep({},p)}}function g(t){var e=m.select(t),n=t._fullLayout;if(n._container=e.selectAll(".plot-container").data([0]),n._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),n._paperdiv=n._container.selectAll(".svg-container").data([0]),n._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),n._glcontainer=n._paperdiv.selectAll(".gl-container").data([0]),n._glcontainer.enter().append("div").classed("gl-container",!0),n._geocontainer=n._paperdiv.selectAll(".geo-container").data([0]),n._geocontainer.enter().append("div").classed("geo-container",!0),n._paperdiv.selectAll(".main-svg").remove(),n._paper=n._paperdiv.insert("svg",":first-child").classed("main-svg",!0),n._toppaper=n._paperdiv.append("svg").classed("main-svg",!0),!n._uid){var r=[];m.selectAll("defs").each(function(){this.id&&r.push(this.id.split("-")[1])}),n._uid=x.randstr(r)}n._paperdiv.selectAll(".main-svg").attr(C.svgAttrs),n._defs=n._paper.append("defs").attr("id","defs-"+n._uid),n._topdefs=n._toppaper.append("defs").attr("id","topdefs-"+n._uid),n._draggers=n._paper.append("g").classed("draglayer",!0);var a=n._paper.append("g").classed("layer-below",!0);n._imageLowerLayer=a.append("g").classed("imagelayer",!0),n._shapeLowerLayer=a.append("g").classed("shapelayer",!0),n._cartesianlayer=n._paper.append("g").classed("cartesianlayer",!0),n._ternarylayer=n._paper.append("g").classed("ternarylayer",!0);var o=n._paper.append("g").classed("layer-above",!0);n._imageUpperLayer=o.append("g").classed("imagelayer",!0),n._shapeUpperLayer=o.append("g").classed("shapelayer",!0),n._pielayer=n._paper.append("g").classed("pielayer",!0),n._glimages=n._paper.append("g").classed("glimages",!0),n._geoimages=n._paper.append("g").classed("geoimages",!0),n._infolayer=n._toppaper.append("g").classed("infolayer",!0),n._zoomlayer=n._toppaper.append("g").classed("zoomlayer",!0),n._hoverlayer=n._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var m=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),x=t("../lib"),b=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),L=t("../components/errorbars"),C=t("../constants/xmlns_namespaces"),z=t("../lib/svg_text_utils"),S=t("./helpers"),O=t("./subroutines");y.plot=function(t,e,n,r){function i(){if(_)return y.addFrames(t,_)}function l(){for(var e=P._basePlotModules,n=0;n0&&c.log("Clearing previous rejected promises from queue."),t._promises=[]},n.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=f.list({_fullLayout:t});for(e=0;e3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=u.getSubplotIds(t,"gl3d");for(e=0;e=t.data.length||a<-t.data.length)throw new Error(n+" must be valid indices for gd.data.");if(e.indexOf(a,r+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function s(t,e,n){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),"undefined"==typeof n||Array.isArray(n)||(n=[n]),"undefined"!=typeof n&&l(t,n,"newIndices"),"undefined"!=typeof n&&e.length!==n.length)throw new Error("current and new indices must be of equal length.")}function c(t,e,n){var r,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),r=0;r=0&&sO.range[0]?[1,2]:[2,1]);else{var P=O.range[0],E=O.range[1];"log"===b?(P<=0&&E<=0&&n(L+".autorange",!0),P<=0?P=E/1e6:E<=0&&(E=P/1e6),n(L+".range[0]",Math.log(P)/Math.LN10),n(L+".range[1]",Math.log(E)/Math.LN10)):(n(L+".range[0]",Math.pow(10,P)),n(L+".range[1]",Math.pow(10,E)))}else n(L+".autorange",!0)}if("reverse"===A)C.range?C.range.reverse():(n(L+".autorange",!0),C.range=[1,0]),z.autorange?h.docalc=!0:h.doplot=!0;else if("annotations"===v.parts[0]||"shapes"===v.parts[0]){var N=v.parts[1],D=v.parts[0],R=o[D]||[],j=R[N]||{};2===v.parts.length&&(null===b&&(e[m]="remove"),"add"===e[m]||x.isPlainObject(e[m])?g[m]="remove":"remove"===e[m]?N===-1?(g[D]=R,delete g[m]):g[m]=j:x.log("???",e)),!r(j,"x")&&!r(j,"y")||x.containsAny(m,["color","opacity","align","dash"])||(h.docalc=!0);var I=w.getComponentMethod(D,"drawOne");I(t,N,v.parts.slice(2).join("."),e[m]),delete e[m]}else if(M.layoutArrayContainers.indexOf(v.parts[0])!==-1||"mapbox"===v.parts[0]&&"layers"===v.parts[1])S.manageArrayContainers(v,b,g),h.doplot=!0;else{var F=String(v.parts[1]||"");0===v.parts[0].indexOf("scene")?h.doplot=!0:0===v.parts[0].indexOf("geo")?h.doplot=!0:0===v.parts[0].indexOf("ternary")?h.doplot=!0:"paper_bgcolor"===m?h.doplot=!0:!i._has("gl2d")||m.indexOf("axis")===-1&&"plot_bgcolor"!==v.parts[0]?"hiddenlabels"===m?h.docalc=!0:v.parts[0].indexOf("legend")!==-1?h.dolegend=!0:m.indexOf("title")!==-1?h.doticks=!0:v.parts[0].indexOf("bgcolor")!==-1?h.dolayoutstyle=!0:v.parts.length>1&&x.containsAny(F,["tick","exponent","grid","zeroline"])?h.doticks=!0:m.indexOf(".linewidth")!==-1&&m.indexOf("axis")!==-1?h.doticks=h.dolayoutstyle=!0:v.parts.length>1&&F.indexOf("line")!==-1?h.dolayoutstyle=!0:v.parts.length>1&&"mirror"===F?h.doticks=h.dolayoutstyle=!0:"margin.pad"===m?h.doticks=h.dolayoutstyle=!0:"margin"===v.parts[0]||"autorange"===v.parts[1]||"rangemode"===v.parts[1]||"type"===v.parts[1]||"domain"===v.parts[1]||m.match(/^(bar|box|font)/)?h.docalc=!0:["hovermode","dragmode"].indexOf(m)!==-1?h.domodebar=!0:["hovermode","dragmode","height","width","autosize"].indexOf(m)===-1&&(h.doplot=!0):h.doplot=!0,v.set(b)}}}var B=t._fullLayout.width,q=t._fullLayout.height;M.supplyDefaults(t),t.layout.autosize&&M.plotAutoSize(t,t.layout,t._fullLayout);var H=e.height||e.width||t._fullLayout.width!==B||t._fullLayout.height!==q;return H&&(h.docalc=!0),(h.doplot||h.docalc)&&(h.layoutReplot=!0),{flags:h,undoit:g,redoit:p,eventData:x.extendDeep({},p)}}function g(t){var e=m.select(t),n=t._fullLayout;if(n._container=e.selectAll(".plot-container").data([0]),n._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),n._paperdiv=n._container.selectAll(".svg-container").data([0]),n._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),n._glcontainer=n._paperdiv.selectAll(".gl-container").data([0]),n._glcontainer.enter().append("div").classed("gl-container",!0),n._geocontainer=n._paperdiv.selectAll(".geo-container").data([0]),n._geocontainer.enter().append("div").classed("geo-container",!0),n._paperdiv.selectAll(".main-svg").remove(),n._paper=n._paperdiv.insert("svg",":first-child").classed("main-svg",!0),n._toppaper=n._paperdiv.append("svg").classed("main-svg",!0),!n._uid){var r=[];m.selectAll("defs").each(function(){this.id&&r.push(this.id.split("-")[1])}),n._uid=x.randstr(r)}n._paperdiv.selectAll(".main-svg").attr(C.svgAttrs),n._defs=n._paper.append("defs").attr("id","defs-"+n._uid),n._topdefs=n._toppaper.append("defs").attr("id","topdefs-"+n._uid),n._draggers=n._paper.append("g").classed("draglayer",!0);var a=n._paper.append("g").classed("layer-below",!0);n._imageLowerLayer=a.append("g").classed("imagelayer",!0),n._shapeLowerLayer=a.append("g").classed("shapelayer",!0),n._cartesianlayer=n._paper.append("g").classed("cartesianlayer",!0),n._ternarylayer=n._paper.append("g").classed("ternarylayer",!0);var o=n._paper.append("g").classed("layer-above",!0);n._imageUpperLayer=o.append("g").classed("imagelayer",!0),n._shapeUpperLayer=o.append("g").classed("shapelayer",!0),n._pielayer=n._paper.append("g").classed("pielayer",!0),n._glimages=n._paper.append("g").classed("glimages",!0),n._geoimages=n._paper.append("g").classed("geoimages",!0),n._infolayer=n._toppaper.append("g").classed("infolayer",!0),n._zoomlayer=n._toppaper.append("g").classed("zoomlayer",!0),n._hoverlayer=n._toppaper.append("g").classed("hoverlayer",!0),t.emit("plotly_framework")}var m=t("d3"),v=t("fast-isnumeric"),y=t("../plotly"),x=t("../lib"),b=t("../lib/events"),_=t("../lib/queue"),w=t("../registry"),M=t("../plots/plots"),k=t("../plots/cartesian/graph_interact"),A=t("../plots/polar"),T=t("../components/drawing"),L=t("../components/errorbars"),C=t("../constants/xmlns_namespaces"),z=t("../lib/svg_text_utils"),S=t("./helpers"),O=t("./subroutines");y.plot=function(t,e,n,r){function i(){if(_)return y.addFrames(t,_)}function l(){for(var e=P._basePlotModules,n=0;n=l.length?l[0]:l[t]:l}function a(t){return Array.isArray(s)?t>=s.length?s[0]:s[t]:s}function o(t,e){var n=0;return function(){if(t&&++n===e)return t()}}if(t=S.getGraphDiv(t),!x.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var i=t._transitionData;i._frameQueue||(i._frameQueue=[]),n=M.supplyAnimationDefaults(n);var l=n.transition,s=n.frame;return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise(function(s,c){function u(){if(0!==i._frameQueue.length){for(;i._frameQueue.length;){var e=i._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit("plotly_animationinterrupted",[])}}function f(e){if(0!==e.length){for(var l=0;li._timeToNext&&h()};e()}function g(t){return Array.isArray(l)?y>=l.length?t.transitionOpts=l[y]:t.transitionOpts=l[0]:t.transitionOpts=l,y++,t}var m,v,y=0,b=[],_=void 0===e||null===e,w=Array.isArray(e),k=!_&&!w&&x.isPlainObject(e);if(k)b.push({type:"object",data:g(x.extendFlat({},e))});else if(_||"string"==typeof e)for(m=0;m0&&LL)&&C.push(v);b=C}}b.length>0?f(b):(t.emit("plotly_animated"),s())})},y.addFrames=function(t,e,n){if(t=S.getGraphDiv(t),null===e||void 0===e)return Promise.resolve();if(!x.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/");var r,a,o,i,l=t._transitionData._frames,s=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var c=l.length+2*e.length,u=[];for(r=e.length-1;r>=0;r--)u.push({frame:M.supplyFrameDefaults(e[r]),index:n&&void 0!==n[r]&&null!==n[r]?n[r]:c+r});u.sort(function(t,e){return t.index>e.index?-1:t.index=0;r--){if(a=u[r].frame,!a.name)for(;s[a.name="frame "+t._transitionData._counter++];);if(s[a.name]){for(o=0;o=0;n--)r=e[n],o.push({type:"delete",index:r}),i.unshift({type:"insert",index:r,value:a[r]});var l=M.modifyFrames,s=M.modifyFrames,c=[t,i],u=[t,o];return _&&_.add(t,l,c,s,u),M.modifyFrames(t,o)},y.purge=function(t){t=S.getGraphDiv(t);var e=t._fullLayout||{},n=t._fullData||[];return M.cleanPlot([],{},n,e),M.purge(t),b.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":50,"../components/errorbars":56,"../constants/xmlns_namespaces":109,"../lib":122,"../lib/events":116,"../lib/queue":130,"../lib/svg_text_utils":134,"../plotly":145,"../plots/cartesian/graph_interact":157,"../plots/plots":186,"../plots/polar":189,"../registry":194,"./helpers":136,"./subroutines":142,d3:10,"fast-isnumeric":13}],138:[function(t,e,n){"use strict";function r(t,n){try{t._fullLayout._paper.style("background",n)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,editableMainTitle:!0,editableAxisXTitle:!0,editableAxisX2Title:!0,editableAxisYTitle:!0,editableAxisY2Title:!0,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:r,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],139:[function(t,e,n){"use strict";function r(t){var e,n;"area"===t?(e={attributes:y},n={}):(e=d.modules[t]._module,n=e.basePlotModule);var r={};r.type=null,_(r,p),_(r,e.attributes),n.attributes&&_(r,n.attributes),r.type=t;var a={meta:e.meta||{},attributes:i(r)};if(e.layoutAttributes){var o={};_(o,e.layoutAttributes),a.layoutAttributes=i(o)}return a}function a(){var t={};return _(t,g),Object.keys(d.subplotsRegistry).forEach(function(e){var n=d.subplotsRegistry[e];if(n.layoutAttributes)if("cartesian"===n.name)u(t,n,"xaxis"),u(t,n,"yaxis");else{var r="subplot"===n.attr?n.name:n.attr;u(t,n,r)}}),t=c(t),Object.keys(d.componentsRegistry).forEach(function(e){var n=d.componentsRegistry[e];n.layoutAttributes&&(Array.isArray(n.layoutNodes)?n.layoutNodes.forEach(function(e){f(t,n,e+n.name)}):f(t,n,n.name))}),{layoutAttributes:i(t)}}function o(t){var e=d.transformsRegistry[t];return{attributes:i(e.attributes)}}function i(t){return l(t),s(t),t}function l(t){function e(t){return{valType:"string"}}function r(t,r,a){n.isValObject(t)?"data_array"===t.valType?(t.role="data",a[r+"src"]=e(r)):t.arrayOk===!0&&(a[r+"src"]=e(r)):h.isPlainObject(t)&&(t.role="object")}n.crawl(t,r)}function s(t){function e(t,e,n){if(t){var r=t[M];r&&(delete t[M],n[e]={items:{}},n[e].items[r]=t,n[e].role="object")}}n.crawl(t,e)}function c(t){return b(t,{radialaxis:x.radialaxis,angularaxis:x.angularaxis}),b(t,x.layout),t}function u(t,e,n){var r=h.nestedProperty(t,n),a=_({},e.layoutAttributes);a[w]=!0,r.set(a)}function f(t,e,n){var r=h.nestedProperty(t,n),a=_(r.get()||{},e.layoutAttributes);r.set(a)}var d=t("../registry"),h=t("../lib"),p=t("../plots/attributes"),g=t("../plots/layout_attributes"),m=t("../plots/frame_attributes"),v=t("../plots/animation_attributes"),y=t("../plots/polar/area_attributes"),x=t("../plots/polar/axis_attributes"),b=h.extendFlat,_=h.extendDeep,w="_isSubplotObj",M="_isLinkedToArray",k="_deprecated",A=[w,M,k];n.IS_SUBPLOT_OBJ=w,n.IS_LINKED_TO_ARRAY=M,n.DEPRECATED=k,n.UNDERSCORE_ATTRS=A,n.get=function(){var t={};d.allTypes.concat("area").forEach(function(e){t[e]=r(e)});var e={};return Object.keys(d.transformsRegistry).forEach(function(t){e[t]=o(t)}),{defs:{valObjects:h.valObjects,metaKeys:A.concat.role},traces:t,layout:a(),transforms:e,frames:i(m),animation:i(v)}},n.crawl=function(t,e,r){var a=r||0;Object.keys(t).forEach(function(r){var o=t[r];A.indexOf(r)===-1&&(e(o,r,t,a),n.isValObject(o)||h.isPlainObject(o)&&n.crawl(o,e,a+1))})},n.isValObject=function(t){return t&&void 0!==t.valType},n.findArrayAttributes=function(t){function e(e,n,i,l){o=o.slice(0,l).concat([n]);var s="data_array"===e.valType||e.arrayOk===!0;if(s){var c=r(o),u=h.nestedProperty(t,c).get();Array.isArray(u)&&a.push(c)}}function r(t){return t.join(".")}var a=[],o=[];if(n.crawl(t._module.attributes,e),t.transforms)for(var i=t.transforms,l=0;l1)};d(e.width)&&d(e.height)||r(new Error("Height and width should be pixel values."));var h=s(t,{format:"png",height:e.height,width:e.width}),p=h.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=l.getRedrawFunc(p);o.plot(p,h.data,h.layout,h.config).then(g).then(f).then(function(t){n(t)}).catch(function(t){r(t)})});return n}var a=t("fast-isnumeric"),o=t("../plotly"),i=t("../lib"),l=t("../snapshot/helpers"),s=t("../snapshot/cloneplot"),c=t("../snapshot/tosvg"),u=t("../snapshot/svgtoimg");e.exports=r},{"../lib":122,"../plotly":145,"../snapshot/cloneplot":195,"../snapshot/helpers":198,"../snapshot/svgtoimg":200,"../snapshot/tosvg":202,"fast-isnumeric":13}],144:[function(t,e,n){"use strict";function r(t,e,n,a,o,c){c=c||[];for(var u=Object.keys(t),d=0;d1&&s.push(i("object","layout"))),d.supplyDefaults(c);for(var u=c._fullData,m=n.length,v=0;vu&&e10||"01-01"!==r.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12===0?"y":"m";else if(e>=O&&a<=10||e>=15*O)t._tickround="d";else if(e>=E&&a<=16||e>=P)t._tickround="M";else if(e>=N&&a<=19||e>=E)t._tickround="S";else{var o=w.ms2DateTime(n+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20}}else if(x(e)||"L"===e.charAt(0)){var i=t.range.map(t.r2d||Number);x(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),s=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(s)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}function i(t,e){var n=t.match(W),r=new Date(e);if(n){var a=Math.min(+n[1]||6,6),o=String(e/1e3%1+2.0000005).substr(2,a).replace(/0+$/,"")||"0";return y.time.format(t.replace(W,o))(r)}return y.time.format(t)(r)}function l(t,e,n){var r=t.tickfont||t._gd._fullLayout.font;return{x:e,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}function s(t,e,n,r){var a,o,l=e.x,s=t._tickround,c=s,u=new Date(l);n&&t.hoverformat?o=i(t.hoverformat,l):t.tickformat?o=i(t.tickformat,l):(r&&(x(s)?s+=2:s={y:"m",m:"d",d:"M",M:"S",S:2}[s]),"y"===s?o=V(u):"m"===s?o=G(u):"d"===s?(n||(a="
"+V(u)),o=U(u)):(n||(a="
"+X(u)),o=Y(u),"M"!==s?(o+=Z(u),"S"!==s&&(o+=d(y.round(v(l/1e3,1),4),t,"none",n).substr(1))):"d"===c&&(o=U(u)+" "+o))),!a||t._inCalcTicks&&a===t._prevSuffix||(o+=a,t._prevSuffix=a),e.text=o}function c(t,e,n,r,a){var o=t.dtick,i=e.x;if(!r||"string"==typeof o&&"L"===o.charAt(0)||(o="L3"),t.tickformat||"string"==typeof o&&"L"===o.charAt(0))e.text=d(Math.pow(10,i),t,a,r);else if(x(o)||"D"===o.charAt(0)&&v(i+.01,1)<.1)if(["e","E","power"].indexOf(t.exponentformat)!==-1){var l=Math.round(i);0===l?e.text=1:1===l?e.text="10":l>1?e.text="10"+l+"":e.text="10\u2212"+-l+"",e.fontSize*=1.25}else e.text=d(Math.pow(10,i),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,v(i,1)))),e.fontSize*=.75}if("D1"===t.dtick){var s=String(e.text).charAt(0);"0"!==s&&"1"!==s||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(i<0?.5:.25)))}}function u(t,e){var n=t._categories[Math.round(e.x)];void 0===n&&(n=""),e.text=String(n)}function f(t,e,n,r,a){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=d(e.x,t,a,r)}function d(t,e,n,r){var a=t<0,i=e._tickround,l=n||e.exponentformat||"B",s=e._tickexponent,c=e.tickformat,u=e.separatethousands;if(r){var f={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:x(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};o(f),i=(Number(f._tickround)||0)+4,s=f._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return y.format(c)(t).replace(/-/g,"\u2212");var d=Math.pow(10,-i)/2;if("none"===l&&(s=0),t=Math.abs(t),t12||s<-15)?t+="e"+g:"E"===l?t+="E"+g:"power"===l?t+="\xd710"+g+"":"B"===l&&9===s?t+="B":"SI"!==l&&"B"!==l||(t+=Q[s/3+5])}return a?"\u2212"+t:t}function h(t,e){var n,r,a=[];for(n=0;n1)for(r=1;r2e-6||((n-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},D.getAutoRange=function(t){var e,n=[],r=t._min[0].val,a=t._max[0].val;for(e=1;e0&&u>0&&f/u>d&&(s=i,c=l,d=f/u);if(r===a){var g=r-1,m=r+1;n="tozero"===t.rangemode?r<0?[g,0]:[0,m]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,m)]:[g,m]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),d=(c.val-s.val)/(t._length-s.pad-c.pad)),n=[s.val-d*s.pad,c.val+d*c.pad]);return n[0]===n[1]&&("tozero"===t.rangemode?n=n[0]<0?[n[0],0]:n[0]>0?[0,n[0]]:[0,1]:(n=[n[0]-1,n[0]+1],"nonnegative"===t.rangemode&&(n[0]=Math.max(0,n[0])))),h&&n.reverse(),n.map(t.l2r||Number)},D.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=D.getAutoRange(t);var n=t._gd.layout[t._name];n||(t._gd.layout[t._name]=n={}),n!==t&&(n.range=t.range.slice(),n.autorange=t.autorange)}},D.saveRangeInitial=function(t,e){for(var n=D.list(t,"",!0),r=!1,a=0;a=d?h=!1:l.val>=c&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:c,pad:y&&0===c?0:d})}if(r(u)){for(h=!0,i=0;i=u&&l.pad>=f?h=!1:l.val<=u&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:u,pad:y&&0===u?0:f})}}}if((t.autorange||t._needsExpand)&&e){t._min||(t._min=[]),t._max||(t._max=[]),n||(n={}),t._m||t.setScale();var o,i,l,s,c,u,f,d,h,p,g,m=e.length,v=n.padded?.05*t._length:0,y=n.tozero&&("linear"===t.type||"-"===t.type),b=r((t._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),_=r((t._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),w=r(n.vpadplus||n.vpad),M=r(n.vpadminus||n.vpad);for(o=0;o<6;o++)a(o);for(o=m-1;o>5;o--)a(o)}},D.autoBin=function(t,e,n,r){function a(t){return(1+100*(t-h)/f.dtick)%100<2}var o=w.aggNums(Math.min,null,t),i=w.aggNums(Math.max,null,t);if("category"===e.type)return{start:o-.5,end:i+.5,size:1};var l;if(n)l=(i-o)/n;else{var s=w.distinctVals(t),c=Math.pow(10,Math.floor(Math.log(s.minDiff)/Math.LN10)),u=c*w.roundUp(s.minDiff/c,[.9,1.9,4.9,9.9],!0);l=Math.max(u,2*w.stdev(t)/Math.pow(t.length,r?.25:.4))}var f;f="log"===e.type?{type:"linear",range:[o,i],r2l:Number}:{type:e.type,range:[o,i].map(e.l2r),r2l:e.r2l},D.autoTicks(f,l);var d,h=D.tickIncrement(D.tickFirst(f),f.dtick,"reverse");if("number"==typeof f.dtick){for(var p=0,g=0,m=0,v=0,y=0;y.3*b||a(o)||a(i))){var _=f.dtick/2;h+=h+_0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),o(t),t._tmin=D.tickFirst(t);var i=e[1]=s:c<=s)&&(l.push(c),!(l.length>1e3));c=D.tickIncrement(c,t.dtick,i));t._tmax=l[l.length-1],t._prevSuffix="",t._inCalcTicks=!0;for(var u=new Array(l.length),f=0;fz?(e/=z,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*a(e,n,j)):r>S?(e/=S,t.dtick="M"+a(e,1,I)):r>O?(t.dtick=a(e,O,B),t.tick0="2000-01-02"):r>P?t.dtick=a(e,P,I):r>E?t.dtick=a(e,E,F):r>N?t.dtick=a(e,N,F):(n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=a(e,n,j))}else if("log"===t.type){t.tick0=0;var o=t.range.map(t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var i=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/i,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+a(e,n,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=a(e,n,j));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},D.tickIncrement=function(t,e,n){var r=n?-1:1;if(x(e))return t+r*e;var a=e.charAt(0),o=r*Number(e.substr(1));if("M"===a){var i=new Date(t);return i.setMonth(i.getMonth()+o)}if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var l="D2"===e?H:q,s=t+.01*r,c=w.roundUp(v(s,1),l,n);return Math.floor(s)+Math.log(y.round(Math.pow(10,c),1))/Math.LN10}throw"unrecognized dtick "+String(e)},D.tickFirst=function(t){var e=t.r2l||Number,n=t.range.map(e),r=n[1]o:f1&&er){var o=t.text,i=Math.round(r/(a/o.length)),l=Math.floor(i/2),s=i-l-1;o=o.substr(0,l)+"\u2026"+o.substr(-s);var u=e.select("text");u.text(o),e.insert("title","text").text(t.text)}})}function u(){var e,n,r=c._boundingBox,a=0,o=0;if("x"===c._id.charAt(0)?(e="height","2"===c._id.charAt(1)?(o=1,n="t"):n="b"):"y"===c._id.charAt(0)&&(e="width","2"===c._id.charAt(1)?(a=1,n="r"):n="l"),e&&n){var i=r[e];if(c._titleElement){var l=c._titleElement.node().getBoundingClientRect();i+=l[e]+2}var s=.5*t._fullLayout[e];i=Math.min(i,s);var u={x:a,y:o,l:0,r:0,b:0,t:0};u[n]=i,_.autoMargin(t,c._name,u)}}function f(){c._boundingBox=n.node().getBoundingClientRect()}n.style("pointer-events","all");var d=n.selectAll("g."+O).data(z,S);if(!c.showticklabels||!x(r))return d.remove(),void i(e);var h,p,m,b,k;"x"===L?(k="bottom"===V?1:-1,h=function(t){return t.dx+I*k},b=r+(j+N)*k,p=function(t){return t.dy+b+t.fontSize*("bottom"===V?1:-.5)},m=function(t){return x(t)&&0!==t&&180!==t?t*k<0?"end":"start":"middle"}):(k="right"===V?1:-1,p=function(t){return t.dy+t.fontSize/2-I*k},h=function(t){return t.dx+r+(j+N+(90===Math.abs(c.tickangle)?t.fontSize/2:0))*k},m=function(t){return x(t)&&90===Math.abs(t)?"middle":"right"===V?"start":"end"});var A=0,C=0,P=[],E=d.enter().append("g").classed(O,1);E.append("text").attr("text-anchor","middle").each(function(e){var n=y.select(this),r=t._promises.length;n.call(T.setPosition,h(e),p(e)).call(T.font,e.font,e.fontSize,e.fontColor).text(e.text).call(M.convertToTspans),r=t._promises[r],r?P.push(t._promises.pop().then(function(){a(n,c.tickangle)})):a(n,c.tickangle)}),d.exit().remove(),d.each(function(t){A=Math.max(A,t.fontSize)}),a(d,c._lastangle||c.tickangle);var D=w.syncOrAsync([o,l,f,u]);return D&&D.then&&t._promises.push(D),D}function i(e){if(!n){var r,a,o,i,l=R.getFromId(t,e),s=y.select(t).selectAll("g."+e+"tick"),c={selection:s,side:l.side},f=e.charAt(0),d=t._fullLayout._size,h=1.5,p=l.titlefont.size;if(s.size()){var g=y.select(s.node().parentNode).attr("transform").match(/translate\(([-\.\d]+),([-\.\d]+)\)/);g&&(c.offsetLeft=+g[1],c.offsetTop=+g[2])}"x"===f?(a="free"===l.anchor?{_offset:d.t+(1-(l.position||0))*d.h,_length:0}:R.getFromId(t,l.anchor),o=l._offset+l._length/2,i=a._offset+("top"===l.side?-10-p*(h+(l.showticklabels?1:0)):a._length+10+p*(h+(l.showticklabels?1.5:.5))),l.rangeslider&&l.rangeslider.visible&&l._boundingBox&&(i+=(u.height-u.margin.b-u.margin.t)*l.rangeslider.thickness+l._boundingBox.height),c.side||(c.side="bottom")):(a="free"===l.anchor?{_offset:d.l+(l.position||0)*d.w,_length:0}:R.getFromId(t,l.anchor),i=l._offset+l._length/2,o=a._offset+("right"===l.side?a._length+10+p*(h+(l.showticklabels?1:.5)):-10-p*(h+(l.showticklabels?.5:0))),r={rotate:"-90",offset:0},c.side||(c.side="left")),k.draw(t,e+"title",{propContainer:l,propName:l._name+".title",dfltName:f.toUpperCase()+" axis",avoid:c,transform:r,attributes:{x:o,y:i,"text-anchor":"middle"}})}}function l(t,e){return t.visible===!0&&t.xaxis+t.yaxis===e&&(!(!b.traceIs(t,"bar")||t.orientation!=={x:"h",y:"v"}[L])||t.fill&&t.fill.charAt(t.fill.length-1)===L)}function s(e,n,a){var o=e.gridlayer,i=e.zerolinelayer,s=e["hidegrid"+L]?[]:U,u=c._gridpath||"M0,0"+("x"===L?"v":"h")+n._length,f=o.selectAll("path."+P).data(c.showgrid===!1?[]:s,S);if(f.enter().append("path").classed(P,1).classed("crisp",1).attr("d",u).each(function(t){c.zeroline&&("linear"===c.type||"-"===c.type)&&Math.abs(t.x)2*r}function o(t){for(var e,n=Math.max(1,(t.length-1)/1e3),r=0,a=0,o=0;o2*r}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t){return a(t)?"date":o(t)?"category":r(t)?"linear":"-"}},{"../../constants/numerical":107,"../../lib":122,"fast-isnumeric":13}],152:[function(t,e,n){"use strict";function r(t,e){if("-"===t.type){var n=t._id,r=n.charAt(0);n.indexOf("scene")!==-1&&(n=r);var l=i(e,n,r);if(l){if("histogram"===l.type&&r==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");if(o(l,r)){for(var s,u=a(l),f=[],d=0;d0;o&&(r="array");var i=n("categoryorder",r);"array"===i&&n("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],155:[function(t,e,n){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,DBLCLICKDELAY:300,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],DFLTRANGEDATE:["2000-01-01","2001-01-01"]}},{}],156:[function(t,e,n){"use strict";function r(t,e){var n,r=t.range[e],a=Math.abs(r-t.range[1-e]);return"date"===t.type?r:"log"===t.type?(n=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,l.format("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,l.format("."+String(n)+"g")(r))}function a(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function o(t){l.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function i(t){var e=["lasso","select"];return e.indexOf(t)!==-1}var l=t("d3"),s=t("tinycolor2"),c=t("../../plotly"),u=t("../../registry"),f=t("../../lib"),d=t("../../lib/svg_text_utils"),h=t("../../components/color"),p=t("../../components/drawing"),g=t("../../lib/setcursor"),m=t("../../components/dragelement"),v=t("./axes"),y=t("./select"),x=t("./constants"),b=!0;e.exports=function(t,e,n,l,_,w,M,k){function A(t,e){for(var n=0;n.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+gt+", "+mt+")").attr("d",ct+"Z"),ht=pt.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+gt+", "+mt+")").attr("d","M0,0Z"),C()}function C(){pt.selectAll(".select-outline").remove()}function z(e,n){if(t._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(V,e+ot)),a=Math.max(0,Math.min(G,n+it)),o=Math.abs(r-ot),i=Math.abs(a-it),l=Math.floor(Math.min(i,o,X)/2);lt.l=Math.min(ot,r),lt.r=Math.max(ot,r),lt.t=Math.min(it,a),lt.b=Math.max(it,a),!K||i.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ht.transition().style("opacity",1).duration(200),ut=!0)}function S(t,e,n){var r,a,o,i=[];for(r=0;r0&&(t.emit("plotly_zoom",l),l.userHandled||(j(ft),b&&t.data&&t._context.showTips&&(f.notifier("Double-click to
zoom back out","long"),b=!1),l.pre=!1,t.emit("plotly_zoom",l)))}function P(e,n){var a=1===(M+k).length;if(e)j();else if(2!==n||a){if(1===n&&a){var o=M?H[0]:q[0],i="s"===M||"w"===k?0:1,l=o._name+".range["+i+"]",s=r(o,i),u="left",f="middle";if(o.fixedrange)return;M?(f="n"===M?"top":"bottom","right"===o.side&&(u="right")):"e"===k&&(u="right"),nt.call(d.makeEditable,null,{immediate:!0,background:F.paper_bgcolor,text:String(s),fill:o.tickfont?o.tickfont.color:"#444",horizontalAlign:u,verticalAlign:f}).on("edit",function(e){var n=o.d2r(e);void 0!==n&&c.relayout(t,l,n)})}}else R()}function E(e){function n(t,e,n){function r(e){return t.l2r(o+(e-o)*n)}if(!t.fixedrange){var a=t.range.map(t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(r)}}if(t._context.scrollZoom||F._enablescrollzoom){if(t._transitioningWithDuration)return f.pauseEvent(e);var r=t.querySelector(".plotly");if(T(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(yt);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void f.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=bt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,c=vt[0]+vt[2]*s,u=(l.bottom-e.clientY)/l.height,d=vt[1]+vt[3]*(1-u);if(k){for(o=0;o=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function o(t,e,n){for(var r,o,i=1-e,l=0;l0;r--)n.push(e);return n}function a(t,e){for(var n=[],r=0;rZ.width||Y<0||Y>Z.height)return _.unhoverRaw(t,e)}else X="xpx"in e?e.xpx:k[0]._length/2,Y="ypx"in e?e.ypx:A[0]._length/2;if(O="xval"in e?r(o,e.xval):a(k,X),P="yval"in e?r(o,e.yval):a(A,Y),!g(O[0])||!g(P[0]))return m.warn("Fx.hover failed",e,t),_.unhoverRaw(t,e)}var W=1/0;for(N=0;N1||R.hoverinfo.indexOf("name")!==-1?R.name:void 0,index:!1,distance:Math.min(W,M.MAXDIST),color:x.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},i[j]&&(H.subplot=i[j]._subplot),V=G.length,"array"===F){var Q=e[N];"pointNumber"in Q?(H.index=Q.pointNumber,F="closest"):(F="","xval"in Q&&(B=Q.xval,F="x"),"yval"in Q&&(q=Q.yval,F=F?"closest":"y"))}else B=O[I],q=P[I];if(R._module&&R._module.hoverPoints){var $=R._module.hoverPoints(H,B,q,F);if($)for(var J,K=0;K<$.length;K++)J=$[K],g(J.x0)&&g(J.y0)&&G.push(s(J,S))}else m.log("Unrecognized trace type in hover:",R);"closest"===S&&G.length>V&&(G.splice(0,V),W=G[0].distance)}if(0===G.length)return _.unhoverRaw(t,e);var tt="y"===S&&U.length>1;G.sort(function(t,e){return t.distance-e.distance});var et=x.combine(i.plot_bgcolor||x.background,i.paper_bgcolor),nt={hovermode:S,rotateLabels:tt,bgColor:et,container:i._hoverlayer,outerContainer:i._paperdiv},rt=c(G,nt,e,t.layout.hoverFollowsMouse);u(G,tt?"xa":"ya"),f(rt,tt);var at=t._hoverdata,ot=[];for(E=0;E128?"#000":x.background;if(t.name&&void 0===t.zLabelVal){var d=document.createElement("p");d.innerHTML=t.name,a=d.textContent||"",a.length>15&&(a=a.substr(0,12)+"...")}void 0!==t.extraText&&(o+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(o+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(o+="y: "+t.yLabel+"
"),o+=(o?"z: ":"")+t.zLabel):C&&t[i+"Label"]===v?o=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(o=t.yLabel):o=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(o+=(o?"
":"")+t.text),""===o&&(""===a&&e.remove(),o=a);var g=e.select("text.nums").style("fill",f).call(b.setPosition,0,0).text(o).attr("data-notex",1).call(y.convertToTspans);g.selectAll("tspan.line").call(b.setPosition,0,0);var m=e.select("text.name"),_=0;a&&a!==o?(m.style("fill",u).text(a).call(b.setPosition,0,0).attr("data-notex",1).call(y.convertToTspans),m.selectAll("tspan.line").call(b.setPosition,0,0),_=m.node().getBoundingClientRect().width+2*E):(m.remove(),e.select("rect").remove()),e.select("path").style({fill:u,stroke:f});var w,M,z=g.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,O=t.ya._offset+(t.y0+t.y1)/2,N=Math.abs(t.x1-t.x0),D=Math.abs(t.y1-t.y0),R=z.width+P+E+_;t.ty0=k-z.top,t.bx=z.width+2*E,t.by=z.height+2*E,t.anchor="start",t.txwidth=z.width,t.tx2width=_,t.offset=0,r&&"closest"===i&&n&&n.layerX&&n.layerY&&(S=n.layerX,O=n.layerY),l?(t.pos=S,w=O+D/2+R<=T,M=O-D/2-R>=0,"top"!==t.idealAlign&&w||!M?w?(O+=D/2,t.anchor="start"):t.anchor="middle":(O-=D/2,t.anchor="end")):(t.pos=O,w=S+N/2+R<=A,M=S-N/2-R>=0,"left"!==t.idealAlign&&w||!M?w?(S+=N/2,t.anchor="start"):t.anchor="middle":(S-=N/2,t.anchor="end")),g.attr("text-anchor",t.anchor),_&&m.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+O+")"+(l?"rotate("+L+")":""))}),O}function u(t,e){function n(t){var e=t[0],n=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=n.pos+n.dp+n.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;r=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;r=!1}if(r){var c=0;for(i=0;ie.pmax&&c++;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,c--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,c--)}}}for(var r,a,o,i,l,s,c,u=0,f=t.map(function(t,n){var r=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===r._id.charAt(0)?z:1)/2,pmin:r._offset,pmax:r._offset+r._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!r&&u<=t.length;){for(u++,r=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),c=0,l=d.length-1;l>=0;l--)c+=d[l].dp;for(o=c/d.length,l=d.length-1;l>=0;l--)d[l].dp-=o;r=!1}else i++}f.forEach(n)}for(i=f.length-1;i>=0;i--){var m=f[i];for(l=m.length-1;l>=0;l--){var v=m[l],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function f(t,e){t.each(function(t){var n=h.select(this);if(t.del)return void n.remove();var r="end"===t.anchor?-1:1,a=n.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(P+E),l=i+o*(t.txwidth+E),s=0,c=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(c*=-O,s=t.offset*S),n.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(r*P+s)+","+(P+c)+"v"+(t.by/2-P)+"h"+r*t.bx+"v-"+t.by+"H"+(r*P+s)+"V"+(c-P)+"Z"),a.call(b.setPosition,i+s,c+t.ty0-t.by/2+E).selectAll("tspan.line").attr({x:a.attr("x"),y:a.attr("y")}),t.tx2width&&(n.select("text.name, text.name tspan.line").call(b.setPosition,l+o*E+s,c+t.ty0-t.by/2+E),n.select("rect").call(b.setRect,l+(o-1)*t.tx2width/2+s,c-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,n){if(!e.target)return!1;if(!n||n.length!==t._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],o=t._hoverdata[r];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var h=t("d3"),p=t("tinycolor2"),g=t("fast-isnumeric"),m=t("../../lib"),v=t("../../lib/events"),y=t("../../lib/svg_text_utils"),x=t("../../components/color"),b=t("../../components/drawing"),_=t("../../components/dragelement"),w=t("./axes"),M=t("./constants"),k=t("./dragbox"),A=t("../layout_attributes"),T=e.exports={};T.unhover=_.unhover,T.layoutAttributes={},T.supplyLayoutDefaults=function(t,e,n){function r(n,r){return m.coerce(t,e,A,n,r)}r("dragmode");var a;if(e._has("cartesian")){var o=e._isHoriz=T.isHoriz(n);a=o?"y":"x"}else a="closest";r("hovermode",a)},T.isHoriz=function(t){for(var e=!0,n=0;nt._lastHoverTime+M.HOVERMINTIME?(i(t,e,n),void(t._lastHoverTime=Date.now())):void(t._hoverTimer=setTimeout(function(){i(t,e,n),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME))},T.getDistanceFunction=function(t,e,n,r){return"closest"===t?r||o(e,n):"x"===t?e:n},T.getClosest=function(t,e,n){if(n.index!==!1)n.index>=0&&n.indexf[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":122,"fast-isnumeric":13}],163:[function(t,e,n){"use strict";function r(t){return t._id}var a=t("../../lib/polygon"),o=t("../../components/color"),i=t("./axes"),l=t("./constants"),s=a.filter,c=a.tester,u=l.MINSELECT;e.exports=function(t,e,n,a,f){function d(t){var e="y"===t._id.charAt(0)?1:0;return function(n){return t.p2d(n[e])}}function h(t,e){return t-e}var p,g=a.gd._fullLayout._zoomlayer,m=a.element.getBoundingClientRect(),v=a.plotinfo.xaxis._offset,y=a.plotinfo.yaxis._offset,x=e-m.left,b=n-m.top,_=x,w=b,M="M"+x+","+b,k=a.xaxes[0]._length,A=a.yaxes[0]._length,T=a.xaxes.map(r),L=a.yaxes.map(r),C=a.xaxes.concat(a.yaxes);"lasso"===f&&(p=s([[x,b]],l.BENDPX));var z=g.selectAll("path.select-outline").data([1,2]);z.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var S,O,P,E,N,D=g.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=a.gd,I=[];for(S=0;S0)return Math.log(e)/Math.LN10;if(e<=0&&n&&t.range&&2===t.range.length){var r=t.range[0],a=t.range[1]; +D.coerceRef=function(t,e,n,r,a,o){var i=r.charAt(r.length-1),l=n._fullLayout._has("gl2d")?[]:D.listIds(n,i),s=r+"ref",c={};return a||(a=l[0]||o),o||(o=a),c[s]={valType:"enumerated",values:l.concat(o?[o]:[]),dflt:a},w.coerce(t,e,c,s)},D.coercePosition=function(t,e,n,r,a,o){var i,l;if("paper"===r||"pixel"===r)i=n(a,o);else{var s=D.getFromId(e,r);if(o=s.fraction2r(o),i=n(a,o),"category"===s.type){if("string"==typeof i&&(s._categories||[]).length)return l=s._categories.indexOf(i),void(t[a]=l===-1?o:l)}else if("date"===s.type)return void(t[a]=w.cleanDate(i))}t[a]=x(i)?Number(i):o},D.clearTypes=function(t,e){Array.isArray(e)&&e.length||(e=t._fullData.map(function(t,e){return e})),e.forEach(function(e){var n=t.data[e];delete(D.getFromId(t,n.xaxis)||{}).type,delete(D.getFromId(t,n.yaxis)||{}).type})},D.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},D.minDtick=function(t,e,n,r){["log","category"].indexOf(t.type)===-1&&r?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=n):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((n-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=n):((e/t._minDtick+1e-6)%1>2e-6||((n-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},D.getAutoRange=function(t){var e,n=[],r=t._min[0].val,a=t._max[0].val;for(e=1;e0&&u>0&&f/u>d&&(s=i,c=l,d=f/u);if(r===a){var g=r-1,m=r+1;n="tozero"===t.rangemode?r<0?[g,0]:[0,m]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,m)]:[g,m]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),d=(c.val-s.val)/(t._length-s.pad-c.pad)),n=[s.val-d*s.pad,c.val+d*c.pad]);return n[0]===n[1]&&("tozero"===t.rangemode?n=n[0]<0?[n[0],0]:n[0]>0?[0,n[0]]:[0,1]:(n=[n[0]-1,n[0]+1],"nonnegative"===t.rangemode&&(n[0]=Math.max(0,n[0])))),h&&n.reverse(),n.map(t.l2r||Number)},D.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=D.getAutoRange(t);var n=t._gd.layout[t._name];n||(t._gd.layout[t._name]=n={}),n!==t&&(n.range=t.range.slice(),n.autorange=t.autorange)}},D.saveRangeInitial=function(t,e){for(var n=D.list(t,"",!0),r=!1,a=0;a=d?h=!1:l.val>=c&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:c,pad:y&&0===c?0:d})}if(r(u)){for(h=!0,i=0;i=u&&l.pad>=f?h=!1:l.val<=u&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:u,pad:y&&0===u?0:f})}}}if((t.autorange||t._needsExpand)&&e){t._min||(t._min=[]),t._max||(t._max=[]),n||(n={}),t._m||t.setScale();var o,i,l,s,c,u,f,d,h,p,g,m=e.length,v=n.padded?.05*t._length:0,y=n.tozero&&("linear"===t.type||"-"===t.type),b=r((t._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),_=r((t._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),w=r(n.vpadplus||n.vpad),M=r(n.vpadminus||n.vpad);for(o=0;o<6;o++)a(o);for(o=m-1;o>5;o--)a(o)}},D.autoBin=function(t,e,n,r){function a(t){return(1+100*(t-h)/f.dtick)%100<2}var o=w.aggNums(Math.min,null,t),i=w.aggNums(Math.max,null,t);if("category"===e.type)return{start:o-.5,end:i+.5,size:1};var l;if(n)l=(i-o)/n;else{var s=w.distinctVals(t),c=Math.pow(10,Math.floor(Math.log(s.minDiff)/Math.LN10)),u=c*w.roundUp(s.minDiff/c,[.9,1.9,4.9,9.9],!0);l=Math.max(u,2*w.stdev(t)/Math.pow(t.length,r?.25:.4))}var f;f="log"===e.type?{type:"linear",range:[o,i],r2l:Number}:{type:e.type,range:[o,i].map(e.l2r),r2l:e.r2l},D.autoTicks(f,l);var d,h=D.tickIncrement(D.tickFirst(f),f.dtick,"reverse");if("number"==typeof f.dtick){for(var p=0,g=0,m=0,v=0,y=0;y.3*b||a(o)||a(i))){var _=f.dtick/2;h+=h+_0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),o(t),t._tmin=D.tickFirst(t);var i=e[1]=s:c<=s)&&(l.push(c),!(l.length>1e3));c=D.tickIncrement(c,t.dtick,i));t._tmax=l[l.length-1],t._prevSuffix="",t._inCalcTicks=!0;for(var u=new Array(l.length),f=0;fz?(e/=z,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*a(e,n,j)):r>S?(e/=S,t.dtick="M"+a(e,1,I)):r>O?(t.dtick=a(e,O,B),t.tick0="2000-01-02"):r>P?t.dtick=a(e,P,I):r>E?t.dtick=a(e,E,F):r>N?t.dtick=a(e,N,F):(n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=a(e,n,j))}else if("log"===t.type){t.tick0=0;var o=t.range.map(t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var i=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/i,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+a(e,n,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,n=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=a(e,n,j));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},D.tickIncrement=function(t,e,n){var r=n?-1:1;if(x(e))return t+r*e;var a=e.charAt(0),o=r*Number(e.substr(1));if("M"===a){var i=new Date(t);return i.setMonth(i.getMonth()+o)}if("L"===a)return Math.log(Math.pow(10,t)+o)/Math.LN10;if("D"===a){var l="D2"===e?H:q,s=t+.01*r,c=w.roundUp(v(s,1),l,n);return Math.floor(s)+Math.log(y.round(Math.pow(10,c),1))/Math.LN10}throw"unrecognized dtick "+String(e)},D.tickFirst=function(t){var e=t.r2l||Number,n=t.range.map(e),r=n[1]o:f1&&er){var o=t.text,i=Math.round(r/(a/o.length)),l=Math.floor(i/2),s=i-l-1;o=o.substr(0,l)+"\u2026"+o.substr(-s);var u=e.select("text");u.text(o),e.insert("title","text").text(t.text)}})}function u(){var e,n,r=c._boundingBox,a=0,o=0;if("x"===c._id.charAt(0)?(e="height","2"===c._id.charAt(1)?(o=1,n="t"):n="b"):"y"===c._id.charAt(0)&&(e="width","2"===c._id.charAt(1)?(a=1,n="r"):n="l"),e&&n){var i=r[e];if(c._titleElement){var l=c._titleElement.node().getBoundingClientRect();i+=l[e]+2}var s=.5*t._fullLayout[e];i=Math.min(i,s);var u={x:a,y:o,l:0,r:0,b:0,t:0};u[n]=i,_.autoMargin(t,c._name,u)}}function f(){c._boundingBox=n.node().getBoundingClientRect()}n.style("pointer-events","all");var d=n.selectAll("g."+O).data(z,S);if(!c.showticklabels||!x(r))return d.remove(),void i(e);var h,p,m,b,k;"x"===L?(k="bottom"===V?1:-1,h=function(t){return t.dx+I*k},b=r+(j+N)*k,p=function(t){return t.dy+b+t.fontSize*("bottom"===V?1:-.5)},m=function(t){return x(t)&&0!==t&&180!==t?t*k<0?"end":"start":"middle"}):(k="right"===V?1:-1,p=function(t){return t.dy+t.fontSize/2-I*k},h=function(t){return t.dx+r+(j+N+(90===Math.abs(c.tickangle)?t.fontSize/2:0))*k},m=function(t){return x(t)&&90===Math.abs(t)?"middle":"right"===V?"start":"end"});var A=0,C=0,P=[],E=d.enter().append("g").classed(O,1);E.append("text").attr("text-anchor","middle").each(function(e){var n=y.select(this),r=t._promises.length;n.call(T.setPosition,h(e),p(e)).call(T.font,e.font,e.fontSize,e.fontColor).text(e.text).call(M.convertToTspans),r=t._promises[r],r?P.push(t._promises.pop().then(function(){a(n,c.tickangle)})):a(n,c.tickangle)}),d.exit().remove(),d.each(function(t){A=Math.max(A,t.fontSize)}),a(d,c._lastangle||c.tickangle);var D=w.syncOrAsync([o,l,f,u]);return D&&D.then&&t._promises.push(D),D}function i(e){if(!n){var r,a,o,i,l=R.getFromId(t,e),s=y.select(t).selectAll("g."+e+"tick"),c={selection:s,side:l.side},f=e.charAt(0),d=t._fullLayout._size,h=1.5,p=l.titlefont.size;if(s.size()){var g=y.select(s.node().parentNode).attr("transform").match(/translate\(([-\.\d]+),([-\.\d]+)\)/);g&&(c.offsetLeft=+g[1],c.offsetTop=+g[2])}"x"===f?(a="free"===l.anchor?{_offset:d.t+(1-(l.position||0))*d.h,_length:0}:R.getFromId(t,l.anchor),o=l._offset+l._length/2,i=a._offset+("top"===l.side?-10-p*(h+(l.showticklabels?1:0)):a._length+10+p*(h+(l.showticklabels?1.5:.5))),l.rangeslider&&l.rangeslider.visible&&l._boundingBox&&(i+=(u.height-u.margin.b-u.margin.t)*l.rangeslider.thickness+l._boundingBox.height),c.side||(c.side="bottom")):(a="free"===l.anchor?{_offset:d.l+(l.position||0)*d.w,_length:0}:R.getFromId(t,l.anchor),i=l._offset+l._length/2,o=a._offset+("right"===l.side?a._length+10+p*(h+(l.showticklabels?1:.5)):-10-p*(h+(l.showticklabels?.5:0))),r={rotate:"-90",offset:0},c.side||(c.side="left")),k.draw(t,e+"title",{propContainer:l,propName:l._name+".title",dfltName:f.toUpperCase()+" axis",avoid:c,transform:r,attributes:{x:o,y:i,"text-anchor":"middle"}})}}function l(t,e){return t.visible===!0&&t.xaxis+t.yaxis===e&&(!(!b.traceIs(t,"bar")||t.orientation!=={x:"h",y:"v"}[L])||t.fill&&t.fill.charAt(t.fill.length-1)===L)}function s(e,n,a){var o=e.gridlayer,i=e.zerolinelayer,s=e["hidegrid"+L]?[]:U,u=c._gridpath||"M0,0"+("x"===L?"v":"h")+n._length,f=o.selectAll("path."+P).data(c.showgrid===!1?[]:s,S);if(f.enter().append("path").classed(P,1).classed("crisp",1).attr("d",u).each(function(t){c.zeroline&&("linear"===c.type||"-"===c.type)&&Math.abs(t.x)2*r}function o(t){for(var e,n=Math.max(1,(t.length-1)/1e3),r=0,a=0,o=0;o2*r}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t){return a(t)?"date":o(t)?"category":r(t)?"linear":"-"}},{"../../constants/numerical":107,"../../lib":122,"fast-isnumeric":13}],152:[function(t,e,n){"use strict";function r(t,e){if("-"===t.type){var n=t._id,r=n.charAt(0);n.indexOf("scene")!==-1&&(n=r);var l=i(e,n,r);if(l){if("histogram"===l.type&&r==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");if(o(l,r)){for(var s,u=a(l),f=[],d=0;d0;o&&(r="array");var i=n("categoryorder",r);"array"===i&&n("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],155:[function(t,e,n){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,DBLCLICKDELAY:300,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],DFLTRANGEDATE:["2000-01-01","2001-01-01"]}},{}],156:[function(t,e,n){"use strict";function r(t,e){var n,r=t.range[e],a=Math.abs(r-t.range[1-e]);return"date"===t.type?r:"log"===t.type?(n=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,l.format("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,l.format("."+String(n)+"g")(r))}function a(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function o(t){l.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function i(t){var e=["lasso","select"];return e.indexOf(t)!==-1}var l=t("d3"),s=t("tinycolor2"),c=t("../../plotly"),u=t("../../registry"),f=t("../../lib"),d=t("../../lib/svg_text_utils"),h=t("../../components/color"),p=t("../../components/drawing"),g=t("../../lib/setcursor"),m=t("../../components/dragelement"),v=t("./axes"),y=t("./select"),x=t("./constants"),b=!0;e.exports=function(t,e,n,l,_,w,M,k){function A(t,e){for(var n=0;n.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+gt+", "+mt+")").attr("d",ct+"Z"),ht=pt.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+gt+", "+mt+")").attr("d","M0,0Z"),C()}function C(){pt.selectAll(".select-outline").remove()}function z(e,n){if(t._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(V,e+ot)),a=Math.max(0,Math.min(G,n+it)),o=Math.abs(r-ot),i=Math.abs(a-it),l=Math.floor(Math.min(i,o,X)/2);lt.l=Math.min(ot,r),lt.r=Math.max(ot,r),lt.t=Math.min(it,a),lt.b=Math.max(it,a),!K||i.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ht.transition().style("opacity",1).duration(200),ut=!0)}function S(t,e,n){var r,a,o,i=[];for(r=0;r0&&(t.emit("plotly_zoom",l),l.userHandled||(j(ft),b&&t.data&&t._context.showTips&&(f.notifier("Double-click to
zoom back out","long"),b=!1),l.pre=!1,t.emit("plotly_zoom",l)))}function P(e,n){var a=1===(M+k).length;if(e)j();else if(2!==n||a){if(1===n&&a){var o=M?H[0]:q[0],i="s"===M||"w"===k?0:1,l=o._name+".range["+i+"]",s=r(o,i),u="left",f="middle";if(o.fixedrange)return;M?(f="n"===M?"top":"bottom","right"===o.side&&(u="right")):"e"===k&&(u="right"),nt.call(d.makeEditable,null,{immediate:!0,background:F.paper_bgcolor,text:String(s),fill:o.tickfont?o.tickfont.color:"#444",horizontalAlign:u,verticalAlign:f}).on("edit",function(e){var n=o.d2r(e);void 0!==n&&c.relayout(t,l,n)})}}else R()}function E(e){function n(t,e,n){function r(e){return t.l2r(o+(e-o)*n)}if(!t.fixedrange){var a=t.range.map(t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(r)}}if(t._context.scrollZoom||F._enablescrollzoom){if(t._transitioningWithDuration)return f.pauseEvent(e);var r=t.querySelector(".plotly");if(T(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(yt);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void f.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=bt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,c=vt[0]+vt[2]*s,u=(l.bottom-e.clientY)/l.height,d=vt[1]+vt[3]*(1-u);if(k){for(o=0;o=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function o(t,e,n){for(var r,o,i=1-e,l=0;l0;r--)n.push(e);return n}function a(t,e){for(var n=[],r=0;rZ.width||Y<0||Y>Z.height)return _.unhoverRaw(t,e)}else X="xpx"in e?e.xpx:k[0]._length/2,Y="ypx"in e?e.ypx:A[0]._length/2;if(O="xval"in e?r(o,e.xval):a(k,X),P="yval"in e?r(o,e.yval):a(A,Y),!g(O[0])||!g(P[0]))return m.warn("Fx.hover failed",e,t),_.unhoverRaw(t,e)}var W=1/0;for(N=0;N1||R.hoverinfo.indexOf("name")!==-1?R.name:void 0,index:!1,distance:Math.min(W,M.MAXDIST),color:x.defaultLine,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},i[j]&&(H.subplot=i[j]._subplot),V=G.length,"array"===F){var Q=e[N];"pointNumber"in Q?(H.index=Q.pointNumber,F="closest"):(F="","xval"in Q&&(B=Q.xval,F="x"),"yval"in Q&&(q=Q.yval,F=F?"closest":"y"))}else B=O[I],q=P[I];if(R._module&&R._module.hoverPoints){var $=R._module.hoverPoints(H,B,q,F);if($)for(var J,K=0;K<$.length;K++)J=$[K],g(J.x0)&&g(J.y0)&&G.push(s(J,S))}else m.log("Unrecognized trace type in hover:",R);"closest"===S&&G.length>V&&(G.splice(0,V),W=G[0].distance)}if(0===G.length)return _.unhoverRaw(t,e);var tt="y"===S&&U.length>1;G.sort(function(t,e){return t.distance-e.distance});var et=x.combine(i.plot_bgcolor||x.background,i.paper_bgcolor),nt={hovermode:S,rotateLabels:tt,bgColor:et,container:i._hoverlayer,outerContainer:i._paperdiv},rt=c(G,nt,e,t.layout.hoverFollowsMouse);u(G,tt?"xa":"ya"),f(rt,tt);var at=t._hoverdata,ot=[];for(E=0;E128?"#000":x.background;if(t.name&&void 0===t.zLabelVal){var d=document.createElement("p");d.innerHTML=t.name,a=d.textContent||"",a.length>15&&(a=a.substr(0,12)+"...")}void 0!==t.extraText&&(o+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(o+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(o+="y: "+t.yLabel+"
"),o+=(o?"z: ":"")+t.zLabel):C&&t[i+"Label"]===v?o=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(o=t.yLabel):o=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(o+=(o?"
":"")+t.text),""===o&&(""===a&&e.remove(),o=a);var g=e.select("text.nums").style("fill",f).call(b.setPosition,0,0).text(o).attr("data-notex",1).call(y.convertToTspans);g.selectAll("tspan.line").call(b.setPosition,0,0);var m=e.select("text.name"),_=0;a&&a!==o?(m.style("fill",u).text(a).call(b.setPosition,0,0).attr("data-notex",1).call(y.convertToTspans),m.selectAll("tspan.line").call(b.setPosition,0,0),_=m.node().getBoundingClientRect().width+2*E):(m.remove(),e.select("rect").remove()),e.select("path").style({fill:u,stroke:f});var w,M,z=g.node().getBoundingClientRect(),S=t.xa._offset+(t.x0+t.x1)/2,O=t.ya._offset+(t.y0+t.y1)/2,N=Math.abs(t.x1-t.x0),D=Math.abs(t.y1-t.y0),R=z.width+P+E+_;t.ty0=k-z.top,t.bx=z.width+2*E,t.by=z.height+2*E,t.anchor="start",t.txwidth=z.width,t.tx2width=_,t.offset=0,r&&"closest"===i&&n&&n.layerX&&n.layerY&&(S=n.layerX,O=n.layerY),l?(t.pos=S,w=O+D/2+R<=T,M=O-D/2-R>=0,"top"!==t.idealAlign&&w||!M?w?(O+=D/2,t.anchor="start"):t.anchor="middle":(O-=D/2,t.anchor="end")):(t.pos=O,w=S+N/2+R<=A,M=S-N/2-R>=0,"left"!==t.idealAlign&&w||!M?w?(S+=N/2,t.anchor="start"):t.anchor="middle":(S-=N/2,t.anchor="end")),g.attr("text-anchor",t.anchor),_&&m.attr("text-anchor",t.anchor),e.attr("transform","translate("+S+","+O+")"+(l?"rotate("+L+")":""))}),O}function u(t,e){function n(t){var e=t[0],n=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=n.pos+n.dp+n.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;r=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;r=!1}if(r){var c=0;for(i=0;ie.pmax&&c++;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,c--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,c--)}}}for(var r,a,o,i,l,s,c,u=0,f=t.map(function(t,n){var r=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===r._id.charAt(0)?z:1)/2,pmin:r._offset,pmax:r._offset+r._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!r&&u<=t.length;){for(u++,r=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),c=0,l=d.length-1;l>=0;l--)c+=d[l].dp;for(o=c/d.length,l=d.length-1;l>=0;l--)d[l].dp-=o;r=!1}else i++}f.forEach(n)}for(i=f.length-1;i>=0;i--){var m=f[i];for(l=m.length-1;l>=0;l--){var v=m[l],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function f(t,e){t.each(function(t){var n=h.select(this);if(t.del)return void n.remove();var r="end"===t.anchor?-1:1,a=n.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(P+E),l=i+o*(t.txwidth+E),s=0,c=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(c*=-O,s=t.offset*S),n.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(r*P+s)+","+(P+c)+"v"+(t.by/2-P)+"h"+r*t.bx+"v-"+t.by+"H"+(r*P+s)+"V"+(c-P)+"Z"),a.call(b.setPosition,i+s,c+t.ty0-t.by/2+E).selectAll("tspan.line").attr({x:a.attr("x"),y:a.attr("y")}),t.tx2width&&(n.select("text.name, text.name tspan.line").call(b.setPosition,l+o*E+s,c+t.ty0-t.by/2+E),n.select("rect").call(b.setRect,l+(o-1)*t.tx2width/2+s,c-t.by/2-1,t.tx2width,t.by+2))})}function d(t,e,n){if(!e.target)return!1;if(!n||n.length!==t._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],o=t._hoverdata[r];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var h=t("d3"),p=t("tinycolor2"),g=t("fast-isnumeric"),m=t("../../lib"),v=t("../../lib/events"),y=t("../../lib/svg_text_utils"),x=t("../../components/color"),b=t("../../components/drawing"),_=t("../../components/dragelement"),w=t("./axes"),M=t("./constants"),k=t("./dragbox"),A=t("../layout_attributes"),T=e.exports={};T.unhover=_.unhover,T.layoutAttributes={},T.supplyLayoutDefaults=function(t,e,n){function r(n,r){return m.coerce(t,e,A,n,r)}r("dragmode");var a;if(e._has("cartesian")){var o=e._isHoriz=T.isHoriz(n);a=o?"y":"x"}else a="closest";r("hovermode",a)},T.isHoriz=function(t){for(var e=!0,n=0;nt._lastHoverTime+M.HOVERMINTIME?(i(t,e,n),void(t._lastHoverTime=Date.now())):void(t._hoverTimer=setTimeout(function(){i(t,e,n),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME))},T.getDistanceFunction=function(t,e,n,r){return"closest"===t?r||o(e,n):"x"===t?e:n},T.getClosest=function(t,e,n){if(n.index!==!1)n.index>=0&&n.indexf[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":122,"fast-isnumeric":13}],163:[function(t,e,n){"use strict";function r(t){return t._id}var a=t("../../lib/polygon"),o=t("../../components/color"),i=t("./axes"),l=t("./constants"),s=a.filter,c=a.tester,u=l.MINSELECT;e.exports=function(t,e,n,a,f){function d(t){var e="y"===t._id.charAt(0)?1:0;return function(n){return t.p2d(n[e])}}function h(t,e){return t-e}var p,g=a.gd._fullLayout._zoomlayer,m=a.element.getBoundingClientRect(),v=a.plotinfo.xaxis._offset,y=a.plotinfo.yaxis._offset,x=e-m.left,b=n-m.top,_=x,w=b,M="M"+x+","+b,k=a.xaxes[0]._length,A=a.yaxes[0]._length,T=a.xaxes.map(r),L=a.yaxes.map(r),C=a.xaxes.concat(a.yaxes);"lasso"===f&&(p=s([[x,b]],l.BENDPX));var z=g.selectAll("path.select-outline").data([1,2]);z.enter().append("path").attr("class",function(t){return"select-outline select-outline-"+t}).attr("transform","translate("+v+", "+y+")").attr("d",M+"Z");var S,O,P,E,N,D=g.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform","translate("+v+", "+y+")").attr("d","M0,0Z"),R=[],j=a.gd,I=[];for(S=0;S0)return Math.log(e)/Math.LN10;if(e<=0&&n&&t.range&&2===t.range.length){var r=t.range[0],a=t.range[1]; return.5*(r+a-3*f*Math.abs(r-a))}return s}function n(t){return Math.pow(10,t)}function i(t){return a(t)?(t=Number(t),t<-l||t>l?s:a(t)?Number(t):s):s}var f=10;t.c2l="log"===t.type?e:i,t.l2c="log"===t.type?n:i,t.l2d=function(e){return t.c2d(t.l2c(e))},t.p2d=function(e){return t.l2d(t.p2l(e))},t.cleanRange=function(e){e||(e="range");var n,r,i=t[e],s=(t._id||"x").charAt(0);if(r="date"===t.type?c.DFLTRANGEDATE:"y"===s?c.DFLTRANGEY:c.DFLTRANGEX,r=r.slice(),!i||2!==i.length)return void(t[e]=r);for("date"===t.type&&(i[0]=o.cleanDate(i[0]),i[1]=o.cleanDate(i[1])),n=0;n<2;n++)if("date"===t.type){if(!o.isDateTime(i[n])){t[e]=r;break}if(i[n]o.MAX_MS&&(i[n]=o.MAX_MS),t.r2l(i[0])===t.r2l(i[1])){var u=o.constrain(t.r2l(i[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);i[0]=t.l2r(u-1e3),i[1]=t.l2r(u+1e3);break}}else{if(!a(i[n])){if(!a(i[1-n])){t[e]=r;break}i[n]=i[1-n]*(n?10:.1)}if(i[n]<-l?i[n]=-l:i[n]>l&&(i[n]=l),i[0]===i[1]){var f=Math.max(1,Math.abs(1e-6*i[0]));i[0]-=f,i[1]+=f}}},t.fraction2r=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return t.l2r(n+e*(r-n))},t.r2fraction=function(e){var n=t.r2l(t.range[0]),r=t.r2l(t.range[1]);return(t.r2l(e)-n)/(r-n)},t.setScale=function(e){var n=t._gd._fullLayout._size,r=t._id.charAt(0);if(t._categories||(t._categories=[]),t.overlaying){var a=u.getFromId(t._gd,t.overlaying);t.domain=a.domain}var i=e&&t._r?"_r":"range";t.cleanRange(i);var l=t.r2l(t[i][0]),s=t.r2l(t[i][1]);if("y"===r?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l),!isFinite(t._m)||!isFinite(t._b))throw o.notifier("Something went wrong with axis scaling","long"),t._gd._replotting=!1,new Error("axis scaling")},t.l2p=function(e){return a(e)?r.round(t._b+t._m*e,2):s},t.p2l=function(e){return(e-t._b)/t._m},t.c2p=function(e,n){return t.l2p(t.c2l(e,n))},t.p2c=function(e){return t.l2c(t.p2l(e))},t.r2p=function(e,n){return t.l2p(t.r2l(e,n))},t.p2r=function(e){return t.l2r(t.p2l(e))},t.r2c=function(e){return t.l2c(t.r2l(e))},t.c2r=function(e){return t.l2r(t.c2l(e))},["linear","log","-"].indexOf(t.type)!==-1?(t.c2d=i,t.d2c=o.cleanNumber,"log"===t.type?(t.d2l=function(e,n){return t.c2l(t.d2c(e),n)},t.d2r=t.d2l,t.r2d=t.l2d):(t.d2l=o.cleanNumber,t.d2r=o.cleanNumber,t.r2d=i),t.r2l=i,t.l2r=i):"date"===t.type?(t.c2d=o.ms2DateTime,t.d2c=function(t){var e=o.dateTime2ms(t);if(e===s){if(!a(t))return s;e=Number(t)}return o.constrain(e,o.MIN_MS,o.MAX_MS)},t.d2l=t.d2c,t.r2l=t.d2c,t.l2r=t.c2d,t.d2r=o.identity,t.r2d=o.identity,t.cleanr=function(e){return t.c2d(t.d2c(e))}):"category"===t.type&&(t.c2d=function(e){return t._categories[Math.round(e)]},t.d2c=function(e){null!==e&&void 0!==e&&t._categories.indexOf(e)===-1&&t._categories.push(e);var n=t._categories.indexOf(e);return n===-1?s:n},t.d2l=t.d2c,t.r2l=i,t.l2r=i,t.d2r=t.d2c,t.r2d=t.c2d),t.makeCalcdata=function(e,n){var r,a,o;if(n in e)for(r=e[n],a=new Array(r.length),o=0;o0?Number(u):c;else if("string"!=typeof u)e.dtick=c;else{var f=u.charAt(0),d=u.substr(1);d=r(d)?Number(d):0,(d<=0||!("date"===i&&"M"===f&&d===Math.round(d)||"log"===i&&"L"===f||"log"===i&&"D"===f&&(1===d||2===d)))&&(e.dtick=c)}var h="date"===i?"2000-01-01":0,p=n("tick0",h);"date"===i?e.tick0=a.cleanDate(p,h):r(p)&&"D1"!==u&&"D2"!==u?e.tick0=Number(p):e.tick0=h}else{var g=n("tickvals");void 0===g?e.tickmode="auto":n("ticktext")}}},{"../../constants/numerical":107,"../../lib":122,"fast-isnumeric":13}],168:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../plotly"),o=t("../../registry"),i=t("../../lib"),l=t("./axes"),s=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,n,c){function u(t){var e,n,r,a,o,i={};for(e in t)if(n=e.split("."),r=n[0].match(s)){var l=r[1],c=l+"axis";if(a=y[c],o={},Array.isArray(t[e])?o.to=t[e].slice(0):Array.isArray(t[e].range)&&(o.to=t[e].range.slice(0)),!o.to)continue;o.axisName=c,o.length=a._length,x.push(l),i[l]=o}return i}function f(t,e,n){var r,a,o,i=t._plots,l=[];for(r in i){var s=i[r];if(l.indexOf(s)===-1){var c=s.xaxis._id,u=s.yaxis._id,f=s.xaxis.range,d=s.yaxis.range;s.xaxis._r=s.xaxis.range.slice(),s.yaxis._r=s.yaxis.range.slice(),a=n[c]?n[c].to:f,o=n[u]?n[u].to:d,f[0]===a[0]&&f[1]===a[1]&&d[0]===o[0]&&d[1]===o[1]||e.indexOf(c)===-1&&e.indexOf(u)===-1||l.push(s)}}return l}function d(e,n){function r(e,n){for(a=0;an.duration?(g(),T=window.cancelAnimationFrame(v)):T=window.requestAnimationFrame(v)}var y=t._fullLayout,x=[],b=u(e),_=Object.keys(b),w=f(y,_,b);if(!w.length)return!1;var M;c&&(M=c());var k,A,T,L=r.ease(n.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(T),T=null,m()}),k=Date.now(),T=window.requestAnimationFrame(v),Promise.resolve()}},{"../../lib":122,"../../plotly":145,"../../registry":194,"./axes":150,d3:10}],169:[function(t,e,n){"use strict";function r(t,e,n){var r,a,o,i=!1;if("data"===e.type)r=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;r=t._fullLayout}return a=c.nestedProperty(r,e.prop).get(),o=n[e.type]=n[e.type]||{},o.hasOwnProperty(e.prop)&&o[e.prop]!==a&&(i=!0),o[e.prop]=a,{changed:i,value:a}}function a(t,e){return Array.isArray(e[0])&&1===e[0].length&&"string"==typeof e[0][0]?[{type:"layout",prop:"_currentFrame",value:e[0][0]}]:[]}function o(t,e){var n=[],r=e[0],a={};if("string"==typeof r)a[r]=e[1];else{if(!c.isPlainObject(r))return n;a=r}return l(a,function(t,e,r){n.push({type:"layout",prop:t,value:r})},"",0),n}function i(t,e){var n,r,a,o,i=[];if(r=e[0],a=e[1],n=e[2],o={},"string"==typeof r)o[r]=a;else{if(!c.isPlainObject(r))return i;o=r,void 0===n&&(n=a)}return void 0===n&&(n=null),l(o,function(e,r,a){var o;if(Array.isArray(a)){var l=Math.min(a.length,t.data.length);n&&(l=Math.min(l,n.length)),o=[];for(var s=0;s0?".":"")+a;c.isPlainObject(o)?l(o,e,i,r+1):e(i,a,o)}})}var s=t("../plotly"),c=t("../lib");n.manageCommandObserver=function(t,e,a,o){var i={},l=!0;e&&e._commandObserver&&(i=e._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var s=n.hasSimpleAPICommandBindings(t,a,i.lookupTable);if(e&&e._commandObserver){if(s)return i;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,i}if(s){r(t,s,i.cache),i.check=function(){if(l){var e=r(t,s,i.cache);return e.changed&&o&&void 0!==i.lookupTable[e.value]&&(i.disable(),Promise.resolve(o({value:e.value,type:s.type,prop:s.prop,traces:s.traces,index:i.lookupTable[e.value]})).then(i.enable,i.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;fa},M.render=function(){function t(t){var e=n.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return n.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var n=this,r=n.framework,a=r.select("g.choroplethlayer"),o=r.select("g.scattergeolayer"),i=n.path;r.selectAll("path.basepath").attr("d",i),r.selectAll("path.graticulepath").attr("d",i),a.selectAll("path.choroplethlocation").attr("d",i),a.selectAll("path.basepath").attr("d",i),o.selectAll("path.js-line").attr("d",i),null!==n.clipAngle?(o.selectAll("path.point").style("opacity",e).attr("transform",t),o.selectAll("text").style("opacity",e).attr("transform",t)):(o.selectAll("path.point").attr("transform",t),o.selectAll("text").attr("transform",t))}},{"../../components/color":27,"../../components/drawing":50,"../../constants/xmlns_namespaces":109,"../../lib/topojson_utils":135,"../../plots/cartesian/axes":150,"../../plots/cartesian/graph_interact":157,"./constants":172,"./projections":180,"./set_scale":181,"./zoom":182,"./zoom_reset":183,d3:10,"topojson-client":17}],174:[function(t,e,n){"use strict";function r(t,e){for(var n=[],r=0;rr^h>r&&n<(d-c)*(r-u)/(h-u)+c&&(a=!a)}return a}function i(t){return t?t/Math.sin(t):1}function l(t){return t>1?P:t<-1?-P:Math.asin(t)}function s(t){return t>1?0:t<-1?O:Math.acos(t)}function c(t,e){var n=(2+P)*Math.sin(e);e/=2;for(var r=0,a=1/0;r<10&&Math.abs(a)>z;r++){var o=Math.cos(e);e-=a=(e+Math.sin(e)*(o+2)-n)/(2*o*(1+o))}return[2/Math.sqrt(O*(4+O))*t*(1+Math.cos(e)),2*Math.sqrt(O/(4+O))*Math.sin(e)]}function u(t,e){function n(n,r){var a=j(n/e,r);return a[0]*=t,a}return arguments.length<2&&(e=t),1===e?j:e===1/0?d:(n.invert=function(n,r){var a=j.invert(n/t,r);return a[0]*=e,a},n)}function f(){var t=2,e=R(u),n=e(t);return n.coefficient=function(n){return arguments.length?e(t=+n):t},n}function d(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function h(t,e){return[3*t/(2*O)*Math.sqrt(O*O/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(O/4+.4*e))]}function g(t){return function(e){var n,r=t*Math.sin(e),a=30;do e-=n=(e+Math.sin(e)-r)/(1+Math.cos(e));while(Math.abs(n)>z&&--a>0);return e/2}}function m(t,e,n){function r(n,r){return[t*n*Math.cos(r=a(r)),e*Math.sin(r)]}var a=g(n);return r.invert=function(r,a){var o=l(a/e);return[r/(t*Math.cos(o)),l((2*o+Math.sin(2*o))/n)]},r}function v(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function y(t,e){var n,r=Math.min(18,36*Math.abs(e)/O),a=Math.floor(r),o=r-a,i=(n=F[a])[0],l=n[1],s=(n=F[++a])[0],c=n[1],u=(n=F[Math.min(19,++a)])[0],f=n[1];return[t*(s+o*(u-i)/2+o*o*(u-2*s+i)/2),(e>0?P:-P)*(c+o*(f-l)/2+o*o*(f-2*c+l)/2)]}function x(t,e){return[t*Math.cos(e),e]}function b(t,e){var n=Math.cos(e),r=i(s(n*Math.cos(t/=2)));return[2*n*Math.sin(t)*r,Math.sin(e)*r]}function _(t,e){var n=b(t,e);return[(n[0]+t/P)/2,(n[1]+e)/2]}t.geo.project=function(t,e){var r=e.stream;if(!r)throw new Error("not yet supported");return(t&&w.hasOwnProperty(t.type)?w[t.type]:n)(t,r)};var w={Feature:e,FeatureCollection:function(t,n){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,n)})}}},M=[],k=[],A={point:function(t,e){M.push([t,e])},result:function(){var t=M.length?M.length<2?{type:"Point",coordinates:M[0]}:{type:"MultiPoint",coordinates:M}:null;return M=[],t}},T={lineStart:r,point:function(t,e){M.push([t,e])},lineEnd:function(){M.length&&(k.push(M),M=[])},result:function(){var t=k.length?k.length<2?{type:"LineString",coordinates:k[0]}:{type:"MultiLineString",coordinates:k}:null;return k=[],t}},L={polygonStart:r,lineStart:r,point:function(t,e){M.push([t,e])},lineEnd:function(){var t=M.length;if(t){do M.push(M[0].slice());while(++t<4);k.push(M),M=[]}},polygonEnd:r,result:function(){if(!k.length)return null;var t=[],e=[];return k.forEach(function(n){a(n)?t.push([n]):e.push(n)}),e.forEach(function(e){var n=e[0];t.some(function(t){if(o(t[0],n))return t.push(e),!0})||t.push([e]); }),k=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},C={Point:A,MultiPoint:A,LineString:T,MultiLineString:T,Polygon:L,MultiPolygon:L,Sphere:L},z=1e-6,S=z*z,O=Math.PI,P=O/2,E=(Math.sqrt(O),O/180),N=180/O,D=t.geo.projection,R=t.geo.projectionMutator;t.geo.interrupt=function(e){function n(t,n){for(var r=n<0?-1:1,a=s[+(n<0)],o=0,i=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],n);return l[0]+=e(a[o][1][0],r*n>r*a[o][0][1]?a[o][0][1]:n)[0],l}function r(){l=s.map(function(t){return t.map(function(t){var n,r=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],i=e(t[1][0],t[1][1])[1];return o>i&&(n=o,o=i,i=n),[[r,o],[a,i]]})})}function a(){for(var e=1e-6,n=[],r=0,a=s[0].length;r=0;--r){var i=s[1][r],l=180*i[0][0]/O,c=180*i[0][1]/O,u=180*i[1][1]/O,f=180*i[2][0]/O,d=180*i[2][1]/O;n.push(o([[f-e,d-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(n)]}}function o(t,e){for(var n,r,a,o=-1,i=t.length,l=t[0],s=[];++oz&&--a>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},(t.geo.naturalEarth=function(){return D(v)}).raw=v;var F=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];F.forEach(function(t){t[1]*=1.0144}),y.invert=function(t,e){var n=e/P,r=90*n,a=Math.min(18,Math.abs(r/5)),o=Math.max(0,Math.floor(a));do{var i=F[o][1],l=F[o+1][1],s=F[Math.min(19,o+2)][1],c=s-i,u=s-2*l+i,f=2*(Math.abs(n)-l)/c,d=u/c,h=f*(1-d*f*(1-2*d*f));if(h>=0||1===o){r=(e>=0?5:-5)*(h+a);var p,g=50;do a=Math.min(18,Math.abs(r)/5),o=Math.floor(a),h=a-o,i=F[o][1],l=F[o+1][1],s=F[Math.min(19,o+2)][1],r-=(p=(e>=0?P:-P)*(l+h*(s-i)/2+h*h*(s-2*l+i)/2)-e)*N;while(Math.abs(p)>S&&--g>0);break}}while(--o>=0);var m=F[o][0],v=F[o+1][0],y=F[Math.min(19,o+2)][0];return[t/(v+h*(y-m)/2+h*h*(y-2*v+m)/2),r*E]},(t.geo.robinson=function(){return D(y)}).raw=y,x.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return D(x)}).raw=x,b.invert=function(t,e){if(!(t*t+4*e*e>O*O+z)){var n=t,r=e,a=25;do{var o,i=Math.sin(n),l=Math.sin(n/2),c=Math.cos(n/2),u=Math.sin(r),f=Math.cos(r),d=Math.sin(2*r),h=u*u,p=f*f,g=l*l,m=1-p*c*c,v=m?s(f*c)*Math.sqrt(o=1/m):o=0,y=2*v*f*l-t,x=v*u-e,b=o*(p*g+v*f*c*h),_=o*(.5*i*d-2*v*u*l),w=.25*o*(d*l-v*u*p*i),M=o*(h*c+v*g*f),k=_*w-M*b;if(!k)break;var A=(x*_-y*M)/k,T=(y*w-x*b)/k;n-=A,r-=T}while((Math.abs(A)>z||Math.abs(T)>z)&&--a>0);return[n,r]}},(t.geo.aitoff=function(){return D(b)}).raw=b,_.invert=function(t,e){var n=t,r=e,a=25;do{var o,i=Math.cos(r),l=Math.sin(r),c=Math.sin(2*r),u=l*l,f=i*i,d=Math.sin(n),h=Math.cos(n/2),p=Math.sin(n/2),g=p*p,m=1-f*h*h,v=m?s(i*h)*Math.sqrt(o=1/m):o=0,y=.5*(2*v*i*p+n/P)-t,x=.5*(v*l+r)-e,b=.5*o*(f*g+v*i*h*u)+.5/P,_=o*(d*c/4-v*l*p),w=.125*o*(c*p-v*l*f*d),M=.5*o*(u*h+v*g*i)+.5,k=_*w-M*b,A=(x*_-y*M)/k,T=(y*w-x*b)/k;n-=A,r-=T}while((Math.abs(A)>z||Math.abs(T)>z)&&--a>0);return[n,r]},(t.geo.winkel3=function(){return D(_)}).raw=_}e.exports=r},{}],181:[function(t,e,n){"use strict";function r(t,e){var n=t.projection,r=t.lonaxis,i=t.lataxis,s=t.domain,c=t.framewidth||0,u=e.w*(s.x[1]-s.x[0]),f=e.h*(s.y[1]-s.y[0]),d=r.range[0]+l,h=r.range[1]-l,p=i.range[0]+l,g=i.range[1]-l,m=r._fullRange[0]+l,v=r._fullRange[1]-l,y=i._fullRange[0]+l,x=i._fullRange[1]-l;n._translate0=[e.l+u/2,e.t+f/2];var b=h-d,_=g-p,w=[d+b/2,p+_/2],M=n._rotate;n._center=[w[0]+M[0],w[1]+M[1]];var k=function(e){function r(t){return Math.min(_*u/(t[1][0]-t[0][0]),_*f/(t[1][1]-t[0][1]))}var i,l,s,b,_=e.scale(),w=n._translate0,M=a(d,p,h,g),k=a(m,y,v,x);s=o(e,M),i=r(s),b=o(e,k),n._fullScale=r(b),e.scale(i),s=o(e,M),l=[w[0]-s[0][0]+c,w[1]-s[0][1]+c],n._translate=l,e.translate(l),s=o(e,M),t._isAlbersUsa||e.clipExtent(s),i=n.scale*i,n._scale=i,t._width=Math.round(s[1][0])+c,t._height=Math.round(s[1][1])+c,t._marginX=(u-Math.round(s[1][0]))/2,t._marginY=(f-Math.round(s[1][1]))/2};return k}function a(t,e,n,r){var a=(n-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,r],[t+a,r],[t+2*a,r],[t+3*a,r],[n,r],[n,e],[n-a,e],[n-2*a,e],[n-3*a,e],[t,e]]]}}function o(t,e){return i.geo.path().projection(t).bounds(e)}var i=t("d3"),l=t("./constants").clipPad;e.exports=r},{"./constants":172,d3:10}],182:[function(t,e,n){"use strict";function r(t,e){var n;return(n=e._isScoped?o:e._clipAngle?l:i)(t,e.projection)}function a(t,e){var n=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*n,100*n])}function o(t,e){function n(){_.select(this).style(k)}function r(){l.scale(Math.max(s,_.event.scale)),i.scale(Math.max(s,_.event.scale)).translate(_.event.translate),t.render()}function o(){_.select(this).style(A)}var i=t.projection,l=a(i,e),s=i.scale();return l.on("zoomstart",n).on("zoom",r).on("zoomend",o),l}function i(t,e){function n(t){return m.invert(t)}function r(t){var e=m(n(t));return Math.abs(e[0]-t[0])>x||Math.abs(e[1]-t[1])>x}function o(){_.select(this).style(k),s=_.mouse(this),c=m.rotate(),u=m.translate(),f=c,d=n(s)}function i(){if(h=_.mouse(this),r(s))return v.scale(m.scale()),void v.translate(m.translate());m.scale(Math.max(y,_.event.scale));var e=m.scale()*Math.PI,a=u[0]-e/2,o=e/2,i=Math.min(Math.max(_.event.translate[1],a),o);m.translate([u[0],i]),v.translate([u[0],i]),d?n(h)&&(g=n(h),p=[f[0]+(g[0]-d[0]),c[1],c[2]],m.rotate(p),f=p):(s=h,d=n(s)),t.render()}function l(){_.select(this).style(A)}var s,c,u,f,d,h,p,g,m=t.projection,v=a(m,e),y=m.scale(),x=2;return v.on("zoomstart",o).on("zoom",i).on("zoomend",l),v}function l(t,e){function n(t){v++||t({type:"zoomstart"})}function r(t){t({type:"zoom"})}function o(t){--v||t({type:"zoomend"})}var i,l=t.projection,h={r:l.rotate(),k:l.scale()},p=a(l,e),g=b(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=l.rotate(),a=e,o=l.translate(),v=c(e);i=s(l,t),y.call(p,"zoom",function(){var n=_.mouse(this);if(l.scale(h.k=_.event.scale),i){if(s(l,n)){l.rotate(e).translate(o);var c=s(l,n),p=f(i,c),y=m(u(v,p)),x=h.r=d(y,i,a);isFinite(x[0])&&isFinite(x[1])&&isFinite(x[2])||(x=a),l.rotate(x),a=x}}else t=n,i=s(l,t);r(g.of(this,arguments))}),n(g.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),o(g.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,g,"on")}function s(t,e){var n=t.invert(e);return n&&isFinite(n[0])&&isFinite(n[1])&&v(n)}function c(t){var e=.5*t[0]*w,n=.5*t[1]*w,r=.5*t[2]*w,a=Math.sin(e),o=Math.cos(e),i=Math.sin(n),l=Math.cos(n),s=Math.sin(r),c=Math.cos(r);return[o*l*c+a*i*s,a*l*c-o*i*s,o*i*c+a*l*s,o*l*s-a*i*c]}function u(t,e){var n=t[0],r=t[1],a=t[2],o=t[3],i=e[0],l=e[1],s=e[2],c=e[3];return[n*i-r*l-a*s-o*c,n*l+r*i+a*c-o*s,n*s-r*c+a*i+o*l,n*c+r*s-a*l+o*i]}function f(t,e){if(t&&e){var n=x(t,e),r=Math.sqrt(y(n,n)),a=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),o=Math.sin(a)/r;return r&&[Math.cos(a),n[2]*o,-n[1]*o,n[0]*o]}}function d(t,e,n){var r=g(e,2,t[0]);r=g(r,1,t[1]),r=g(r,0,t[2]-n[2]);var a,o,i=e[0],l=e[1],s=e[2],c=r[0],u=r[1],f=r[2],d=Math.atan2(l,i)*M,p=Math.sqrt(i*i+l*l);Math.abs(u)>p?(o=(u>0?90:-90)-d,a=0):(o=Math.asin(u/p)*M-d,a=Math.sqrt(p*p-u*u));var m=180-o-2*d,v=(Math.atan2(f,c)-Math.atan2(s,a))*M,y=(Math.atan2(f,c)-Math.atan2(s,-a))*M,x=h(n[0],n[1],o,v),b=h(n[0],n[1],m,y);return x<=b?[o,v,n[2]]:[m,y,n[2]]}function h(t,e,n,r){var a=p(n-t),o=p(r-e);return Math.sqrt(a*a+o*o)}function p(t){return(t%360+540)%360-180}function g(t,e,n){var r=n*w,a=t.slice(),o=0===e?1:0,i=2===e?1:2,l=Math.cos(r),s=Math.sin(r);return a[o]=t[o]*l-t[i]*s,a[i]=t[i]*l+t[o]*s,a}function m(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,n=t[1]*w,r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function y(t,e){for(var n=0,r=0,a=t.length;r=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),n.attr(o);var i=n.select(".js-link-to-tool"),l=n.select(".js-link-spacer"),c=n.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&r(t,i),l.text(i.text()&&c.text()?" - ":"")},p.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",n=s.select(t).append("div").attr("id","hiddenform").style("display","none"),r=n.append("form").attr({action:e+"/external",method:"post",target:"_blank"}),a=r.append("input").attr({type:"text",name:"data"});return a.node().value=p.graphJson(t,!1,"keepdata"),r.node().submit(),n.remove(),t.emit("plotly_afterexport"),!1},p.supplyDefaults=function(t){var e,n=t._fullLayout||{},r=t._fullLayout={},o=t.layout||{},i=t._fullData||[],l=t._fullData=[],s=t.data||[];if(t._transitionData||p.createTransitionData(t),n._initialAutoSizeIsDone){var c=n.width,f=n.height;p.supplyLayoutGlobalDefaults(o,r),o.width||(r.width=c),o.height||(r.height=f)}else{p.supplyLayoutGlobalDefaults(o,r);var d=!o.width||!o.height,h=r.autosize,g=t._context&&t._context.autosizable,m=d&&(h||g);m?p.plotAutoSize(t,o,r):d&&p.sanitizeMargins(t),!h&&d&&(o.width=r.width,o.height=r.height)}r._initialAutoSizeIsDone=!0,r._dataLength=s.length,r._globalTransforms=(t._context||{}).globalTransforms,p.supplyDataDefaults(s,l,o,r),r._has=p._hasPlotType.bind(r);var v=r._modules;for(e=0;e0){var u=l(t._boundingBoxMargins),f=u.left+u.right,h=u.bottom+u.top,g=1-2*i,m=n._container&&n._container.node?n._container.node().getBoundingClientRect():{width:n.width,height:n.height};r=Math.round(g*(m.width-f)),a=Math.round(g*(m.height-h))}else{var v=s?window.getComputedStyle(t):{};r=parseFloat(v.width)||n.width,a=parseFloat(v.height)||n.height}var y=p.layoutAttributes.width.min,x=p.layoutAttributes.height.min;r1,_=!e.height&&Math.abs(n.height-a)>1;(_||b)&&(b&&(n.width=r),_&&(n.height=a)),t._initialAutoSize||(t._initialAutoSize={width:r,height:a}),p.sanitizeMargins(n)},p.supplyLayoutModuleDefaults=function(t,e,n,r){var a,o;u.Axes.supplyLayoutDefaults(t,e,n);var i=e._basePlotModules;for(a=0;a.5*r.width&&(n.l=n.r=0),n.b+n.t>.5*r.height&&(n.b=n.t=0),r._pushmargin[e]={l:{val:n.x,size:n.l+a},r:{val:n.x,size:n.r+a},b:{val:n.y,size:n.b+a},t:{val:n.y,size:n.t+a}}}else delete r._pushmargin[e];t._replotting||p.doAutoMargin(t)}},p.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var n=e._size,r=JSON.stringify(n),a=Math.max(e.margin.l||0,0),o=Math.max(e.margin.r||0,0),i=Math.max(e.margin.t||0,0),l=Math.max(e.margin.b||0,0),s=e._pushmargin;if(e.margin.autoexpand!==!1&&(s.base={l:{val:0,size:a},r:{val:1,size:o},t:{val:1,size:i},b:{val:0,size:l}},Object.keys(s).forEach(function(t){var n=s[t].l||{},r=s[t].b||{},u=n.val,f=n.size,d=r.val,h=r.size;Object.keys(s).forEach(function(t){if(c(f)&&s[t].r){var n=s[t].r.val,r=s[t].r.size;if(n>u){var p=(f*n+(r-e.width)*u)/(n-u),g=(r*(1-u)+(f-e.width)*(1-n))/(n-u);p>=0&&g>=0&&p+g>a+o&&(a=p,o=g)}}if(c(h)&&s[t].t){var m=s[t].t.val,v=s[t].t.size;if(m>d){var y=(h*m+(v-e.height)*d)/(m-d),x=(v*(1-d)+(h-e.height)*(1-m))/(m-d);y>=0&&x>=0&&y+x>l+i&&(l=y,i=x)}}})})),n.l=Math.round(a),n.r=Math.round(o),n.t=Math.round(i),n.b=Math.round(l),n.p=Math.round(e.margin.pad),n.w=Math.round(e.width)-n.l-n.r,n.h=Math.round(e.height)-n.t-n.b,!t._replotting&&"{}"!==r&&r!==JSON.stringify(e._size))return u.plot(t)},p.graphJson=function(t,e,n,r,a){function o(t){if("function"==typeof t)return null;if(d.isPlainObject(t)){var e,r,a={};for(e in t)if("function"!=typeof t[e]&&["_","["].indexOf(e.charAt(0))===-1){if("keepdata"===n){if("src"===e.substr(e.length-3))continue}else if("keepstream"===n){if(r=t[e+"src"],"string"==typeof r&&r.indexOf(":")>0&&!d.isPlainObject(t.stream))continue}else if("keepall"!==n&&(r=t[e+"src"],"string"==typeof r&&r.indexOf(":")>0))continue;a[e]=o(t[e])}return a}return Array.isArray(t)?t.map(o):d.isJSDate(t)?d.ms2DateTime(+t):t}(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&p.supplyDefaults(t);var i=a?t._fullData:t.data,l=a?t._fullLayout:t.layout,s={data:(i||[]).map(function(t){var n=o(t);return e&&delete n.fit,n})};return e||(s.layout=o(l)),t.framework&&t.framework.isPolar&&(s=t.framework.getConfig()),"object"===r?s:JSON.stringify(s)},p.modifyFrames=function(t,e){var n,r,a,o=t._transitionData._frames,i=t._transitionData._frameHash;for(n=0;n0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){_=!0}),a.redraw&&t._transitionData._interruptCallbacks.push(function(){return u.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var i,l,s=0,c=0,h=t._fullLayout._basePlotModules,p=!1;if(n)for(l=0;l=0,z=C?f.angularAxis.domain:r.extent(k),S=Math.abs(k[1]-k[0]);T&&!A&&(S=0);var O=z.slice();L&&A&&(O[1]+=S);var P=f.angularAxis.ticksCount||4;P>8&&(P=P/(P/8)+P%8),f.angularAxis.ticksStep&&(P=(O[1]-O[0])/P);var E=f.angularAxis.ticksStep||(O[1]-O[0])/(P*(f.minorTicks+1));M&&(E=Math.max(Math.round(E),1)),O[2]||(O[2]=E);var N=r.range.apply(this,O);if(N=N.map(function(t,e){return parseFloat(t.toPrecision(12))}),l=r.scale.linear().domain(O.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=l.domain(),u.layout.angularAxis.endPadding=L?S:0,e=r.select(this).select("svg.chart-root"),"undefined"==typeof e||e.empty()){var D="' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '",R=(new DOMParser).parseFromString(D,"application/xml"),j=this.appendChild(this.ownerDocument.importNode(R.documentElement,!0));e=r.select(j)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var I,F=e.select(".chart-group"),B={fill:"none",stroke:f.tickColor},q={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){I=e.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var H=h.map(function(t,e){var n=i.util.cloneJson(t);return n.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",n.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,n.color="LinePlot"===t.geometry?t.strokeColor:t.color,n});i.Legend().config({data:h.map(function(t,e){return t.name||"Element"+e}),legendConfig:o({},i.Legend.defaultConfig().legendConfig,{container:I,elements:H,reverseOrder:f.legend.reverseOrder})})();var V=I.node().getBBox();x=Math.min(f.width-V.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],a.range([0,x]),u.layout.radialAxis.domain=a.domain(),I.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else I=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),F.attr("transform","translate("+_+")").style({cursor:"crosshair"});var G=[(f.width-(f.margin.left+f.margin.right+2*x+(V?V.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(G[0]=Math.max(0,G[0]),G[1]=Math.max(0,G[1]),e.select(".outer-group").attr("transform","translate("+G+")"),f.title){var U=e.select("g.title-group text").style(q).text(f.title),X=U.node().getBBox();U.attr({x:_[0]-X.width/2,y:_[1]-x-20})}var Y=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var Z=Y.selectAll("circle.grid-circle").data(a.ticks(5));Z.enter().append("circle").attr({class:"grid-circle"}).style(B),Z.attr("r",a),Z.exit().remove()}Y.select("circle.outside-circle").attr({r:x}).style(B);var W=e.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});if(f.radialAxis.visible){var Q=r.svg.axis().scale(a).ticks(5).tickSize(5);Y.call(Q).attr({transform:"rotate("+f.radialAxis.orientation+")"}),Y.selectAll(".domain").style(B),Y.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(q).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,q["font-size"]]+")":"translate("+[0,q["font-size"]]+")"}}),Y.selectAll("g>line").style({stroke:"black"})}var $=e.select(".angular.axis-group").selectAll("g.angular-tick").data(N),J=$.enter().append("g").classed("angular-tick",!0);$.attr({transform:function(t,e){return"rotate("+s(t,e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),$.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(B),J.selectAll(".minor").style({stroke:f.minorTickColor}),$.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(q);var K=$.select("text.axis-text").attr({x:x+f.labelOffset,dy:".35em",transform:function(t,e){var n=s(t,e),r=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-n+" "+r+" 0)":"radial"==a?n<270&&n>90?"rotate(180 "+r+" 0)":null:"rotate("+(n<=180&&n>0?-90:90)+" "+r+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":M?M[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(q);f.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var tt=r.max(F.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));I.attr({transform:"translate("+[x+tt,f.margin.top]+")"});var et=e.select("g.geometry-group").selectAll("g").size()>0,nt=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(nt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),nt.exit().remove(),h[0]||et){var rt=[];h.forEach(function(t,e){var n={};n.radialScale=a,n.angularScale=l,n.container=nt.filter(function(t,n){return n==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,rt.push({data:t,geometryConfig:n})});var at=r.nest().key(function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"}).entries(rt),ot=[];at.forEach(function(t,e){"unstacked"===t.key?ot=ot.concat(t.values.map(function(t,e){return[t]})):ot.push(t.values)}),ot.forEach(function(t,e){var n;n=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var r=t.map(function(t,e){return o(i[n].defaultConfig(),t)});i[n]().config(r)()})}var it,lt,st=e.select(".guides-group"),ct=e.select(".tooltips-group"),ut=i.tooltipPanel().config({container:ct,fontSize:8})(),ft=i.tooltipPanel().config({container:ct,fontSize:8})(),dt=i.tooltipPanel().config({container:ct,hasTick:!0})();if(!A){var ht=st.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});F.on("mousemove.angular-guide",function(t,e){var n=i.util.getMousePos(W).angle;ht.attr({x2:-x,transform:"rotate("+n+")"}).style({opacity:.5});var r=(n+180+360-f.orientation)%360;it=l.invert(r);var a=i.util.convertToCartesian(x+12,n+180);ut.text(i.util.round(it)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){st.select("line").style({opacity:0})})}var pt=st.select("circle").style({stroke:"grey",fill:"none"});F.on("mousemove.radial-guide",function(t,e){var n=i.util.getMousePos(W).radius;pt.attr({r:n}).style({opacity:.5}),lt=a.invert(i.util.getMousePos(W).radius);var r=i.util.convertToCartesian(n,f.radialAxis.orientation);ft.text(i.util.round(lt)).move([r[0]+_[0],r[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){pt.style({opacity:0}),dt.hide(),ut.hide(),ft.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,n){var a=r.select(this),o=a.style("fill"),l="black",s=a.style("opacity")||1;if(a.attr({"data-opacity":s}),"none"!=o){a.attr({"data-fill":o}),l=r.hsl(o).darker().toString(),a.style({fill:l,opacity:1});var c={t:i.util.round(t[0]),r:i.util.round(t[1])};A&&(c.t=M[t[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),d=e.node().getBoundingClientRect(),h=[f.left+f.width/2-G[0]-d.left,f.top+f.height/2-G[1]-d.top];dt.config({color:l}).text(u),dt.move(h)}else o=a.style("stroke"),a.attr({"data-stroke":o}),l=r.hsl(o).darker().toString(),a.style({stroke:l,opacity:1})}).on("mousemove.tooltip",function(t,e){return 0==r.event.which&&void(r.select(this).attr("data-fill")&&dt.show())}).on("mouseout.tooltip",function(t,e){dt.hide();var n=r.select(this),a=n.attr("data-fill");a?n.style({fill:a,opacity:n.attr("data-opacity")}):n.style({stroke:n.attr("data-stroke"),opacity:n.attr("data-opacity")})})}),d}var e,n,a,l,s={data:[],layout:{}},c={},u={},f=r.dispatch("hover"),d={};return d.render=function(e){return t(e),this},d.config=function(t){if(!arguments.length)return s;var e=i.util.cloneJson(t);return e.data.forEach(function(t,e){s.data[e]||(s.data[e]={}),o(s.data[e],i.Axis.defaultConfig().data[0]),o(s.data[e],t)}),o(s.layout,i.Axis.defaultConfig().layout),o(s.layout,e.layout),this},d.getLiveConfig=function(){return u},d.getinputConfig=function(){return c},d.radialScale=function(t){return a},d.angularScale=function(t){return l},d.svg=function(){return e},r.rebind(d,f,"on"),d},i.Axis.defaultConfig=function(t,e){var n={data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:r.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}};return n},i.util={},i.DATAEXTENT="dataExtent",i.AREA="AreaChart",i.LINE="LinePlot",i.DOT="DotPlot",i.BAR="BarChart",i.util._override=function(t,e){for(var n in t)n in e&&(e[n]=t[n])},i.util._extend=function(t,e){for(var n in t)e[n]=t[n]},i.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},i.util.dataFromEquation2=function(t,e){var n=e||6,a=r.range(0,360+n,n).map(function(e,n){var r=e*Math.PI/180,a=t(r);return[e,a]});return a},i.util.dataFromEquation=function(t,e,n){var a=e||6,o=[],i=[];r.range(0,360+a,a).forEach(function(e,n){var r=e*Math.PI/180,a=t(r);o.push(e),i.push(a)});var l={t:o,r:i};return n&&(l.name=n),l},i.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var n=[].concat(t);return r.range(e).map(function(t,e){return n[e]||n[0]})},i.util.fillArrays=function(t,e,n){return e.forEach(function(e,r){t[e]=i.util.ensureArray(t[e],n)}),t},i.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},i.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var n=e.shift();return t[n]&&(!e.length||objHasKeys(t[n],e))},i.util.sumArrays=function(t,e){return r.zip(t,e).map(function(t,e){return r.sum(t)})},i.util.arrayLast=function(t){return t[t.length-1]},i.util.arrayEqual=function(t,e){for(var n=Math.max(t.length,e.length,1);n-- >=0&&t[n]===e[n];);return n===-2},i.util.flattenArray=function(t){for(var e=[];!i.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},i.util.deduplicate=function(t){return t.filter(function(t,e,n){return n.indexOf(t)==e})},i.util.convertToCartesian=function(t,e){var n=e*Math.PI/180,r=t*Math.cos(n),a=t*Math.sin(n);return[r,a]},i.util.round=function(t,e){var n=e||2,r=Math.pow(10,n);return Math.round(t*r)/r},i.util.getMousePos=function(t){var e=r.mouse(t.node()),n=e[0],a=e[1],o={};return o.x=n,o.y=a,o.pos=e,o.angle=180*(Math.atan2(a,n)+Math.PI)/Math.PI,o.radius=Math.sqrt(n*n+a*a),o},i.util.duplicatesCount=function(t){for(var e,n={},r={},a=0,o=t.length;a0)){var l=r.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:d(i),transform:function(e,n){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return m.fill(n,a,o)},"fill-opacity":0,stroke:function(t,e){return m.stroke(n,a,o)},"stroke-width":function(t,e){return m["stroke-width"](n,a,o)},"stroke-dasharray":function(t,e){return m["stroke-dasharray"](n,a,o)},opacity:function(t,e){return m.opacity(n,a,o)},display:function(t,e){return m.display(n,a,o)}})}};var h=t.angularScale.range(),p=Math.abs(h[1]-h[0])/s[0].length*Math.PI/180,g=r.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(u+(e[2]||0))}).outerRadius(function(e){return t.radialScale(u+(e[2]||0))+t.radialScale(e[1])});f.arc=function(e,n,a){r.select(this).attr({class:"mark arc",d:g,transform:function(e,n){return"rotate("+(t.orientation+c(e[0])+90)+")"}})};var m={fill:function(t,n,r){return e[r].data.color},stroke:function(t,n,r){return e[r].data.strokeColor},"stroke-width":function(t,n,r){return e[r].data.strokeSize+"px"},"stroke-dasharray":function(t,n,r){return l[e[r].data.strokeDash]},opacity:function(t,n,r){return e[r].data.opacity},display:function(t,n,r){return"undefined"==typeof e[r].data.visible||e[r].data.visible?"block":"none"}},v=r.select(this).selectAll("g.layer").data(s);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(m).each(f[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e,n=[i.PolyChart.defaultConfig()],a=r.dispatch("hover"),l={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,e){n[e]||(n[e]={}),o(n[e],i.PolyChart.defaultConfig()),o(n[e],t)}),this):n},t.getColorScale=function(){return e},r.rebind(t,a,"on"),t},i.PolyChart.defaultConfig=function(){var t={data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:r.scale.category20()}};return t},i.BarChart=function(){return i.PolyChart()},i.BarChart.defaultConfig=function(){var t={geometryConfig:{geometryType:"bar"}};return t},i.AreaChart=function(){return i.PolyChart()},i.AreaChart.defaultConfig=function(){var t={geometryConfig:{geometryType:"arc"}};return t},i.DotPlot=function(){return i.PolyChart()},i.DotPlot.defaultConfig=function(){var t={geometryConfig:{geometryType:"dot",dotType:"circle"}};return t},i.LinePlot=function(){return i.PolyChart()},i.LinePlot.defaultConfig=function(){var t={geometryConfig:{geometryType:"line"}};return t},i.Legend=function(){function t(){var n=e.legendConfig,a=e.data.map(function(t,e){return[].concat(t).map(function(t,r){var a=o({},n.elements[e]);return a.name=t,a.color=[].concat(n.elements[e].color)[r],a})}),i=r.merge(a);i=i.filter(function(t,e){return n.elements[e]&&(n.elements[e].visibleInLegend||"undefined"==typeof n.elements[e].visibleInLegend)}),n.reverseOrder&&(i=i.reverse());var l=n.container;("string"==typeof l||l.nodeName)&&(l=r.select(l));var s=i.map(function(t,e){return t.color}),c=n.fontSize,u=null==n.isContinuous?"number"==typeof i[0]:n.isContinuous,f=u?n.height:c*i.length,d=l.classed("legend-group",!0),h=d.selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var g=r.range(i.length),m=r.scale[u?"linear":"ordinal"]().domain(g).range(s),v=r.scale[u?"linear":"ordinal"]().domain(g)[u?"range":"rangePoints"]([0,f]),y=function(t,e){var n=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":r.svg.symbolTypes.indexOf(t)!=-1?r.svg.symbol().type(t).size(n)():r.svg.symbol().type("square").size(n)()};if(u){var x=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(s);x.enter().append("stop"),x.attr({offset:function(t,e){return e/(s.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:n.height,width:n.colorBandWidth,fill:"url(#grad1)"})}else{var b=h.select(".legend-marks").selectAll("path.legend-mark").data(i);b.enter().append("path").classed("legend-mark",!0),b.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var n=t.symbol;return y(n,c)},fill:function(t,e){return m(e)}}),b.exit().remove()}var _=r.svg.axis().scale(v).orient("right"),w=h.select("g.legend-axis").attr({transform:"translate("+[u?n.colorBandWidth:c,c/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:u?n.textColor:"none"}),w.selectAll("text").style({fill:n.textColor,"font-size":n.fontSize}).text(function(t,e){return i[e].name}),t}var e=i.Legend.defaultConfig(),n=r.dispatch("hover");return t.config=function(t){return arguments.length?(o(e,t),this):e},r.rebind(t,n,"on"),t},i.Legend.defaultConfig=function(t,e){var n={data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}};return n},i.tooltipPanel=function(){var t,e,n,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},l="tooltip-"+i.tooltipPanel.uid++,s=10,c=function(){t=a.container.selectAll("g."+l).data([0]);var r=t.enter().append("g").classed(l,!0).style({"pointer-events":"none",display:"none"});return n=r.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=r.append("text").attr({dx:a.padding+s,dy:.3*+a.fontSize}),c};return c.text=function(o){var i=r.hsl(a.color).l,l=i>=.5?"#aaa":"white",u=i>=.5?"black":"white",f=o||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(f);var d=a.padding,h=e.node().getBBox(),p={fill:a.color,stroke:l,"stroke-width":"2px"},g=h.width+2*d+s,m=h.height+2*d;return n.attr({d:"M"+[[s,-m/2],[s,-m/4],[a.hasTick?0:s,0],[s,m/4],[s,m/2],[g,m/2],[g,-m/2]].join("L")+"Z"}).style(p),t.attr({transform:"translate("+[s,-m/2+2*d]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return o(a,t),c},c},i.tooltipPanel.uid=1,i.adapter={},i.adapter.plotly=function(){var t={};return t.convert=function(t,e){var n={};if(t.data&&(n.data=t.data.map(function(t,n){var r=o({},t),a=[[r,["marker","color"],["color"]],[r,["marker","opacity"],["opacity"]],[r,["marker","line","color"],["strokeColor"]],[r,["marker","line","dash"],["strokeDash"]],[r,["marker","line","width"],["strokeSize"]],[r,["marker","symbol"],["dotType"]],[r,["marker","size"],["dotSize"]],[r,["marker","barWidth"],["barWidth"]],[r,["line","interpolation"],["lineInterpolation"]],[r,["showlegend"],["visibleInLegend"]]];return a.forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e||delete r.marker,e&&delete r.groupId,e?("LinePlot"===r.geometry?(r.type="scatter",r.dotVisible===!0?(delete r.dotVisible,r.mode="lines+markers"):r.mode="lines"):"DotPlot"===r.geometry?(r.type="scatter",r.mode="markers"):"AreaChart"===r.geometry?r.type="area":"BarChart"===r.geometry&&(r.type="bar"),delete r.geometry):("scatter"===r.type?"lines"===r.mode?r.geometry="LinePlot":"markers"===r.mode?r.geometry="DotPlot":"lines+markers"===r.mode&&(r.geometry="LinePlot",r.dotVisible=!0):"area"===r.type?r.geometry="AreaChart":"bar"===r.type&&(r.geometry="BarChart"),delete r.mode,delete r.type),r}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=i.util.duplicates(n.data.map(function(t,e){return t.geometry}));n.data.forEach(function(t,e){var r=a.indexOf(t.geometry);r!=-1&&(n.data[e].groupId=r)})}if(t.layout){var l=o({},t.layout),s=[[l,["plot_bgcolor"],["backgroundColor"]],[l,["showlegend"],["showLegend"]],[l,["radialaxis"],["radialAxis"]],[l,["angularaxis"],["angularAxis"]],[l.angularaxis,["showline"],["gridLinesVisible"]],[l.angularaxis,["showticklabels"],["labelsVisible"]],[l.angularaxis,["nticks"],["ticksCount"]],[l.angularaxis,["tickorientation"],["tickOrientation"]],[l.angularaxis,["ticksuffix"],["ticksSuffix"]],[l.angularaxis,["range"],["domain"]],[l.angularaxis,["endpadding"],["endPadding"]],[l.radialaxis,["showline"],["gridLinesVisible"]],[l.radialaxis,["tickorientation"],["tickOrientation"]],[l.radialaxis,["ticksuffix"],["ticksSuffix"]],[l.radialaxis,["range"],["domain"]],[l.angularAxis,["showline"],["gridLinesVisible"]],[l.angularAxis,["showticklabels"],["labelsVisible"]],[l.angularAxis,["nticks"],["ticksCount"]],[l.angularAxis,["tickorientation"],["tickOrientation"]],[l.angularAxis,["ticksuffix"],["ticksSuffix"]],[l.angularAxis,["range"],["domain"]],[l.angularAxis,["endpadding"],["endPadding"]],[l.radialAxis,["showline"],["gridLinesVisible"]],[l.radialAxis,["tickorientation"],["tickOrientation"]],[l.radialAxis,["ticksuffix"],["ticksSuffix"]],[l.radialAxis,["range"],["domain"]],[l.font,["outlinecolor"],["outlineColor"]],[l.legend,["traceorder"],["reverseOrder"]],[l,["labeloffset"],["labelOffset"]],[l,["defaultcolorrange"],["defaultColorRange"]]];if(s.forEach(function(t,n){i.util.translator.apply(null,t.concat(e))}),e?("undefined"!=typeof l.tickLength&&(l.angularaxis.ticklen=l.tickLength,delete l.tickLength),l.tickColor&&(l.angularaxis.tickcolor=l.tickColor,delete l.tickColor)):(l.angularAxis&&"undefined"!=typeof l.angularAxis.ticklen&&(l.tickLength=l.angularAxis.ticklen),l.angularAxis&&"undefined"!=typeof l.angularAxis.tickcolor&&(l.tickColor=l.angularAxis.tickcolor)),l.legend&&"boolean"!=typeof l.legend.reverseOrder&&(l.legend.reverseOrder="normal"!=l.legend.reverseOrder),l.legend&&"boolean"==typeof l.legend.traceorder&&(l.legend.traceorder=l.legend.traceorder?"reversed":"normal",delete l.legend.reverseOrder),l.margin&&"undefined"!=typeof l.margin.t){var c=["t","r","b","l","pad"],u=["top","right","bottom","left","pad"],f={};r.entries(l.margin).forEach(function(t,e){f[u[c.indexOf(t.key)]]=t.value}),l.margin=f}e&&(delete l.needsEndSpacing,delete l.minorTickColor,delete l.minorTicks,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksStep,delete l.angularaxis.rewriteTicks,delete l.angularaxis.nticks,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksStep,delete l.radialaxis.rewriteTicks,delete l.radialaxis.nticks),n.layout=l}return n},t}},{"../../lib":122,d3:10}],191:[function(t,e,n){"use strict";var r=t("d3"),a=t("../../lib"),o=t("../../components/color"),i=t("./micropolar"),l=t("./undo_manager"),s=a.extendDeepAll,c=e.exports={};c.framework=function(t){function e(e,a){return a&&(f=a),r.select(r.select(f).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),n=n?s(n,e):e,o||(o=i.Axis()),u=i.adapter.plotly().convert(n),o.config(u).render(f),t.data=n.data,t.layout=n.layout,c.fillLayout(t),n}var n,a,o,u,f,d=new l;return e.isPolar=!0,e.svg=function(){return o.svg()},e.getConfig=function(){return n},e.getLiveConfig=function(){return i.adapter.plotly().convert(o.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:o.angularScale(),r:o.radialScale()}},e.setUndoPoint=function(){var t=this,e=i.util.cloneJson(n);!function(e,n){d.add({undo:function(){n&&t(n)},redo:function(){t(e)}})}(e,a),a=i.util.cloneJson(e)},e.undo=function(){d.undo()},e.redo=function(){d.redo()},e},c.fillLayout=function(t){var e=r.select(t).selectAll(".plot-container"),n=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),i={width:800,height:600,paper_bgcolor:o.background,_container:e,_paperdiv:n,_paper:a};t._fullLayout=s(i,t.layout)}},{"../../components/color":27,"../../lib":122,"./micropolar":190,"./undo_manager":192,d3:10}],192:[function(t,e,n){"use strict";e.exports=function(){function t(t,e){return t?(a=!0,t[e](),a=!1,this):this}var e,n=[],r=-1,a=!1;return{add:function(t){return a?this:(n.splice(r+1,n.length-r),n.push(t),r=n.length-1,this)},setCallback:function(t){e=t},undo:function(){var a=n[r];return a?(t(a,"undo"),r-=1,e&&e(a.undo),this):this},redo:function(){var a=n[r+1];return a?(t(a,"redo"),r+=1,e&&e(a.redo),this):this},clear:function(){n=[],r=-1},hasUndo:function(){return r!==-1},hasRedo:function(){return r