{ "version": 3, "sources": ["../../../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js", "../../../node_modules/mapbox-gl/src/util/browser/window.js", "../../../node_modules/mapbox-gl/src/util/config.js", "../../../node_modules/mapbox-gl/src/util/webp_supported.js", "../../../node_modules/mapbox-gl/src/util/sku_token.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/unitbezier/index.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/point-geometry/index.js", "../../../node_modules/mapbox-gl/src/util/util.js", "../../../node_modules/mapbox-gl/src/util/tile_request_cache.js", "../../../node_modules/mapbox-gl/src/util/ajax.js", "../../../node_modules/mapbox-gl/src/util/mapbox.js", "../../../node_modules/mapbox-gl/src/util/live_performance.js", "../../../node_modules/mapbox-gl/src/util/performance.js", "../../../node_modules/mapbox-gl/src/util/browser.js", "../../../node_modules/mapbox-gl/src/util/evented.js", "../../../node_modules/mapbox-gl/src/style-spec/util/extend.js", "../../../node_modules/mapbox-gl/src/style-spec/util/unbundle_jsonlint.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/parsing_error.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/scope.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/types.js", "../../../node_modules/mapbox-gl/node_modules/csscolorparser/csscolorparser.js", "../../../node_modules/mapbox-gl/src/style-spec/util/color.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/types/collator.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/types/formatted.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/types/resolved_image.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/values.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/literal.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/runtime_error.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/assertion.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/format.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/image.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/coercion.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/evaluation_context.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/compound_expression.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/collator.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/within.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/is_constant.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/var.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/parsing_context.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/stops.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/step.js", "../../../node_modules/mapbox-gl/src/style-spec/util/interpolate.js", "../../../node_modules/mapbox-gl/src/style-spec/util/color_spaces.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/interpolate.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/coalesce.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/let.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/at.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/in.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/index_of.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/match.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/case.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/slice.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/comparison.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/number_format.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/length.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/definitions/index.js", "../../../node_modules/mapbox-gl/src/style-spec/util/result.js", "../../../node_modules/mapbox-gl/src/style-spec/util/properties.js", "../../../node_modules/mapbox-gl/src/style-spec/util/get_type.js", "../../../node_modules/mapbox-gl/src/style-spec/function/index.js", "../../../node_modules/mapbox-gl/src/style-spec/expression/index.js", "../../../node_modules/mapbox-gl/src/style-spec/error/validation_error.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_object.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_array.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_number.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_function.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_expression.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_enum.js", "../../../node_modules/mapbox-gl/src/style-spec/feature_filter/index.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_filter.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_property.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_paint_property.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_layout_property.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_layer.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_string.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_source.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_light.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_terrain.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_fog.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_boolean.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_color.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_formatted.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_image.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_projection.js", "../../../node_modules/mapbox-gl/src/style-spec/validate/validate_glyphs_url.js", "../../../node_modules/mapbox-gl/src/style-spec/validate_style.min.js", "../../../node_modules/mapbox-gl/src/style/validate_style.js", "../../../node_modules/mapbox-gl/node_modules/grid-index/grid-index.js", "../../../node_modules/mapbox-gl/src/util/web_worker_transfer.js", "../../../node_modules/mapbox-gl/src/util/is_char_in_unicode_block.js", "../../../node_modules/mapbox-gl/src/util/script_detection.js", "../../../node_modules/mapbox-gl/src/source/rtl_text_plugin.js", "../../../node_modules/mapbox-gl/src/style/evaluation_parameters.js", "../../../node_modules/mapbox-gl/src/style/properties.js", "../../../node_modules/mapbox-gl/src/shaders/encode_attribute.js", "../../../node_modules/mapbox-gl/src/util/struct_array.js", "../../../node_modules/mapbox-gl/src/data/array_types.js", "../../../node_modules/mapbox-gl/src/data/bucket/pattern_attributes.js", "../../../node_modules/mapbox-gl/src/data/bucket/dash_attributes.js", "../../../node_modules/mapbox-gl/node_modules/murmurhash-js/murmurhash3_gc.js", "../../../node_modules/mapbox-gl/node_modules/murmurhash-js/murmurhash2_gc.js", "../../../node_modules/mapbox-gl/node_modules/murmurhash-js/index.js", "../../../node_modules/mapbox-gl/src/data/feature_position_map.js", "../../../node_modules/mapbox-gl/src/render/uniform_binding.js", "../../../node_modules/mapbox-gl/src/data/program_configuration.js", "../../../node_modules/mapbox-gl/src/style/style_layer.js", "../../../node_modules/mapbox-gl/src/data/bucket/circle_attributes.js", "../../../node_modules/mapbox-gl/src/data/segment.js", "../../../node_modules/mapbox-gl/src/data/extent.js", "../../../node_modules/mapbox-gl/src/geo/lng_lat_bounds.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/common.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/mat3.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/mat4.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/vec3.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/vec4.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/quat.js", "../../../node_modules/mapbox-gl/src/terrain/globe_attributes.js", "../../../node_modules/mapbox-gl/src/data/pos_attributes.js", "../../../node_modules/mapbox-gl/src/util/primitives.js", "../../../node_modules/mapbox-gl/src/geo/projection/globe_util.js", "../../../node_modules/mapbox-gl/src/geo/lng_lat.js", "../../../node_modules/mapbox-gl/src/geo/mercator_coordinate.js", "../../../node_modules/mapbox-gl/src/geo/projection/resample.js", "../../../node_modules/mapbox-gl/src/data/load_geometry.js", "../../../node_modules/mapbox-gl/src/data/evaluation_feature.js", "../../../node_modules/mapbox-gl/src/data/bucket/circle_bucket.js", "../../../node_modules/mapbox-gl/src/util/intersection_tests.js", "../../../node_modules/mapbox-gl/src/style/query_utils.js", "../../../node_modules/mapbox-gl/src/style/style_layer/circle_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/style_layer/circle_style_layer.js", "../../../node_modules/mapbox-gl/src/data/bucket/heatmap_bucket.js", "../../../node_modules/mapbox-gl/src/util/image.js", "../../../node_modules/mapbox-gl/src/style/style_layer/heatmap_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/util/color_ramp.js", "../../../node_modules/mapbox-gl/src/style/style_layer/hillshade_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/data/bucket/fill_attributes.js", "../../../node_modules/mapbox-gl/node_modules/earcut/src/earcut.js", "../../../node_modules/mapbox-gl/node_modules/quickselect/index.js", "../../../node_modules/mapbox-gl/src/util/classify_rings.js", "../../../node_modules/mapbox-gl/src/data/bucket/pattern_bucket_features.js", "../../../node_modules/mapbox-gl/src/data/bucket/fill_bucket.js", "../../../node_modules/mapbox-gl/src/style/style_layer/fill_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/data/bucket/fill_extrusion_attributes.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/vector-tile/lib/vectortilefeature.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/vector-tile/lib/vectortilelayer.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/vector-tile/lib/vectortile.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/vector-tile/index.js", "../../../node_modules/mapbox-gl/src/util/polygon_clipping.js", "../../../node_modules/mapbox-gl/src/data/bucket/fill_extrusion_bucket.js", "../../../node_modules/mapbox-gl/src/style/style_layer/fill_extrusion_style_layer_properties.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/whoots-js/index.mjs", "../../../node_modules/mapbox-gl/src/source/tile_id.js", "../../../node_modules/mapbox-gl/src/style/style_layer/fill_extrusion_style_layer.js", "../../../node_modules/mapbox-gl/src/data/bucket/line_attributes.js", "../../../node_modules/mapbox-gl/src/data/bucket/line_attributes_ext.js", "../../../node_modules/mapbox-gl/src/data/bucket/line_bucket.js", "../../../node_modules/mapbox-gl/src/style/style_layer/line_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/style_layer/line_style_layer.js", "../../../node_modules/mapbox-gl/src/data/bucket/symbol_attributes.js", "../../../node_modules/mapbox-gl/src/symbol/one_em.js", "../../../node_modules/mapbox-gl/src/symbol/symbol_size.js", "../../../node_modules/mapbox-gl/src/symbol/transform_text.js", "../../../node_modules/mapbox-gl/src/util/verticalize_punctuation.js", "../../../node_modules/mapbox-gl/node_modules/pbf/index.js", "../../../node_modules/mapbox-gl/node_modules/ieee754/index.js", "../../../node_modules/mapbox-gl/src/style/parse_glyph_pbf.js", "../../../node_modules/mapbox-gl/node_modules/potpack/index.js", "../../../node_modules/mapbox-gl/src/render/image_atlas.js", "../../../node_modules/mapbox-gl/src/symbol/shaping.js", "../../../node_modules/mapbox-gl/src/symbol/anchor.js", "../../../node_modules/mapbox-gl/src/symbol/check_max_angle.js", "../../../node_modules/mapbox-gl/src/symbol/get_anchors.js", "../../../node_modules/mapbox-gl/src/symbol/clip_line.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/tiny-sdf/index.js", "../../../node_modules/mapbox-gl/src/render/glyph_manager.js", "../../../node_modules/mapbox-gl/src/style/load_glyph_range.js", "../../../node_modules/mapbox-gl/src/symbol/quads.js", "../../../node_modules/mapbox-gl/node_modules/tinyqueue/index.js", "../../../node_modules/mapbox-gl/src/util/find_pole_of_inaccessibility.js", "../../../node_modules/mapbox-gl/src/symbol/symbol_layout.js", "../../../node_modules/mapbox-gl/src/geo/projection/far_z.js", "../../../node_modules/mapbox-gl/src/geo/projection/tile_transform.js", "../../../node_modules/mapbox-gl/src/geo/projection/projection.js", "../../../node_modules/mapbox-gl/src/geo/projection/albers.js", "../../../node_modules/mapbox-gl/src/geo/projection/equal_earth.js", "../../../node_modules/mapbox-gl/src/geo/projection/equirectangular.js", "../../../node_modules/mapbox-gl/src/geo/projection/lambert.js", "../../../node_modules/mapbox-gl/src/geo/projection/mercator.js", "../../../node_modules/mapbox-gl/src/geo/projection/natural_earth.js", "../../../node_modules/mapbox-gl/src/geo/projection/winkel_tripel.js", "../../../node_modules/mapbox-gl/src/geo/projection/cylindrical_equal_area.js", "../../../node_modules/mapbox-gl/src/geo/projection/globe.js", "../../../node_modules/mapbox-gl/src/geo/projection/index.js", "../../../node_modules/mapbox-gl/src/data/bucket/symbol_bucket.js", "../../../node_modules/mapbox-gl/src/symbol/mergelines.js", "../../../node_modules/mapbox-gl/src/style/style_layer/symbol_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/format_section_override.js", "../../../node_modules/mapbox-gl/src/style/style_layer/symbol_style_layer.js", "../../../node_modules/mapbox-gl/src/util/resolve_tokens.js", "../../../node_modules/mapbox-gl/src/style/style_layer/background_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/style_layer/raster_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/style_layer/custom_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/sky_style_layer_properties.js", "../../../node_modules/mapbox-gl/src/style/style_layer/sky_style_layer.js", "../../../node_modules/mapbox-gl/src/style/create_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/heatmap_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/hillshade_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/fill_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/background_style_layer.js", "../../../node_modules/mapbox-gl/src/style/style_layer/raster_style_layer.js", "../../../node_modules/mapbox-gl/src/render/texture.js", "../../../node_modules/mapbox-gl/src/util/throttled_invoker.js", "../../../node_modules/mapbox-gl/src/util/scheduler.js", "../../../node_modules/mapbox-gl/src/util/dictionary_coder.js", "../../../node_modules/mapbox-gl/src/util/vectortile_to_geojson.js", "../../../node_modules/mapbox-gl/src/source/tile_mesh.js", "../../../node_modules/mapbox-gl/src/data/bounds_attributes.js", "../../../node_modules/mapbox-gl/src/source/tile.js", "../../../node_modules/mapbox-gl/src/data/bucket.js", "../../../node_modules/mapbox-gl/src/source/source_state.js", "../../../node_modules/mapbox-gl/src/data/dem_tree.js", "../../../node_modules/mapbox-gl/src/data/dem_data.js", "../../../node_modules/mapbox-gl/src/source/tile_cache.js", "../../../node_modules/mapbox-gl/src/gl/depth_mode.js", "../../../node_modules/mapbox-gl/src/gl/stencil_mode.js", "../../../node_modules/mapbox-gl/src/gl/color_mode.js", "../../../node_modules/mapbox-gl/src/gl/cull_face_mode.js", "../../../node_modules/mapbox-gl/src/source/source_cache.js", "../../../node_modules/mapbox-gl/src/terrain/elevation.js", "../../../node_modules/mapbox-gl/src/data/feature_index.js", "../../../node_modules/mapbox-gl/src/render/line_atlas.js", "../../../node_modules/mapbox-gl/src/render/glyph_atlas.js", "../../../node_modules/mapbox-gl/src/source/worker_tile.js", "../../../node_modules/mapbox-gl/src/source/vector_tile_worker_source.js", "../../../node_modules/mapbox-gl/node_modules/kdbush/index.js", "../../../node_modules/mapbox-gl/src/util/actor.js", "../../../node_modules/mapbox-gl/src/style-spec/util/ref_properties.js", "../../../node_modules/mapbox-gl/src/style-spec/group_by_layout.js", "../../../node_modules/mapbox-gl/src/style/style_layer_index.js", "../../../node_modules/mapbox-gl/src/source/raster_dem_tile_worker_source.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/geojson-rewind/index.js", "../../../node_modules/mapbox-gl/src/source/geojson_wrapper.js", "../../../node_modules/mapbox-gl/node_modules/vt-pbf/lib/geojson_wrapper.js", "../../../node_modules/mapbox-gl/node_modules/vt-pbf/index.js", "../../../node_modules/mapbox-gl/node_modules/supercluster/index.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/simplify.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/feature.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/convert.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/clip.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/wrap.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/transform.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/tile.js", "../../../node_modules/mapbox-gl/node_modules/geojson-vt/src/index.js", "../../../node_modules/mapbox-gl/src/source/geojson_worker_source.js", "../../../node_modules/mapbox-gl/src/source/worker.js", "../../../node_modules/mapbox-gl/src/style-spec/util/deep_equal.js", "../../../node_modules/mapbox-gl/node_modules/@mapbox/mapbox-gl-supported/index.js", "../../../node_modules/mapbox-gl/src/util/dom.js", "../../../node_modules/mapbox-gl/node_modules/gl-matrix/esm/mat2.js", "../../../node_modules/mapbox-gl/src/style/style_image.js", "../../../node_modules/mapbox-gl/src/render/image_manager.js", "../../../node_modules/mapbox-gl/src/style/light.js", "../../../node_modules/mapbox-gl/src/style/terrain.js", "../../../node_modules/mapbox-gl/src/style/fog_helpers.js", "../../../node_modules/mapbox-gl/src/style/fog.js", "../../../node_modules/mapbox-gl/src/util/dispatcher.js", "../../../node_modules/mapbox-gl/src/source/pixels_to_tile_units.js", "../../../node_modules/mapbox-gl/src/style/query_geometry.js", "../../../node_modules/mapbox-gl/src/source/load_tilejson.js", "../../../node_modules/mapbox-gl/src/source/tile_bounds.js", "../../../node_modules/mapbox-gl/src/gl/index_buffer.js", "../../../node_modules/mapbox-gl/src/gl/vertex_buffer.js", "../../../node_modules/mapbox-gl/src/gl/value.js", "../../../node_modules/mapbox-gl/src/util/offscreen_canvas_supported.js", "../../../node_modules/mapbox-gl/src/gl/framebuffer.js", "../../../node_modules/mapbox-gl/src/gl/context.js", "../../../node_modules/mapbox-gl/src/source/vector_tile_source.js", "../../../node_modules/mapbox-gl/src/source/raster_tile_source.js", "../../../node_modules/mapbox-gl/src/source/image_source.js", "../../../node_modules/mapbox-gl/src/source/source.js", "../../../node_modules/mapbox-gl/src/source/raster_dem_tile_source.js", "../../../node_modules/mapbox-gl/src/source/geojson_source.js", "../../../node_modules/mapbox-gl/src/source/video_source.js", "../../../node_modules/mapbox-gl/src/source/canvas_source.js", "../../../node_modules/mapbox-gl/src/source/custom_source.js", "../../../node_modules/mapbox-gl/src/source/query_features.js", "../../../node_modules/mapbox-gl/src/util/browser/web_worker.js", "../../../node_modules/mapbox-gl/src/util/worker_pool.js", "../../../node_modules/mapbox-gl/src/util/global_worker_pool.js", "../../../node_modules/mapbox-gl/src/style-spec/deref.js", "../../../node_modules/mapbox-gl/src/style-spec/diff.js", "../../../node_modules/mapbox-gl/src/symbol/path_interpolator.js", "../../../node_modules/mapbox-gl/src/symbol/grid_index.js", "../../../node_modules/mapbox-gl/src/symbol/projection.js", "../../../node_modules/mapbox-gl/src/symbol/collision_index.js", "../../../node_modules/mapbox-gl/src/geo/projection/projection_util.js", "../../../node_modules/mapbox-gl/src/symbol/placement.js", "../../../node_modules/mapbox-gl/src/style/pauseable_placement.js", "../../../node_modules/mapbox-gl/src/symbol/cross_tile_symbol_index.js", "../../../node_modules/mapbox-gl/src/style/style.js", "../../../node_modules/mapbox-gl/src/style-spec/empty.js", "../../../node_modules/mapbox-gl/src/style/load_sprite.js", "../../../node_modules/mapbox-gl/src/shaders/shaders.js", "../../../node_modules/mapbox-gl/src/render/vertex_array_object.js", "../../../node_modules/mapbox-gl/src/render/program/hillshade_program.js", "../../../node_modules/mapbox-gl/src/render/draw_hillshade.js", "../../../node_modules/mapbox-gl/src/terrain/terrain_raster_program.js", "../../../node_modules/mapbox-gl/src/terrain/globe_raster_program.js", "../../../node_modules/mapbox-gl/src/terrain/draw_terrain_raster.js", "../../../node_modules/mapbox-gl/src/render/program/clipping_mask_program.js", "../../../node_modules/mapbox-gl/src/render/raster_fade.js", "../../../node_modules/mapbox-gl/src/terrain/terrain.js", "../../../node_modules/mapbox-gl/src/render/program.js", "../../../node_modules/mapbox-gl/src/render/fog.js", "../../../node_modules/mapbox-gl/src/render/program/pattern.js", "../../../node_modules/mapbox-gl/src/render/program/fill_extrusion_program.js", "../../../node_modules/mapbox-gl/src/render/program/fill_program.js", "../../../node_modules/mapbox-gl/src/render/program/circle_program.js", "../../../node_modules/mapbox-gl/src/render/program/collision_program.js", "../../../node_modules/mapbox-gl/src/render/program/debug_program.js", "../../../node_modules/mapbox-gl/src/render/program/heatmap_program.js", "../../../node_modules/mapbox-gl/src/render/program/line_program.js", "../../../node_modules/mapbox-gl/src/render/program/raster_program.js", "../../../node_modules/mapbox-gl/src/render/program/symbol_program.js", "../../../node_modules/mapbox-gl/src/render/program/background_program.js", "../../../node_modules/mapbox-gl/src/render/program/program_uniforms.js", "../../../node_modules/mapbox-gl/src/render/program/skybox_program.js", "../../../node_modules/mapbox-gl/src/render/program/skybox_capture_program.js", "../../../node_modules/mapbox-gl/src/render/draw_collision_debug.js", "../../../node_modules/mapbox-gl/src/render/draw_symbol.js", "../../../node_modules/mapbox-gl/src/render/draw_fill.js", "../../../node_modules/mapbox-gl/src/render/draw_fill_extrusion.js", "../../../node_modules/mapbox-gl/src/render/draw_debug.js", "../../../node_modules/mapbox-gl/src/render/skybox_attributes.js", "../../../node_modules/mapbox-gl/src/render/skybox_geometry.js", "../../../node_modules/mapbox-gl/src/render/draw_sky.js", "../../../node_modules/mapbox-gl/src/render/atmosphere_attributes.js", "../../../node_modules/mapbox-gl/src/render/atmosphere_buffer.js", "../../../node_modules/mapbox-gl/src/render/painter.js", "../../../node_modules/mapbox-gl/src/render/draw_circle.js", "../../../node_modules/mapbox-gl/src/render/draw_heatmap.js", "../../../node_modules/mapbox-gl/src/render/draw_line.js", "../../../node_modules/mapbox-gl/src/render/draw_raster.js", "../../../node_modules/mapbox-gl/src/render/draw_background.js", "../../../node_modules/mapbox-gl/src/render/draw_custom.js", "../../../node_modules/mapbox-gl/src/render/draw_atmosphere.js", "../../../node_modules/mapbox-gl/src/geo/edge_insets.js", "../../../node_modules/mapbox-gl/src/ui/free_camera.js", "../../../node_modules/mapbox-gl/src/geo/projection/adjustments.js", "../../../node_modules/mapbox-gl/src/geo/transform.js", "../../../node_modules/mapbox-gl/src/util/throttle.js", "../../../node_modules/mapbox-gl/src/ui/hash.js", "../../../node_modules/mapbox-gl/src/ui/handler_inertia.js", "../../../node_modules/mapbox-gl/src/ui/events.js", "../../../node_modules/mapbox-gl/src/ui/handler/map_event.js", "../../../node_modules/mapbox-gl/src/ui/handler/box_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/handler_util.js", "../../../node_modules/mapbox-gl/src/ui/handler/tap_recognizer.js", "../../../node_modules/mapbox-gl/src/ui/handler/tap_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/mouse.js", "../../../node_modules/mapbox-gl/src/ui/handler/touch_pan.js", "../../../node_modules/mapbox-gl/src/ui/handler/touch_zoom_rotate.js", "../../../node_modules/mapbox-gl/src/ui/handler/keyboard.js", "../../../node_modules/mapbox-gl/src/ui/handler/scroll_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/shim/dblclick_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/click_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/tap_drag_zoom.js", "../../../node_modules/mapbox-gl/src/ui/handler/shim/drag_pan.js", "../../../node_modules/mapbox-gl/src/ui/handler/shim/drag_rotate.js", "../../../node_modules/mapbox-gl/src/ui/handler/shim/touch_zoom_rotate.js", "../../../node_modules/mapbox-gl/src/ui/handler_manager.js", "../../../node_modules/mapbox-gl/src/ui/camera.js", "../../../node_modules/mapbox-gl/src/ui/control/attribution_control.js", "../../../node_modules/mapbox-gl/src/ui/control/logo_control.js", "../../../node_modules/mapbox-gl/src/util/task_queue.js", "../../../node_modules/mapbox-gl/src/util/smart_wrap.js", "../../../node_modules/mapbox-gl/src/ui/anchor.js", "../../../node_modules/mapbox-gl/src/ui/marker.js", "../../../node_modules/mapbox-gl/src/ui/popup.js", "../../../node_modules/mapbox-gl/src/util/eased_variable.js", "../../../node_modules/mapbox-gl/src/ui/default_locale.js", "../../../node_modules/mapbox-gl/src/ui/map.js", "../../../node_modules/mapbox-gl/src/ui/control/navigation_control.js", "../../../node_modules/mapbox-gl/src/ui/control/geolocate_control.js", "../../../node_modules/mapbox-gl/src/ui/control/scale_control.js", "../../../node_modules/mapbox-gl/src/index.js", "../../../node_modules/mapbox-gl/src/ui/control/fullscreen_control.js", "../../../node_modules/mapbox-gl/rollup/mapboxgl.js", "../../../node_modules/xtend/immutable.js", "../../../node_modules/fuzzy/lib/fuzzy.js", "../../../node_modules/suggestions/src/list.js", "../../../node_modules/suggestions/src/suggestions.js", "../../../node_modules/suggestions/index.js", "../../../node_modules/lodash.debounce/index.js", "../../../node_modules/events/events.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/exceptions.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/helpers/parse-link-header.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/classes/mapi-response.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/constants.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/classes/mapi-error.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/helpers/parse-headers.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/browser/browser-layer.js", "../../../node_modules/base-64/base64.js", "../../../node_modules/@mapbox/parse-mapbox-token/index.js", "../../../node_modules/eventemitter3/index.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/helpers/url-utils.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/classes/mapi-request.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/classes/mapi-client.js", "../../../node_modules/@mapbox/mapbox-sdk/lib/browser/browser-client.js", "../../../node_modules/@mapbox/mapbox-sdk/index.js", "../../../node_modules/is-plain-obj/index.js", "../../../node_modules/@mapbox/fusspot/lib/index.js", "../../../node_modules/@mapbox/mapbox-sdk/services/service-helpers/validator.js", "../../../node_modules/@mapbox/mapbox-sdk/services/service-helpers/pick.js", "../../../node_modules/@mapbox/mapbox-sdk/services/service-helpers/object-map.js", "../../../node_modules/@mapbox/mapbox-sdk/services/service-helpers/stringify-booleans.js", "../../../node_modules/@mapbox/mapbox-sdk/services/service-helpers/create-service-factory.js", "../../../node_modules/@mapbox/mapbox-sdk/services/geocoding.js", "../../../node_modules/nanoid/url-alphabet/index.js", "../../../node_modules/nanoid/index.browser.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/events.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/localization.js", "../../../node_modules/subtag/subtag.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/geolocation.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/utils.js", "../../../node_modules/@mapbox/mapbox-gl-geocoder/lib/index.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/index.js", "../../../node_modules/chartkick/dist/chartkick.js", "../../../node_modules/jquery/dist/jquery.js", "../../../node_modules/readmore-js/readmore.js", "../../../node_modules/cookies-eu-banner/dist/cookies-eu-banner.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../../node_modules/just-extend/index.esm.js", "../../../node_modules/dropzone/dist/src/dropzone.js", "../../../node_modules/dropzone/dist/src/emitter.js", "../../../node_modules/dropzone/dist/src/options.js", "../../../node_modules/dropzone/dist/node_modules/@parcel/runtime-js/lib/bundles/runtime-044f6de40395a564.js", "../../javascript/controllers/dropzone_controller.js", "../../javascript/helpers/index.js", "../../javascript/controllers/mapbox_controller.js", "../../javascript/controllers/index.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js", "../../javascript/application.js", "../../../node_modules/@fortawesome/fontawesome-free/js/fontawesome.js", "../../../node_modules/@fortawesome/fontawesome-free/js/solid.js", "../../../node_modules/chartkick/chart.js/chart.esm.js", "../../../node_modules/@kurkle/color/dist/color.esm.js", "../../../node_modules/chart.js/src/helpers/helpers.core.ts", "../../../node_modules/chart.js/src/helpers/helpers.math.ts", "../../../node_modules/chart.js/src/helpers/helpers.collection.ts", "../../../node_modules/chart.js/src/helpers/helpers.extras.ts", "../../../node_modules/chart.js/src/helpers/helpers.easing.ts", "../../../node_modules/chart.js/src/helpers/helpers.color.ts", "../../../node_modules/chart.js/src/core/core.animations.defaults.js", "../../../node_modules/chart.js/src/core/core.layouts.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.intl.ts", "../../../node_modules/chart.js/src/core/core.ticks.js", "../../../node_modules/chart.js/src/core/core.scale.defaults.js", "../../../node_modules/chart.js/src/core/core.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.canvas.ts", "../../../node_modules/chart.js/src/helpers/helpers.options.ts", "../../../node_modules/chart.js/src/helpers/helpers.config.ts", "../../../node_modules/chart.js/src/helpers/helpers.curve.ts", "../../../node_modules/chart.js/src/helpers/helpers.dom.ts", "../../../node_modules/chart.js/src/helpers/helpers.interpolation.ts", "../../../node_modules/chart.js/src/helpers/helpers.rtl.ts", "../../../node_modules/chart.js/src/helpers/helpers.segment.js", "../../../node_modules/chart.js/src/core/core.animator.js", "../../../node_modules/chart.js/src/core/core.animation.js", "../../../node_modules/chart.js/src/core/core.animations.js", "../../../node_modules/chart.js/src/core/core.datasetController.js", "../../../node_modules/chart.js/src/controllers/controller.bar.js", "../../../node_modules/chart.js/src/controllers/controller.bubble.js", "../../../node_modules/chart.js/src/controllers/controller.doughnut.js", "../../../node_modules/chart.js/src/controllers/controller.line.js", "../../../node_modules/chart.js/src/controllers/controller.polarArea.js", "../../../node_modules/chart.js/src/controllers/controller.pie.js", "../../../node_modules/chart.js/src/controllers/controller.radar.js", "../../../node_modules/chart.js/src/controllers/controller.scatter.js", "../../../node_modules/chart.js/src/core/core.adapters.ts", "../../../node_modules/chart.js/src/core/core.interaction.js", "../../../node_modules/chart.js/src/core/core.layouts.js", "../../../node_modules/chart.js/src/platform/platform.base.js", "../../../node_modules/chart.js/src/platform/platform.basic.js", "../../../node_modules/chart.js/src/platform/platform.dom.js", "../../../node_modules/chart.js/src/platform/index.js", "../../../node_modules/chart.js/src/core/core.element.ts", "../../../node_modules/chart.js/src/core/core.scale.autoskip.js", "../../../node_modules/chart.js/src/core/core.scale.js", "../../../node_modules/chart.js/src/core/core.typedRegistry.js", "../../../node_modules/chart.js/src/core/core.registry.js", "../../../node_modules/chart.js/src/core/core.plugins.js", "../../../node_modules/chart.js/src/core/core.config.js", "../../../node_modules/chart.js/src/core/core.controller.js", "../../../node_modules/chart.js/src/elements/element.arc.ts", "../../../node_modules/chart.js/src/elements/element.line.js", "../../../node_modules/chart.js/src/elements/element.point.ts", "../../../node_modules/chart.js/src/elements/element.bar.js", "../../../node_modules/chart.js/src/plugins/plugin.colors.ts", "../../../node_modules/chart.js/src/plugins/plugin.decimation.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.segment.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.helper.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.options.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.stack.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/simpleArc.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.drawing.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/index.js", "../../../node_modules/chart.js/src/plugins/plugin.legend.js", "../../../node_modules/chart.js/src/plugins/plugin.title.js", "../../../node_modules/chart.js/src/plugins/plugin.subtitle.js", "../../../node_modules/chart.js/src/plugins/plugin.tooltip.js", "../../../node_modules/chart.js/src/scales/scale.category.js", "../../../node_modules/chart.js/src/scales/scale.linearbase.js", "../../../node_modules/chart.js/src/scales/scale.linear.js", "../../../node_modules/chart.js/src/scales/scale.logarithmic.js", "../../../node_modules/chart.js/src/scales/scale.radialLinear.js", "../../../node_modules/chart.js/src/scales/scale.time.js", "../../../node_modules/chart.js/src/scales/scale.timeseries.js", "../../../node_modules/chart.js/src/index.ts", "../../../node_modules/chart.js/auto/auto.js", "../../../node_modules/date-fns/toDate.mjs", "../../../node_modules/date-fns/constructFrom.mjs", "../../../node_modules/date-fns/addDays.mjs", "../../../node_modules/date-fns/addMonths.mjs", "../../../node_modules/date-fns/addMilliseconds.mjs", "../../../node_modules/date-fns/constants.mjs", "../../../node_modules/date-fns/addHours.mjs", "../../../node_modules/date-fns/_lib/defaultOptions.mjs", "../../../node_modules/date-fns/startOfWeek.mjs", "../../../node_modules/date-fns/startOfISOWeek.mjs", "../../../node_modules/date-fns/getISOWeekYear.mjs", "../../../node_modules/date-fns/startOfDay.mjs", "../../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs", "../../../node_modules/date-fns/differenceInCalendarDays.mjs", "../../../node_modules/date-fns/startOfISOWeekYear.mjs", "../../../node_modules/date-fns/addMinutes.mjs", "../../../node_modules/date-fns/addQuarters.mjs", "../../../node_modules/date-fns/addSeconds.mjs", "../../../node_modules/date-fns/addWeeks.mjs", "../../../node_modules/date-fns/addYears.mjs", "../../../node_modules/date-fns/compareAsc.mjs", "../../../node_modules/date-fns/isDate.mjs", "../../../node_modules/date-fns/isValid.mjs", "../../../node_modules/date-fns/differenceInCalendarMonths.mjs", "../../../node_modules/date-fns/differenceInCalendarYears.mjs", "../../../node_modules/date-fns/differenceInDays.mjs", "../../../node_modules/date-fns/_lib/getRoundingMethod.mjs", "../../../node_modules/date-fns/differenceInMilliseconds.mjs", "../../../node_modules/date-fns/differenceInHours.mjs", "../../../node_modules/date-fns/differenceInMinutes.mjs", "../../../node_modules/date-fns/endOfDay.mjs", "../../../node_modules/date-fns/endOfMonth.mjs", "../../../node_modules/date-fns/isLastDayOfMonth.mjs", "../../../node_modules/date-fns/differenceInMonths.mjs", "../../../node_modules/date-fns/differenceInQuarters.mjs", "../../../node_modules/date-fns/differenceInSeconds.mjs", "../../../node_modules/date-fns/differenceInWeeks.mjs", "../../../node_modules/date-fns/differenceInYears.mjs", "../../../node_modules/date-fns/startOfMinute.mjs", "../../../node_modules/date-fns/startOfQuarter.mjs", "../../../node_modules/date-fns/startOfMonth.mjs", "../../../node_modules/date-fns/endOfYear.mjs", "../../../node_modules/date-fns/startOfYear.mjs", "../../../node_modules/date-fns/endOfHour.mjs", "../../../node_modules/date-fns/endOfWeek.mjs", "../../../node_modules/date-fns/endOfMinute.mjs", "../../../node_modules/date-fns/endOfQuarter.mjs", "../../../node_modules/date-fns/endOfSecond.mjs", "../../../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs", "../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs", "../../../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs", "../../../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs", "../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs", "../../../node_modules/date-fns/locale/en-US/_lib/localize.mjs", "../../../node_modules/date-fns/locale/_lib/buildMatchFn.mjs", "../../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs", "../../../node_modules/date-fns/locale/en-US/_lib/match.mjs", "../../../node_modules/date-fns/locale/en-US.mjs", "../../../node_modules/date-fns/getDayOfYear.mjs", "../../../node_modules/date-fns/getISOWeek.mjs", "../../../node_modules/date-fns/getWeekYear.mjs", "../../../node_modules/date-fns/startOfWeekYear.mjs", "../../../node_modules/date-fns/getWeek.mjs", "../../../node_modules/date-fns/_lib/addLeadingZeros.mjs", "../../../node_modules/date-fns/_lib/format/lightFormatters.mjs", "../../../node_modules/date-fns/_lib/format/formatters.mjs", "../../../node_modules/date-fns/_lib/format/longFormatters.mjs", "../../../node_modules/date-fns/_lib/protectedTokens.mjs", "../../../node_modules/date-fns/format.mjs", "../../../node_modules/date-fns/getDefaultOptions.mjs", "../../../node_modules/date-fns/getISODay.mjs", "../../../node_modules/date-fns/transpose.mjs", "../../../node_modules/date-fns/parse/_lib/Setter.mjs", "../../../node_modules/date-fns/parse/_lib/Parser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/EraParser.mjs", "../../../node_modules/date-fns/parse/_lib/constants.mjs", "../../../node_modules/date-fns/parse/_lib/utils.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/YearParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs", "../../../node_modules/date-fns/setWeek.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs", "../../../node_modules/date-fns/setISOWeek.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/DateParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs", "../../../node_modules/date-fns/setDay.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/DayParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs", "../../../node_modules/date-fns/setISODay.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs", "../../../node_modules/date-fns/parse/_lib/parsers.mjs", "../../../node_modules/date-fns/parse.mjs", "../../../node_modules/date-fns/startOfHour.mjs", "../../../node_modules/date-fns/startOfSecond.mjs", "../../../node_modules/date-fns/parseISO.mjs", "../../../node_modules/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js", "../../../node_modules/@popperjs/core/lib/index.js", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/bootstrap/js/src/dom/data.js", "../../../node_modules/bootstrap/js/src/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../../node_modules/bootstrap/js/src/util/config.js", "../../../node_modules/bootstrap/js/src/base-component.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../../node_modules/bootstrap/js/src/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/util/swipe.js", "../../../node_modules/bootstrap/js/src/carousel.js", "../../../node_modules/bootstrap/js/src/collapse.js", "../../../node_modules/bootstrap/js/src/dropdown.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.js", "../../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../../node_modules/bootstrap/js/src/modal.js", "../../../node_modules/bootstrap/js/src/offcanvas.js", "../../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../../node_modules/bootstrap/js/src/util/template-factory.js", "../../../node_modules/bootstrap/js/src/tooltip.js", "../../../node_modules/bootstrap/js/src/popover.js", "../../../node_modules/bootstrap/js/src/scrollspy.js", "../../../node_modules/bootstrap/js/src/tab.js", "../../../node_modules/bootstrap/js/src/toast.js", "../../../node_modules/flatpickr/dist/esm/types/options.js", "../../../node_modules/flatpickr/dist/esm/l10n/default.js", "../../../node_modules/flatpickr/dist/esm/utils/index.js", "../../../node_modules/flatpickr/dist/esm/utils/dom.js", "../../../node_modules/flatpickr/dist/esm/utils/formatting.js", "../../../node_modules/flatpickr/dist/esm/utils/dates.js", "../../../node_modules/flatpickr/dist/esm/utils/polyfills.js", "../../../node_modules/flatpickr/dist/esm/index.js", "../../javascript/components/checkbox_if_closed.js", "../../javascript/components/pills.js", "../../javascript/components/customers_table_filter.js", "../../javascript/components/orders_table_filter.js", "../../javascript/components/stores_table_filter.js", "../../javascript/components/sorting.js", "../../javascript/components/collapsible.js", "../../javascript/components/retailers_text_collapsible.js", "../../javascript/components/typing_placeholder.js", "../../javascript/components/hover_map_pins.js", "../../javascript/components/show_filters.js", "../../javascript/components/stripe_container_toggle.js", "../../javascript/components/b2b_checkout.js", "../../javascript/components/retailer_dashboard_tabs_collapsible.js", "../../javascript/components/customer_dashboard_tabs_collapsible.js", "../../javascript/components/settings_tabs_collapsible.js", "../../javascript/components/choose_product.js", "../../javascript/components/invoice_link.js", "../../javascript/components/opening_hours.js", "../../javascript/components/on_off_toggle.js", "../../javascript/components/keep_tab.js", "../../javascript/components/modify_b2b_order_toggle.js", "../../javascript/components/popover.js", "../../javascript/components/customer_settings.js", "../../javascript/components/weekly_order.js", "../../javascript/components/launch_modal.js", "../../javascript/components/navbar.js", "../../javascript/components/store_desc_read_more.js", "../../javascript/components/store_owner_offerings.js", "../../javascript/components/b2b_pricing_table_collapsible.js", "../../javascript/components/b2b_offerings_update.js", "../../javascript/components/product_update_b2b_offerings.js", "../../javascript/components/init_flatpickr.js", "../../javascript/components/download_spinner.js", "../../javascript/components/disable_destroy_btn.js", "../../javascript/components/add_forward_weekly_reminder_mail.js", "../../javascript/components/age_verification_overlay.js", "../../javascript/components/price_options.js", "../../javascript/components/settings_delivery.js", "../../javascript/components/cookies.js"], "sourcesContent": ["(function(global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([ \"exports\" ], factory) : factory(global.ActiveStorage = {});\n})(this, function(exports) {\n \"use strict\";\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n var sparkMd5 = createCommonjsModule(function(module, exports) {\n (function(factory) {\n {\n module.exports = factory();\n }\n })(function(undefined) {\n var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n function md5cycle(x, k) {\n var a = x[0], b = x[1], c = x[2], d = x[3];\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n function md5blk(s) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n }\n function md5blk_array(a) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n }\n return md5blks;\n }\n function md51(s) {\n var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n length = s.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function md51_array(a) {\n var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n }\n a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n length = a.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= a[i] << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function rhex(n) {\n var s = \"\", j;\n for (j = 0; j < 4; j += 1) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n return s;\n }\n function hex(x) {\n var i;\n for (i = 0; i < x.length; i += 1) {\n x[i] = rhex(x[i]);\n }\n return x.join(\"\");\n }\n if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n (function() {\n function clamp(val, length) {\n val = val | 0 || 0;\n if (val < 0) {\n return Math.max(val + length, 0);\n }\n return Math.min(val, length);\n }\n ArrayBuffer.prototype.slice = function(from, to) {\n var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n if (to !== undefined) {\n end = clamp(to, length);\n }\n if (begin > end) {\n return new ArrayBuffer(0);\n }\n num = end - begin;\n target = new ArrayBuffer(num);\n targetArray = new Uint8Array(target);\n sourceArray = new Uint8Array(this, begin, num);\n targetArray.set(sourceArray);\n return target;\n };\n })();\n }\n function toUtf8(str) {\n if (/[\\u0080-\\uFFFF]/.test(str)) {\n str = unescape(encodeURIComponent(str));\n }\n return str;\n }\n function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n for (i = 0; i < length; i += 1) {\n arr[i] = str.charCodeAt(i);\n }\n return returnUInt8Array ? arr : buff;\n }\n function arrayBuffer2Utf8Str(buff) {\n return String.fromCharCode.apply(null, new Uint8Array(buff));\n }\n function concatenateArrayBuffers(first, second, returnUInt8Array) {\n var result = new Uint8Array(first.byteLength + second.byteLength);\n result.set(new Uint8Array(first));\n result.set(new Uint8Array(second), first.byteLength);\n return returnUInt8Array ? result : result.buffer;\n }\n function hexToBinaryString(hex) {\n var bytes = [], length = hex.length, x;\n for (x = 0; x < length - 1; x += 2) {\n bytes.push(parseInt(hex.substr(x, 2), 16));\n }\n return String.fromCharCode.apply(String, bytes);\n }\n function SparkMD5() {\n this.reset();\n }\n SparkMD5.prototype.append = function(str) {\n this.appendBinary(toUtf8(str));\n return this;\n };\n SparkMD5.prototype.appendBinary = function(contents) {\n this._buff += contents;\n this._length += contents.length;\n var length = this._buff.length, i;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n }\n this._buff = this._buff.substring(i - 64);\n return this;\n };\n SparkMD5.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.prototype.reset = function() {\n this._buff = \"\";\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.prototype.getState = function() {\n return {\n buff: this._buff,\n length: this._length,\n hash: this._hash\n };\n };\n SparkMD5.prototype.setState = function(state) {\n this._buff = state.buff;\n this._length = state.length;\n this._hash = state.hash;\n return this;\n };\n SparkMD5.prototype.destroy = function() {\n delete this._hash;\n delete this._buff;\n delete this._length;\n };\n SparkMD5.prototype._finish = function(tail, length) {\n var i = length, tmp, lo, hi;\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(this._hash, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = this._length * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(this._hash, tail);\n };\n SparkMD5.hash = function(str, raw) {\n return SparkMD5.hashBinary(toUtf8(str), raw);\n };\n SparkMD5.hashBinary = function(content, raw) {\n var hash = md51(content), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n SparkMD5.ArrayBuffer = function() {\n this.reset();\n };\n SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n this._length += arr.byteLength;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n }\n this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff[i] << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.ArrayBuffer.prototype.reset = function() {\n this._buff = new Uint8Array(0);\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.getState = function() {\n var state = SparkMD5.prototype.getState.call(this);\n state.buff = arrayBuffer2Utf8Str(state.buff);\n return state;\n };\n SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n state.buff = utf8Str2ArrayBuffer(state.buff, true);\n return SparkMD5.prototype.setState.call(this, state);\n };\n SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n return SparkMD5;\n });\n });\n var classCallCheck = function(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n var createClass = function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n var FileChecksum = function() {\n createClass(FileChecksum, null, [ {\n key: \"create\",\n value: function create(file, callback) {\n var instance = new FileChecksum(file);\n instance.create(callback);\n }\n } ]);\n function FileChecksum(file) {\n classCallCheck(this, FileChecksum);\n this.file = file;\n this.chunkSize = 2097152;\n this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n this.chunkIndex = 0;\n }\n createClass(FileChecksum, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n this.callback = callback;\n this.md5Buffer = new sparkMd5.ArrayBuffer();\n this.fileReader = new FileReader();\n this.fileReader.addEventListener(\"load\", function(event) {\n return _this.fileReaderDidLoad(event);\n });\n this.fileReader.addEventListener(\"error\", function(event) {\n return _this.fileReaderDidError(event);\n });\n this.readNextChunk();\n }\n }, {\n key: \"fileReaderDidLoad\",\n value: function fileReaderDidLoad(event) {\n this.md5Buffer.append(event.target.result);\n if (!this.readNextChunk()) {\n var binaryDigest = this.md5Buffer.end(true);\n var base64digest = btoa(binaryDigest);\n this.callback(null, base64digest);\n }\n }\n }, {\n key: \"fileReaderDidError\",\n value: function fileReaderDidError(event) {\n this.callback(\"Error reading \" + this.file.name);\n }\n }, {\n key: \"readNextChunk\",\n value: function readNextChunk() {\n if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n var start = this.chunkIndex * this.chunkSize;\n var end = Math.min(start + this.chunkSize, this.file.size);\n var bytes = fileSlice.call(this.file, start, end);\n this.fileReader.readAsArrayBuffer(bytes);\n this.chunkIndex++;\n return true;\n } else {\n return false;\n }\n }\n } ]);\n return FileChecksum;\n }();\n function getMetaValue(name) {\n var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n if (element) {\n return element.getAttribute(\"content\");\n }\n }\n function findElements(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n var elements = root.querySelectorAll(selector);\n return toArray$1(elements);\n }\n function findElement(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n return root.querySelector(selector);\n }\n function dispatchEvent(element, type) {\n var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var disabled = element.disabled;\n var bubbles = eventInit.bubbles, cancelable = eventInit.cancelable, detail = eventInit.detail;\n var event = document.createEvent(\"Event\");\n event.initEvent(type, bubbles || true, cancelable || true);\n event.detail = detail || {};\n try {\n element.disabled = false;\n element.dispatchEvent(event);\n } finally {\n element.disabled = disabled;\n }\n return event;\n }\n function toArray$1(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (Array.from) {\n return Array.from(value);\n } else {\n return [].slice.call(value);\n }\n }\n var BlobRecord = function() {\n function BlobRecord(file, checksum, url) {\n var _this = this;\n classCallCheck(this, BlobRecord);\n this.file = file;\n this.attributes = {\n filename: file.name,\n content_type: file.type || \"application/octet-stream\",\n byte_size: file.size,\n checksum: checksum\n };\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"POST\", url, true);\n this.xhr.responseType = \"json\";\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n var csrfToken = getMetaValue(\"csrf-token\");\n if (csrfToken != undefined) {\n this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n }\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobRecord, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(JSON.stringify({\n blob: this.attributes\n }));\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n if (this.status >= 200 && this.status < 300) {\n var response = this.response;\n var direct_upload = response.direct_upload;\n delete response.direct_upload;\n this.attributes = response;\n this.directUploadData = direct_upload;\n this.callback(null, this.toJSON());\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var result = {};\n for (var key in this.attributes) {\n result[key] = this.attributes[key];\n }\n return result;\n }\n }, {\n key: \"status\",\n get: function get$$1() {\n return this.xhr.status;\n }\n }, {\n key: \"response\",\n get: function get$$1() {\n var _xhr = this.xhr, responseType = _xhr.responseType, response = _xhr.response;\n if (responseType == \"json\") {\n return response;\n } else {\n return JSON.parse(response);\n }\n }\n } ]);\n return BlobRecord;\n }();\n var BlobUpload = function() {\n function BlobUpload(blob) {\n var _this = this;\n classCallCheck(this, BlobUpload);\n this.blob = blob;\n this.file = blob.file;\n var _blob$directUploadDat = blob.directUploadData, url = _blob$directUploadDat.url, headers = _blob$directUploadDat.headers;\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"PUT\", url, true);\n this.xhr.responseType = \"text\";\n for (var key in headers) {\n this.xhr.setRequestHeader(key, headers[key]);\n }\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobUpload, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(this.file.slice());\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n var _xhr = this.xhr, status = _xhr.status, response = _xhr.response;\n if (status >= 200 && status < 300) {\n this.callback(null, response);\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n }\n } ]);\n return BlobUpload;\n }();\n var id = 0;\n var DirectUpload = function() {\n function DirectUpload(file, url, delegate) {\n classCallCheck(this, DirectUpload);\n this.id = ++id;\n this.file = file;\n this.url = url;\n this.delegate = delegate;\n }\n createClass(DirectUpload, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n FileChecksum.create(this.file, function(error, checksum) {\n if (error) {\n callback(error);\n return;\n }\n var blob = new BlobRecord(_this.file, checksum, _this.url);\n notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n blob.create(function(error) {\n if (error) {\n callback(error);\n } else {\n var upload = new BlobUpload(blob);\n notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n upload.create(function(error) {\n if (error) {\n callback(error);\n } else {\n callback(null, blob.toJSON());\n }\n });\n }\n });\n });\n }\n } ]);\n return DirectUpload;\n }();\n function notify(object, methodName) {\n if (object && typeof object[methodName] == \"function\") {\n for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n messages[_key - 2] = arguments[_key];\n }\n return object[methodName].apply(object, messages);\n }\n }\n var DirectUploadController = function() {\n function DirectUploadController(input, file) {\n classCallCheck(this, DirectUploadController);\n this.input = input;\n this.file = file;\n this.directUpload = new DirectUpload(this.file, this.url, this);\n this.dispatch(\"initialize\");\n }\n createClass(DirectUploadController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = this.input.name;\n this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n this.dispatch(\"start\");\n this.directUpload.create(function(error, attributes) {\n if (error) {\n hiddenInput.parentNode.removeChild(hiddenInput);\n _this.dispatchError(error);\n } else {\n hiddenInput.value = attributes.signed_id;\n }\n _this.dispatch(\"end\");\n callback(error);\n });\n }\n }, {\n key: \"uploadRequestDidProgress\",\n value: function uploadRequestDidProgress(event) {\n var progress = event.loaded / event.total * 100;\n if (progress) {\n this.dispatch(\"progress\", {\n progress: progress\n });\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n detail.file = this.file;\n detail.id = this.directUpload.id;\n return dispatchEvent(this.input, \"direct-upload:\" + name, {\n detail: detail\n });\n }\n }, {\n key: \"dispatchError\",\n value: function dispatchError(error) {\n var event = this.dispatch(\"error\", {\n error: error\n });\n if (!event.defaultPrevented) {\n alert(error);\n }\n }\n }, {\n key: \"directUploadWillCreateBlobWithXHR\",\n value: function directUploadWillCreateBlobWithXHR(xhr) {\n this.dispatch(\"before-blob-request\", {\n xhr: xhr\n });\n }\n }, {\n key: \"directUploadWillStoreFileWithXHR\",\n value: function directUploadWillStoreFileWithXHR(xhr) {\n var _this2 = this;\n this.dispatch(\"before-storage-request\", {\n xhr: xhr\n });\n xhr.upload.addEventListener(\"progress\", function(event) {\n return _this2.uploadRequestDidProgress(event);\n });\n }\n }, {\n key: \"url\",\n get: function get$$1() {\n return this.input.getAttribute(\"data-direct-upload-url\");\n }\n } ]);\n return DirectUploadController;\n }();\n var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n var DirectUploadsController = function() {\n function DirectUploadsController(form) {\n classCallCheck(this, DirectUploadsController);\n this.form = form;\n this.inputs = findElements(form, inputSelector).filter(function(input) {\n return input.files.length;\n });\n }\n createClass(DirectUploadsController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var controllers = this.createDirectUploadControllers();\n var startNextController = function startNextController() {\n var controller = controllers.shift();\n if (controller) {\n controller.start(function(error) {\n if (error) {\n callback(error);\n _this.dispatch(\"end\");\n } else {\n startNextController();\n }\n });\n } else {\n callback();\n _this.dispatch(\"end\");\n }\n };\n this.dispatch(\"start\");\n startNextController();\n }\n }, {\n key: \"createDirectUploadControllers\",\n value: function createDirectUploadControllers() {\n var controllers = [];\n this.inputs.forEach(function(input) {\n toArray$1(input.files).forEach(function(file) {\n var controller = new DirectUploadController(input, file);\n controllers.push(controller);\n });\n });\n return controllers;\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n detail: detail\n });\n }\n } ]);\n return DirectUploadsController;\n }();\n var processingAttribute = \"data-direct-uploads-processing\";\n var submitButtonsByForm = new WeakMap();\n var started = false;\n function start() {\n if (!started) {\n started = true;\n document.addEventListener(\"click\", didClick, true);\n document.addEventListener(\"submit\", didSubmitForm);\n document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n }\n }\n function didClick(event) {\n var target = event.target;\n if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n submitButtonsByForm.set(target.form, target);\n }\n }\n function didSubmitForm(event) {\n handleFormSubmissionEvent(event);\n }\n function didSubmitRemoteElement(event) {\n if (event.target.tagName == \"FORM\") {\n handleFormSubmissionEvent(event);\n }\n }\n function handleFormSubmissionEvent(event) {\n var form = event.target;\n if (form.hasAttribute(processingAttribute)) {\n event.preventDefault();\n return;\n }\n var controller = new DirectUploadsController(form);\n var inputs = controller.inputs;\n if (inputs.length) {\n event.preventDefault();\n form.setAttribute(processingAttribute, \"\");\n inputs.forEach(disable);\n controller.start(function(error) {\n form.removeAttribute(processingAttribute);\n if (error) {\n inputs.forEach(enable);\n } else {\n submitForm(form);\n }\n });\n }\n }\n function submitForm(form) {\n var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n if (button) {\n var _button = button, disabled = _button.disabled;\n button.disabled = false;\n button.focus();\n button.click();\n button.disabled = disabled;\n } else {\n button = document.createElement(\"input\");\n button.type = \"submit\";\n button.style.display = \"none\";\n form.appendChild(button);\n button.click();\n form.removeChild(button);\n }\n submitButtonsByForm.delete(form);\n }\n function disable(input) {\n input.disabled = true;\n }\n function enable(input) {\n input.disabled = false;\n }\n function autostart() {\n if (window.ActiveStorage) {\n start();\n }\n }\n setTimeout(autostart, 1);\n exports.start = start;\n exports.DirectUpload = DirectUpload;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n});\n", "// @flow\n/* eslint-env browser */\nimport type {Window} from '../../types/window.js';\n\n// shim window for the case of requiring the browser bundle in Node\nexport default ((typeof self !== 'undefined' ? self : ({}: any)): Window);\n", "// @flow strict\n\ntype Config = {|\n API_URL: string,\n API_URL_REGEX: RegExp,\n API_TILEJSON_REGEX: RegExp,\n API_FONTS_REGEX: RegExp,\n API_SPRITE_REGEX: RegExp,\n API_STYLE_REGEX: RegExp,\n API_CDN_URL_REGEX: RegExp,\n EVENTS_URL: ?string,\n SESSION_PATH: string,\n FEEDBACK_URL: string,\n REQUIRE_ACCESS_TOKEN: boolean,\n TILE_URL_VERSION: string,\n RASTER_URL_PREFIX: string,\n ACCESS_TOKEN: ?string,\n MAX_PARALLEL_IMAGE_REQUESTS: number\n|};\n\nlet mapboxHTTPURLRegex;\n\nconst config: Config = {\n API_URL: 'https://api.mapbox.com',\n get API_URL_REGEX () {\n if (mapboxHTTPURLRegex == null) {\n const prodMapboxHTTPURLRegex = /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/|\\?|$)/i;\n try {\n mapboxHTTPURLRegex = (process.env.API_URL_REGEX != null) ? new RegExp(process.env.API_URL_REGEX) : prodMapboxHTTPURLRegex;\n } catch (e) {\n mapboxHTTPURLRegex = prodMapboxHTTPURLRegex;\n }\n }\n\n return mapboxHTTPURLRegex;\n },\n get API_TILEJSON_REGEX() {\n // https://docs.mapbox.com/api/maps/mapbox-tiling-service/#retrieve-tilejson-metadata\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/v[0-9]*\\/.*\\.json.*$)/i;\n },\n get API_SPRITE_REGEX() {\n // https://docs.mapbox.com/api/maps/styles/#retrieve-a-sprite-image-or-json\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/styles\\/v[0-9]*\\/)(.*\\/sprite.*\\..*$)/i;\n },\n get API_FONTS_REGEX() {\n // https://docs.mapbox.com/api/maps/fonts/#retrieve-font-glyph-ranges\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/fonts\\/v[0-9]*\\/)(.*\\.pbf.*$)/i;\n },\n get API_STYLE_REGEX() {\n // https://docs.mapbox.com/api/maps/styles/#retrieve-a-style\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/styles\\/v[0-9]*\\/)(.*$)/i;\n },\n get API_CDN_URL_REGEX() {\n return /^((https?:)?\\/\\/)?api\\.mapbox\\.c(n|om)(\\/mapbox-gl-js\\/)(.*$)/i;\n },\n get EVENTS_URL() {\n if (!config.API_URL) { return null; }\n try {\n const url = new URL(config.API_URL);\n if (url.hostname === 'api.mapbox.cn') {\n return 'https://events.mapbox.cn/events/v2';\n } else if (url.hostname === 'api.mapbox.com') {\n return 'https://events.mapbox.com/events/v2';\n } else {\n return null;\n }\n } catch (e) {\n return null;\n }\n },\n SESSION_PATH: '/map-sessions/v1',\n FEEDBACK_URL: 'https://apps.mapbox.com/feedback',\n TILE_URL_VERSION: 'v4',\n RASTER_URL_PREFIX: 'raster/v1',\n REQUIRE_ACCESS_TOKEN: true,\n ACCESS_TOKEN: null,\n MAX_PARALLEL_IMAGE_REQUESTS: 16\n};\n\nexport default config;\n", "// @flow strict\n\nimport window from './window.js';\n\nconst exported = {\n supported: false,\n testSupport\n};\n\nexport default exported;\n\nlet glForTesting;\nlet webpCheckComplete = false;\nlet webpImgTest;\nlet webpImgTestOnloadComplete = false;\n\nif (window.document) {\n webpImgTest = window.document.createElement('img');\n webpImgTest.onload = function() {\n if (glForTesting) testWebpTextureUpload(glForTesting);\n glForTesting = null;\n webpImgTestOnloadComplete = true;\n };\n webpImgTest.onerror = function() {\n webpCheckComplete = true;\n glForTesting = null;\n };\n webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=';\n}\n\nfunction testSupport(gl: WebGLRenderingContext) {\n if (webpCheckComplete || !webpImgTest) return;\n\n // HTMLImageElement.complete is set when an image is done loading it's source\n // regardless of whether the load was successful or not.\n // It's possible for an error to set HTMLImageElement.complete to true which would trigger\n // testWebpTextureUpload and mistakenly set exported.supported to true in browsers which don't support webp\n // To avoid this, we set a flag in the image's onload handler and only call testWebpTextureUpload\n // after a successful image load event.\n if (webpImgTestOnloadComplete) {\n testWebpTextureUpload(gl);\n } else {\n glForTesting = gl;\n\n }\n}\n\nfunction testWebpTextureUpload(gl: WebGLRenderingContext) {\n // Edge 18 supports WebP but not uploading a WebP image to a gl texture\n // Test support for this before allowing WebP images.\n // https://github.com/mapbox/mapbox-gl-js/issues/7671\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n try {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, webpImgTest);\n\n // The error does not get triggered in Edge if the context is lost\n if (gl.isContextLost()) return;\n\n exported.supported = true;\n } catch (e) {\n // Catch \"Unspecified Error.\" in Edge 18.\n }\n\n gl.deleteTexture(texture);\n\n webpCheckComplete = true;\n}\n", "// @flow\n\n/***** START WARNING REMOVAL OR MODIFICATION OF THE\n* FOLLOWING CODE VIOLATES THE MAPBOX TERMS OF SERVICE ******\n* The following code is used to access Mapbox's APIs. Removal or modification\n* of this code can result in higher fees and/or\n* termination of your account with Mapbox.\n*\n* Under the Mapbox Terms of Service, you may not use this code to access Mapbox\n* Mapping APIs other than through Mapbox SDKs.\n*\n* The Mapping APIs documentation is available at https://docs.mapbox.com/api/maps/#maps\n* and the Mapbox Terms of Service are available at https://www.mapbox.com/tos/\n******************************************************************************/\n\ntype SkuTokenObject = {|\n token: string,\n tokenExpiresAt: number\n|};\n\nconst SKU_ID = '01';\n\nfunction createSkuToken(): SkuTokenObject {\n // SKU_ID and TOKEN_VERSION are specified by an internal schema and should not change\n const TOKEN_VERSION = '1';\n const base62chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n // sessionRandomizer is a randomized 10-digit base-62 number\n let sessionRandomizer = '';\n for (let i = 0; i < 10; i++) {\n sessionRandomizer += base62chars[Math.floor(Math.random() * 62)];\n }\n const expiration = 12 * 60 * 60 * 1000; // 12 hours\n const token = [TOKEN_VERSION, SKU_ID, sessionRandomizer].join('');\n const tokenExpiresAt = Date.now() + expiration;\n\n return {token, tokenExpiresAt};\n}\n\nexport {createSkuToken, SKU_ID};\n\n/***** END WARNING - REMOVAL OR MODIFICATION OF THE\nPRECEDING CODE VIOLATES THE MAPBOX TERMS OF SERVICE ******/\n", "'use strict';\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p1y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype = {\n sampleCurveX: function (t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n },\n\n sampleCurveY: function (t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n },\n\n sampleCurveDerivativeX: function (t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n },\n\n solveCurveX: function (x, epsilon) {\n if (epsilon === undefined) epsilon = 1e-6;\n\n if (x < 0.0) return 0.0;\n if (x > 1.0) return 1.0;\n\n var t = x;\n\n // First try a few iterations of Newton's method - normally very fast.\n for (var i = 0; i < 8; i++) {\n var x2 = this.sampleCurveX(t) - x;\n if (Math.abs(x2) < epsilon) return t;\n\n var d2 = this.sampleCurveDerivativeX(t);\n if (Math.abs(d2) < 1e-6) break;\n\n t = t - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n var t0 = 0.0;\n var t1 = 1.0;\n t = x;\n\n for (i = 0; i < 20; i++) {\n x2 = this.sampleCurveX(t);\n if (Math.abs(x2 - x) < epsilon) break;\n\n if (x > x2) {\n t0 = t;\n } else {\n t1 = t;\n }\n\n t = (t1 - t0) * 0.5 + t0;\n }\n\n return t;\n },\n\n solve: function (x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n }\n};\n", "'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array} m transformation matrix\n * @return {Point} output point\n */\n matMult: function(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function() { return this.clone()._round(); },\n\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n _matMult: function(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _add: function(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n _sub: function(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n _mult: function(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n _div: function(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n _multByPoint: function(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n _divByPoint: function(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit: function() {\n this._div(this.mag());\n return this;\n },\n\n _perp: function() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n _rotate: function(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _rotateAround: function(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round: function() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};\n", "// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport Point from '@mapbox/point-geometry';\nimport window from './window.js';\nimport assert from 'assert';\n\nimport type {Callback} from '../types/callback.js';\nimport type {Mat4, Vec4} from 'gl-matrix';\n\nconst DEG_TO_RAD = Math.PI / 180;\nconst RAD_TO_DEG = 180 / Math.PI;\n\n/**\n * Converts an angle in degrees to radians\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param a angle to convert\n * @returns the angle in radians\n * @private\n */\nexport function degToRad(a: number): number {\n return a * DEG_TO_RAD;\n}\n\n/**\n * Converts an angle in radians to degrees\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param a angle to convert\n * @returns the angle in degrees\n * @private\n */\nexport function radToDeg(a: number): number {\n return a * RAD_TO_DEG;\n}\n\nconst TILE_CORNERS = [[0, 0], [1, 0], [1, 1], [0, 1]];\n\n/**\n * Given a particular bearing, returns the corner of the tile thats farthest\n * along the bearing.\n *\n * @param {number} bearing angle in degrees (-180, 180]\n * @returns {QuadCorner}\n * @private\n */\nexport function furthestTileCorner(bearing: number): [number, number] {\n const alignedBearing = ((bearing + 45) + 360) % 360;\n const cornerIdx = Math.round(alignedBearing / 90) % 4;\n return TILE_CORNERS[cornerIdx];\n}\n\n/**\n * @module util\n * @private\n */\n\n/**\n * Given a value `t` that varies between 0 and 1, return\n * an interpolation function that eases between 0 and 1 in a pleasing\n * cubic in-out fashion.\n *\n * @private\n */\nexport function easeCubicInOut(t: number): number {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n const t2 = t * t,\n t3 = t2 * t;\n return 4 * (t < 0.5 ? t3 : 3 * (t - t2) + t3 - 0.75);\n}\n\n/**\n * Computes an AABB for a set of points.\n *\n * @param {Point[]} points\n * @returns {{ min: Point, max: Point}}\n * @private\n */\nexport function getBounds(points: Point[]): { min: Point, max: Point} {\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n for (const p of points) {\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n }\n\n return {\n min: new Point(minX, minY),\n max: new Point(maxX, maxY),\n };\n}\n\n/**\n * Returns the square of the 2D distance between an AABB defined by min and max and a point.\n * If point is null or undefined, the AABB distance from the origin (0,0) is returned.\n *\n * @param {Array} min The minimum extent of the AABB.\n * @param {Array} max The maximum extent of the AABB.\n * @param {Array} [point] The point to compute the distance from, may be undefined.\n * @returns {number} The square distance from the AABB, 0.0 if the AABB contains the point.\n */\nexport function getAABBPointSquareDist(min: Array, max: Array, point: ?Array): number {\n let sqDist = 0.0;\n\n for (let i = 0; i < 2; ++i) {\n const v = point ? point[i] : 0.0;\n assert(min[i] < max[i], 'Invalid aabb min and max inputs, min[i] must be < max[i].');\n if (min[i] > v) sqDist += (min[i] - v) * (min[i] - v);\n if (max[i] < v) sqDist += (v - max[i]) * (v - max[i]);\n }\n\n return sqDist;\n}\n\n/**\n * Converts a AABB into a polygon with clockwise winding order.\n *\n * @param {Point} min The top left point.\n * @param {Point} max The bottom right point.\n * @param {number} [buffer=0] The buffer width.\n * @param {boolean} [close=true] Whether to close the polygon or not.\n * @returns {Point[]} The polygon.\n */\nexport function polygonizeBounds(min: Point, max: Point, buffer: number = 0, close: boolean = true): Point[] {\n const offset = new Point(buffer, buffer);\n const minBuf = min.sub(offset);\n const maxBuf = max.add(offset);\n const polygon = [minBuf, new Point(maxBuf.x, minBuf.y), maxBuf, new Point(minBuf.x, maxBuf.y)];\n\n if (close) {\n polygon.push(minBuf.clone());\n }\n return polygon;\n}\n\n/**\n * Takes a convex ring and expands it outward by applying a buffer around it.\n * This function assumes that the ring is in clockwise winding order.\n *\n * @param {Point[]} ring The input ring.\n * @param {number} buffer The buffer width.\n * @returns {Point[]} The expanded ring.\n */\nexport function bufferConvexPolygon(ring: Point[], buffer: number): Point[] {\n assert(ring.length > 2, 'bufferConvexPolygon requires the ring to have atleast 3 points');\n const output = [];\n for (let currIdx = 0; currIdx < ring.length; currIdx++) {\n const prevIdx = wrap(currIdx - 1, -1, ring.length - 1);\n const nextIdx = wrap(currIdx + 1, -1, ring.length - 1);\n const prev = ring[prevIdx];\n const curr = ring[currIdx];\n const next = ring[nextIdx];\n const p1 = prev.sub(curr).unit();\n const p2 = next.sub(curr).unit();\n const interiorAngle = p2.angleWithSep(p1.x, p1.y);\n // Calcuate a vector that points in the direction of the angle bisector between two sides.\n // Scale it based on a right angled triangle constructed at that corner.\n const offset = p1.add(p2).unit().mult(-1 * buffer / Math.sin(interiorAngle / 2));\n output.push(curr.add(offset));\n }\n return output;\n}\n\ntype EaseFunction = (t: number) => number;\n\n/**\n * Given given (x, y), (x1, y1) control points for a bezier curve,\n * return a function that interpolates along that curve.\n *\n * @param p1x control point 1 x coordinate\n * @param p1y control point 1 y coordinate\n * @param p2x control point 2 x coordinate\n * @param p2y control point 2 y coordinate\n * @private\n */\nexport function bezier(p1x: number, p1y: number, p2x: number, p2y: number): EaseFunction {\n const bezier = new UnitBezier(p1x, p1y, p2x, p2y);\n return function(t: number) {\n return bezier.solve(t);\n };\n}\n\n/**\n * A default bezier-curve powered easing function with\n * control points (0.25, 0.1) and (0.25, 1)\n *\n * @private\n */\nexport const ease: EaseFunction = bezier(0.25, 0.1, 0.25, 1);\n\n/**\n * constrain n to the given range via min + max\n *\n * @param n value\n * @param min the minimum value to be returned\n * @param max the maximum value to be returned\n * @returns the clamped value\n * @private\n */\nexport function clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/**\n * Equivalent to GLSL smoothstep.\n *\n * @param {number} e0 The lower edge of the sigmoid\n * @param {number} e1 The upper edge of the sigmoid\n * @param {number} x the value to be interpolated\n * @returns {number} in the range [0, 1]\n * @private\n */\nexport function smoothstep(e0: number, e1: number, x: number): number {\n x = clamp((x - e0) / (e1 - e0), 0, 1);\n return x * x * (3 - 2 * x);\n}\n\n/**\n * constrain n to the given range, excluding the minimum, via modular arithmetic\n *\n * @param n value\n * @param min the minimum value to be returned, exclusive\n * @param max the maximum value to be returned, inclusive\n * @returns constrained number\n * @private\n */\nexport function wrap(n: number, min: number, max: number): number {\n const d = max - min;\n const w = ((n - min) % d + d) % d + min;\n return (w === min) ? max : w;\n}\n\n/**\n * Computes shortest angle in range [-180, 180) between two angles.\n *\n * @param {*} a First angle in degrees\n * @param {*} b Second angle in degrees\n * @returns Shortest angle\n * @private\n */\nexport function shortestAngle(a: number, b: number): number {\n const diff = (b - a + 180) % 360 - 180;\n return diff < -180 ? diff + 360 : diff;\n}\n\n/*\n * Call an asynchronous function on an array of arguments,\n * calling `callback` with the completed results of all calls.\n *\n * @param array input to each call of the async function.\n * @param fn an async function with signature (data, callback)\n * @param callback a callback run after all async work is done.\n * called with an array, containing the results of each async call.\n * @private\n */\nexport function asyncAll(\n array: Array,\n fn: (item: Item, fnCallback: Callback) => void,\n callback: Callback>\n): void {\n if (!array.length) { return callback(null, []); }\n let remaining = array.length;\n const results = new Array(array.length);\n let error = null;\n array.forEach((item, i) => {\n fn(item, (err, result) => {\n if (err) error = err;\n results[i] = ((result: any): Result); // https://github.com/facebook/flow/issues/2123\n if (--remaining === 0) callback(error, results);\n });\n });\n}\n\n/*\n * Polyfill for Object.values. Not fully spec compliant, but we don't\n * need it to be.\n *\n * @private\n */\nexport function values(obj: {[key: string]: T}): Array {\n const result = [];\n for (const k in obj) {\n result.push(obj[k]);\n }\n return result;\n}\n\n/*\n * Compute the difference between the keys in one object and the keys\n * in another object.\n *\n * @returns keys difference\n * @private\n */\nexport function keysDifference(obj: {[key: string]: S}, other: {[key: string]: T}): Array {\n const difference = [];\n for (const i in obj) {\n if (!(i in other)) {\n difference.push(i);\n }\n }\n return difference;\n}\n\n/**\n * Given a destination object and optionally many source objects,\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param dest destination object\n * @param sources sources from which properties are pulled\n * @private\n */\nexport function extend(dest: Object, ...sources: Array): Object {\n for (const src of sources) {\n for (const k in src) {\n dest[k] = src[k];\n }\n }\n return dest;\n}\n\n/**\n * Given an object and a number of properties as strings, return version\n * of that object with only those properties.\n *\n * @param src the object\n * @param properties an array of property names chosen\n * to appear on the resulting object.\n * @returns object with limited properties.\n * @example\n * var foo = { name: 'Charlie', age: 10 };\n * var justName = pick(foo, ['name']);\n * // justName = { name: 'Charlie' }\n * @private\n */\nexport function pick(src: Object, properties: Array): Object {\n const result = {};\n for (let i = 0; i < properties.length; i++) {\n const k = properties[i];\n if (k in src) {\n result[k] = src[k];\n }\n }\n return result;\n}\n\nlet id = 1;\n\n/**\n * Return a unique numeric id, starting at 1 and incrementing with\n * each call.\n *\n * @returns unique numeric id.\n * @private\n */\nexport function uniqueId(): number {\n return id++;\n}\n\n/**\n * Return a random UUID (v4). Taken from: https://gist.github.com/jed/982883\n * @private\n */\nexport function uuid(): string {\n function b(a: void) {\n return a ? (a ^ Math.random() * (16 >> a / 4)).toString(16) :\n //$FlowFixMe: Flow doesn't like the implied array literal conversion here\n ([1e7] + -[1e3] + -4e3 + -8e3 + -1e11).replace(/[018]/g, b);\n }\n return b();\n}\n\n/**\n * Return whether a given value is a power of two\n * @private\n */\nexport function isPowerOfTwo(value: number): boolean {\n return (Math.log(value) / Math.LN2) % 1 === 0;\n}\n\n/**\n * Return the next power of two, or the input value if already a power of two\n * @private\n */\nexport function nextPowerOfTwo(value: number): number {\n if (value <= 1) return 1;\n return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n}\n\n/**\n * Return the previous power of two, or the input value if already a power of two\n * @private\n */\nexport function prevPowerOfTwo(value: number): number {\n if (value <= 1) return 1;\n return Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n}\n\n/**\n * Validate a string to match UUID(v4) of the\n * form: xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx\n * @param str string to validate.\n * @private\n */\nexport function validateUuid(str: ?string): boolean {\n return str ? /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(str) : false;\n}\n\n/**\n * Given an array of member function names as strings, replace all of them\n * with bound versions that will always refer to `context` as `this`. This\n * is useful for classes where otherwise event bindings would reassign\n * `this` to the evented object or some other value: this lets you ensure\n * the `this` value always.\n *\n * @param fns list of member function names\n * @param context the context value\n * @example\n * function MyClass() {\n * bindAll(['ontimer'], this);\n * this.name = 'Tom';\n * }\n * MyClass.prototype.ontimer = function() {\n * alert(this.name);\n * };\n * var myClass = new MyClass();\n * setTimeout(myClass.ontimer, 100);\n * @private\n */\nexport function bindAll(fns: Array, context: Object): void {\n fns.forEach((fn) => {\n if (!context[fn]) { return; }\n context[fn] = context[fn].bind(context);\n });\n}\n\n/**\n * Determine if a string ends with a particular substring\n *\n * @private\n */\nexport function endsWith(string: string, suffix: string): boolean {\n return string.indexOf(suffix, string.length - suffix.length) !== -1;\n}\n\n/**\n * Create an object by mapping all the values of an existing object while\n * preserving their keys.\n *\n * @private\n */\n// $FlowFixMe[missing-this-annot]\nexport function mapObject(input: Object, iterator: Function, context?: Object): Object {\n const output = {};\n for (const key in input) {\n output[key] = iterator.call(context || this, input[key], key, input);\n }\n return output;\n}\n\n/**\n * Create an object by filtering out values of an existing object.\n *\n * @private\n */\n// $FlowFixMe[missing-this-annot]\nexport function filterObject(input: Object, iterator: Function, context?: Object): Object {\n const output = {};\n for (const key in input) {\n if (iterator.call(context || this, input[key], key, input)) {\n output[key] = input[key];\n }\n }\n return output;\n}\n\nimport deepEqual from '../style-spec/util/deep_equal.js';\nexport {deepEqual};\n\n/**\n * Deeply clones two objects.\n *\n * @private\n */\nexport function clone(input: T): T {\n if (Array.isArray(input)) {\n return ((input.map(clone): any): T);\n } else if (typeof input === 'object' && input) {\n return ((mapObject(input, clone): any): T);\n } else {\n return input;\n }\n}\n\n/**\n * Maps a value from a range between [min, max] to the range [outMin, outMax]\n *\n * @private\n */\nexport function mapValue(value: number, min: number, max: number, outMin: number, outMax: number): number {\n return clamp((value - min) / (max - min) * (outMax - outMin) + outMin, outMin, outMax);\n}\n\n/**\n * Check if two arrays have at least one common element.\n *\n * @private\n */\nexport function arraysIntersect(a: Array, b: Array): boolean {\n for (let l = 0; l < a.length; l++) {\n if (b.indexOf(a[l]) >= 0) return true;\n }\n return false;\n}\n\n/**\n * Print a warning message to the console and ensure duplicate warning messages\n * are not printed.\n *\n * @private\n */\nconst warnOnceHistory: {[key: string]: boolean} = {};\n\nexport function warnOnce(message: string): void {\n if (!warnOnceHistory[message]) {\n // console isn't defined in some WebWorkers, see #2558\n if (typeof console !== \"undefined\") console.warn(message);\n warnOnceHistory[message] = true;\n }\n}\n\n/**\n * Indicates if the provided Points are in a counter clockwise (true) or clockwise (false) order\n *\n * @private\n * @returns true for a counter clockwise set of points\n */\n// http://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/\nexport function isCounterClockwise(a: Point, b: Point, c: Point): boolean {\n return (c.y - a.y) * (b.x - a.x) > (b.y - a.y) * (c.x - a.x);\n}\n\n/**\n * Returns the signed area for the polygon ring. Postive areas are exterior rings and\n * have a clockwise winding. Negative areas are interior rings and have a counter clockwise\n * ordering.\n *\n * @private\n * @param ring Exterior or interior ring\n */\nexport function calculateSignedArea(ring: Array): number {\n let sum = 0;\n for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n}\n\n/* global self, WorkerGlobalScope */\n/**\n * Returns true if run in the web-worker context.\n *\n * @private\n * @returns {boolean}\n */\nexport function isWorker(): boolean {\n return typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' &&\n self instanceof WorkerGlobalScope;\n}\n\n/**\n * Parses data from 'Cache-Control' headers.\n *\n * @private\n * @param cacheControl Value of 'Cache-Control' header\n * @return object containing parsed header info.\n */\n\nexport function parseCacheControl(cacheControl: string): Object {\n // Taken from [Wreck](https://github.com/hapijs/wreck)\n const re = /(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g;\n\n const header = {};\n cacheControl.replace(re, ($0, $1, $2, $3) => {\n const value = $2 || $3;\n header[$1] = value ? value.toLowerCase() : true;\n return '';\n });\n\n if (header['max-age']) {\n const maxAge = parseInt(header['max-age'], 10);\n if (isNaN(maxAge)) delete header['max-age'];\n else header['max-age'] = maxAge;\n }\n\n return header;\n}\n\nlet _isSafari = null;\n\nexport function _resetSafariCheckForTest() {\n _isSafari = null;\n}\n\n/**\n * Returns true when run in WebKit derived browsers.\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\n * transfer data between WebWorkers and the main thread.\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\n *\n * This should be removed once the underlying Safari issue is fixed.\n *\n * @private\n * @param scope {WindowOrWorkerGlobalScope} Since this function is used both on the main thread and WebWorker context,\n * let the calling scope pass in the global scope object.\n * @returns {boolean}\n */\nexport function isSafari(scope: any): boolean {\n if (_isSafari == null) {\n const userAgent = scope.navigator ? scope.navigator.userAgent : null;\n _isSafari = !!scope.safari ||\n !!(userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(userAgent) || (!!userAgent.match('Safari') && !userAgent.match('Chrome'))));\n }\n return _isSafari;\n}\n\nexport function isSafariWithAntialiasingBug(scope: any): ?boolean {\n const userAgent = scope.navigator ? scope.navigator.userAgent : null;\n if (!isSafari(scope)) return false;\n // 15.4 is known to be buggy.\n // 15.5 may or may not include the fix. Mark it as buggy to be on the safe side.\n return userAgent && (userAgent.match('Version/15.4') || userAgent.match('Version/15.5') || userAgent.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/));\n}\n\nexport function isFullscreen(): boolean {\n return !!window.document.fullscreenElement || !!window.document.webkitFullscreenElement;\n}\n\nexport function storageAvailable(type: string): boolean {\n try {\n const storage = window[type];\n storage.setItem('_mapbox_test_', 1);\n storage.removeItem('_mapbox_test_');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// The following methods are from https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\n//Unicode compliant base64 encoder for strings\nexport function b64EncodeUnicode(str: string): string {\n return window.btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n (match, p1) => {\n return String.fromCharCode(Number('0x' + p1)); //eslint-disable-line\n }\n )\n );\n}\n\n// Unicode compliant decoder for base64-encoded strings\nexport function b64DecodeUnicode(str: string): string {\n return decodeURIComponent(window.atob(str).split('').map((c) => {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); //eslint-disable-line\n }).join(''));\n}\n\nexport function getColumn(matrix: Mat4, col: number): Vec4 {\n return [matrix[col * 4], matrix[col * 4 + 1], matrix[col * 4 + 2], matrix[col * 4 + 3]];\n}\n\nexport function setColumn(matrix: Mat4, col: number, values: Vec4) {\n matrix[col * 4 + 0] = values[0];\n matrix[col * 4 + 1] = values[1];\n matrix[col * 4 + 2] = values[2];\n matrix[col * 4 + 3] = values[3];\n}\n", "// @flow\n\nimport {warnOnce, parseCacheControl} from './util.js';\nimport window from './window.js';\n\nimport type Dispatcher from './dispatcher.js';\n\nconst CACHE_NAME = 'mapbox-tiles';\nlet cacheLimit = 500; // 50MB / (100KB/tile) ~= 500 tiles\nlet cacheCheckThreshold = 50;\n\nconst MIN_TIME_UNTIL_EXPIRY = 1000 * 60 * 7; // 7 minutes. Skip caching tiles with a short enough max age.\n\nexport type ResponseOptions = {\n status: number,\n statusText: string,\n headers: Headers\n};\n\n// We're using a global shared cache object. Normally, requesting ad-hoc Cache objects is fine, but\n// Safari has a memory leak in which it fails to release memory when requesting keys() from a Cache\n// object. See https://bugs.webkit.org/show_bug.cgi?id=203991 for more information.\nlet sharedCache: ?Promise;\n\nfunction getCaches() {\n try {\n return window.caches;\n } catch (e) {\n //