/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js": /*!********************************************************************!*\ !*** ./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/* WEBPACK VAR INJECTION */(function(global, Buffer) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar $version = 8;\nvar $root = {\n version: {\n required: true,\n type: \"enum\",\n values: [8],\n doc: \"Style specification version number. Must be 8.\",\n example: 8\n },\n name: {\n type: \"string\",\n doc: \"A human-readable name for the style.\",\n example: \"Bright\"\n },\n metadata: {\n type: \"*\",\n doc: \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n center: {\n type: \"array\",\n value: \"number\",\n doc: \"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n example: [-73.9749, 40.7736]\n },\n zoom: {\n type: \"number\",\n doc: \"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n example: 12.5\n },\n bearing: {\n type: \"number\",\n \"default\": 0,\n period: 360,\n units: \"degrees\",\n doc: \"Default bearing, in degrees. The bearing is the compass direction that is \\\"up\\\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n example: 29\n },\n pitch: {\n type: \"number\",\n \"default\": 0,\n units: \"degrees\",\n doc: \"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n example: 50\n },\n light: {\n type: \"light\",\n doc: \"The global light source.\",\n example: {\n anchor: \"viewport\",\n color: \"white\",\n intensity: 0.4\n }\n },\n sources: {\n required: true,\n type: \"sources\",\n doc: \"Data source specifications.\",\n example: {\n \"mapbox-streets\": {\n type: \"vector\",\n url: \"mapbox://mapbox.mapbox-streets-v6\"\n }\n }\n },\n sprite: {\n type: \"string\",\n doc: \"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n example: \"mapbox://sprites/mapbox/bright-v8\"\n },\n glyphs: {\n type: \"string\",\n doc: \"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n example: \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n },\n transition: {\n type: \"transition\",\n doc: \"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.\",\n example: {\n duration: 300,\n delay: 0\n }\n },\n layers: {\n required: true,\n type: \"array\",\n value: \"layer\",\n doc: \"Layers will be drawn in the order of this array.\",\n example: [{\n id: \"water\",\n source: \"mapbox-streets\",\n \"source-layer\": \"water\",\n type: \"fill\",\n paint: {\n \"fill-color\": \"#00ffff\"\n }\n }]\n }\n};\nvar sources = {\n \"*\": {\n type: \"source\",\n doc: \"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided.\"\n }\n};\nvar source = [\"source_vector\", \"source_raster\", \"source_raster_dem\", \"source_geojson\", \"source_video\", \"source_image\"];\nvar source_vector = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n vector: {\n doc: \"A vector tile source.\"\n }\n },\n doc: \"The type of the source.\"\n },\n url: {\n type: \"string\",\n doc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n tiles: {\n type: \"array\",\n value: \"string\",\n doc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n bounds: {\n type: \"array\",\n value: \"number\",\n length: 4,\n \"default\": [-180, -85.051129, 180, 85.051129],\n doc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n },\n scheme: {\n type: \"enum\",\n values: {\n xyz: {\n doc: \"Slippy map tilenames scheme.\"\n },\n tms: {\n doc: \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n doc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n minzoom: {\n type: \"number\",\n \"default\": 0,\n doc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n maxzoom: {\n type: \"number\",\n \"default\": 22,\n doc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n },\n attribution: {\n type: \"string\",\n doc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n promoteId: {\n type: \"promoteId\",\n doc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers.\"\n },\n volatile: {\n type: \"boolean\",\n \"default\": false,\n doc: \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n android: \"9.3.0\",\n ios: \"5.10.0\"\n }\n }\n },\n \"*\": {\n type: \"*\",\n doc: \"Other keys to configure the data source.\"\n }\n};\nvar source_raster = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n raster: {\n doc: \"A raster tile source.\"\n }\n },\n doc: \"The type of the source.\"\n },\n url: {\n type: \"string\",\n doc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n tiles: {\n type: \"array\",\n value: \"string\",\n doc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n bounds: {\n type: \"array\",\n value: \"number\",\n length: 4,\n \"default\": [-180, -85.051129, 180, 85.051129],\n doc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n },\n minzoom: {\n type: \"number\",\n \"default\": 0,\n doc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n maxzoom: {\n type: \"number\",\n \"default\": 22,\n doc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n },\n tileSize: {\n type: \"number\",\n \"default\": 512,\n units: \"pixels\",\n doc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n scheme: {\n type: \"enum\",\n values: {\n xyz: {\n doc: \"Slippy map tilenames scheme.\"\n },\n tms: {\n doc: \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n doc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n attribution: {\n type: \"string\",\n doc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n volatile: {\n type: \"boolean\",\n \"default\": false,\n doc: \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n android: \"9.3.0\",\n ios: \"5.10.0\"\n }\n }\n },\n \"*\": {\n type: \"*\",\n doc: \"Other keys to configure the data source.\"\n }\n};\nvar source_raster_dem = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n \"raster-dem\": {\n doc: \"A RGB-encoded raster DEM source\"\n }\n },\n doc: \"The type of the source.\"\n },\n url: {\n type: \"string\",\n doc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n tiles: {\n type: \"array\",\n value: \"string\",\n doc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n bounds: {\n type: \"array\",\n value: \"number\",\n length: 4,\n \"default\": [-180, -85.051129, 180, 85.051129],\n doc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n },\n minzoom: {\n type: \"number\",\n \"default\": 0,\n doc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n maxzoom: {\n type: \"number\",\n \"default\": 22,\n doc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n },\n tileSize: {\n type: \"number\",\n \"default\": 512,\n units: \"pixels\",\n doc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n attribution: {\n type: \"string\",\n doc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n encoding: {\n type: \"enum\",\n values: {\n terrarium: {\n doc: \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n },\n mapbox: {\n doc: \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n }\n },\n \"default\": \"mapbox\",\n doc: \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n },\n volatile: {\n type: \"boolean\",\n \"default\": false,\n doc: \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n android: \"9.3.0\",\n ios: \"5.10.0\"\n }\n }\n },\n \"*\": {\n type: \"*\",\n doc: \"Other keys to configure the data source.\"\n }\n};\nvar source_geojson = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n geojson: {\n doc: \"A GeoJSON data source.\"\n }\n },\n doc: \"The data type of the GeoJSON source.\"\n },\n data: {\n type: \"*\",\n doc: \"A URL to a GeoJSON file, or inline GeoJSON.\"\n },\n maxzoom: {\n type: \"number\",\n \"default\": 18,\n doc: \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n },\n attribution: {\n type: \"string\",\n doc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n buffer: {\n type: \"number\",\n \"default\": 128,\n maximum: 512,\n minimum: 0,\n doc: \"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.\"\n },\n filter: {\n type: \"*\",\n doc: \"An expression for filtering features prior to processing them for rendering.\"\n },\n tolerance: {\n type: \"number\",\n \"default\": 0.375,\n doc: \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n },\n cluster: {\n type: \"boolean\",\n \"default\": false,\n doc: \"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\\n * `cluster` Is `true` if the point is a cluster \\n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\\n * `point_count` Number of original points grouped into this cluster\\n * `point_count_abbreviated` An abbreviated point count\"\n },\n clusterRadius: {\n type: \"number\",\n \"default\": 50,\n minimum: 0,\n doc: \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n },\n clusterMaxZoom: {\n type: \"number\",\n doc: \"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15.\"\n },\n clusterMinPoints: {\n type: \"number\",\n doc: \"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`.\"\n },\n clusterProperties: {\n type: \"*\",\n doc: \"An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\\\"property_name\\\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\\\"+\\\"` or `\\\"max\\\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\\n\\nExample: `{\\\"sum\\\": [\\\"+\\\", [\\\"get\\\", \\\"scalerank\\\"]]}`.\\n\\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\\\"accumulated\\\"]` value, e.g.:\\n`{\\\"sum\\\": [[\\\"+\\\", [\\\"accumulated\\\"], [\\\"get\\\", \\\"sum\\\"]], [\\\"get\\\", \\\"scalerank\\\"]]}`\"\n },\n lineMetrics: {\n type: \"boolean\",\n \"default\": false,\n doc: \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n },\n generateId: {\n type: \"boolean\",\n \"default\": false,\n doc: \"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values.\"\n },\n promoteId: {\n type: \"promoteId\",\n doc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`.\"\n }\n};\nvar source_video = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n video: {\n doc: \"A video data source.\"\n }\n },\n doc: \"The data type of the video source.\"\n },\n urls: {\n required: true,\n type: \"array\",\n value: \"string\",\n doc: \"URLs to video content in order of preferred format.\"\n },\n coordinates: {\n required: true,\n doc: \"Corners of video specified in longitude, latitude pairs.\",\n type: \"array\",\n length: 4,\n value: {\n type: \"array\",\n length: 2,\n value: \"number\",\n doc: \"A single longitude, latitude pair.\"\n }\n }\n};\nvar source_image = {\n type: {\n required: true,\n type: \"enum\",\n values: {\n image: {\n doc: \"An image data source.\"\n }\n },\n doc: \"The data type of the image source.\"\n },\n url: {\n required: true,\n type: \"string\",\n doc: \"URL that points to an image.\"\n },\n coordinates: {\n required: true,\n doc: \"Corners of image specified in longitude, latitude pairs.\",\n type: \"array\",\n length: 4,\n value: {\n type: \"array\",\n length: 2,\n value: \"number\",\n doc: \"A single longitude, latitude pair.\"\n }\n }\n};\nvar layer = {\n id: {\n type: \"string\",\n doc: \"Unique layer name.\",\n required: true\n },\n type: {\n type: \"enum\",\n values: {\n fill: {\n doc: \"A filled polygon with an optional stroked border.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n },\n line: {\n doc: \"A stroked line.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n },\n symbol: {\n doc: \"An icon or a text label.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n },\n circle: {\n doc: \"A filled circle.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n },\n heatmap: {\n doc: \"A heatmap.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"fill-extrusion\": {\n doc: \"An extruded (3D) polygon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n }\n },\n raster: {\n doc: \"Raster map textures such as satellite imagery.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n },\n hillshade: {\n doc: \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n background: {\n doc: \"The background color or pattern of the map.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n }\n }\n },\n doc: \"Rendering type of this layer.\",\n required: true\n },\n metadata: {\n type: \"*\",\n doc: \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n source: {\n type: \"string\",\n doc: \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n },\n \"source-layer\": {\n type: \"string\",\n doc: \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n },\n minzoom: {\n type: \"number\",\n minimum: 0,\n maximum: 24,\n doc: \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n },\n maxzoom: {\n type: \"number\",\n minimum: 0,\n maximum: 24,\n doc: \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n },\n filter: {\n type: \"filter\",\n doc: \"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.\"\n },\n layout: {\n type: \"layout\",\n doc: \"Layout properties for the layer.\"\n },\n paint: {\n type: \"paint\",\n doc: \"Default paint properties for this layer.\"\n }\n};\nvar layout = [\"layout_fill\", \"layout_line\", \"layout_circle\", \"layout_heatmap\", \"layout_fill-extrusion\", \"layout_symbol\", \"layout_raster\", \"layout_hillshade\", \"layout_background\"];\nvar layout_background = {\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_fill = {\n \"fill-sort-key\": {\n type: \"number\",\n doc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.2.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n },\n \"data-driven styling\": {\n js: \"1.2.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_circle = {\n \"circle-sort-key\": {\n type: \"number\",\n doc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.2.0\",\n android: \"9.2.0\",\n ios: \"5.9.0\",\n macos: \"0.16.0\"\n },\n \"data-driven styling\": {\n js: \"1.2.0\",\n android: \"9.2.0\",\n ios: \"5.9.0\",\n macos: \"0.16.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_heatmap = {\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_line = {\n \"line-cap\": {\n type: \"enum\",\n values: {\n butt: {\n doc: \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n },\n round: {\n doc: \"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n },\n square: {\n doc: \"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n }\n },\n \"default\": \"butt\",\n doc: \"The display of line endings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-join\": {\n type: \"enum\",\n values: {\n bevel: {\n doc: \"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n },\n round: {\n doc: \"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n },\n miter: {\n doc: \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n }\n },\n \"default\": \"miter\",\n doc: \"The display of lines when joining.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.40.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-miter-limit\": {\n type: \"number\",\n \"default\": 2,\n doc: \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n requires: [{\n \"line-join\": \"miter\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-round-limit\": {\n type: \"number\",\n \"default\": 1.05,\n doc: \"Used to automatically convert round joins to miter joins for shallow angles.\",\n requires: [{\n \"line-join\": \"round\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-sort-key\": {\n type: \"number\",\n doc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.2.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n },\n \"data-driven styling\": {\n js: \"1.2.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_symbol = {\n \"symbol-placement\": {\n type: \"enum\",\n values: {\n point: {\n doc: \"The label is placed at the point where the geometry is located.\"\n },\n line: {\n doc: \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n },\n \"line-center\": {\n doc: \"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries.\"\n }\n },\n \"default\": \"point\",\n doc: \"Label placement relative to its geometry.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"`line-center` value\": {\n js: \"0.47.0\",\n android: \"6.4.0\",\n ios: \"4.3.0\",\n macos: \"0.10.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-spacing\": {\n type: \"number\",\n \"default\": 250,\n minimum: 1,\n units: \"pixels\",\n doc: \"Distance between two symbol anchors.\",\n requires: [{\n \"symbol-placement\": \"line\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-avoid-edges\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-sort-key\": {\n type: \"number\",\n doc: \"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.53.0\",\n android: \"7.4.0\",\n ios: \"4.11.0\",\n macos: \"0.14.0\"\n },\n \"data-driven styling\": {\n js: \"0.53.0\",\n android: \"7.4.0\",\n ios: \"4.11.0\",\n macos: \"0.14.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"symbol-z-order\": {\n type: \"enum\",\n values: {\n auto: {\n doc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n },\n \"viewport-y\": {\n doc: \"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n },\n source: {\n doc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.\"\n }\n },\n \"default\": \"auto\",\n doc: \"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.49.0\",\n android: \"6.6.0\",\n ios: \"4.5.0\",\n macos: \"0.12.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-allow-overlap\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-ignore-placement\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, other symbols can be visible even if they collide with the icon.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-optional\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n requires: [\"icon-image\", \"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-rotation-alignment\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line.\"\n },\n viewport: {\n doc: \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n auto: {\n doc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n }\n },\n \"default\": \"auto\",\n doc: \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"`auto` value\": {\n js: \"0.25.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.3.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-size\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n units: \"factor of the original icon size\",\n doc: \"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.35.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-text-fit\": {\n type: \"enum\",\n values: {\n none: {\n doc: \"The icon is displayed at its intrinsic aspect ratio.\"\n },\n width: {\n doc: \"The icon is scaled in the x-dimension to fit the width of the text.\"\n },\n height: {\n doc: \"The icon is scaled in the y-dimension to fit the height of the text.\"\n },\n both: {\n doc: \"The icon is scaled in both x- and y-dimensions.\"\n }\n },\n \"default\": \"none\",\n doc: \"Scales the icon to fit around the associated text.\",\n requires: [\"icon-image\", \"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.21.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.2.1\"\n },\n \"stretchable icons\": {\n js: \"1.6.0\",\n android: \"9.2.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-text-fit-padding\": {\n type: \"array\",\n value: \"number\",\n length: 4,\n \"default\": [0, 0, 0, 0],\n units: \"pixels\",\n doc: \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n requires: [\"icon-image\", \"text-field\", {\n \"icon-text-fit\": [\"both\", \"width\", \"height\"]\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.21.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.2.1\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-image\": {\n type: \"resolvedImage\",\n doc: \"Name of image in sprite to use for drawing an image background.\",\n tokens: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.35.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-rotate\": {\n type: \"number\",\n \"default\": 0,\n period: 360,\n units: \"degrees\",\n doc: \"Rotates the icon clockwise.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.21.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-padding\": {\n type: \"number\",\n \"default\": 2,\n minimum: 0,\n units: \"pixels\",\n doc: \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-keep-upright\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n requires: [\"icon-image\", {\n \"icon-rotation-alignment\": \"map\"\n }, {\n \"symbol-placement\": [\"line\", \"line-center\"]\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-offset\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n doc: \"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-anchor\": {\n type: \"enum\",\n values: {\n center: {\n doc: \"The center of the icon is placed closest to the anchor.\"\n },\n left: {\n doc: \"The left side of the icon is placed closest to the anchor.\"\n },\n right: {\n doc: \"The right side of the icon is placed closest to the anchor.\"\n },\n top: {\n doc: \"The top of the icon is placed closest to the anchor.\"\n },\n bottom: {\n doc: \"The bottom of the icon is placed closest to the anchor.\"\n },\n \"top-left\": {\n doc: \"The top left corner of the icon is placed closest to the anchor.\"\n },\n \"top-right\": {\n doc: \"The top right corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n doc: \"The bottom left corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n doc: \"The bottom right corner of the icon is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n doc: \"Part of the icon placed closest to the anchor.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.40.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n },\n \"data-driven styling\": {\n js: \"0.40.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-pitch-alignment\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The icon is aligned to the plane of the map.\"\n },\n viewport: {\n doc: \"The icon is aligned to the plane of the viewport.\"\n },\n auto: {\n doc: \"Automatically matches the value of `icon-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n doc: \"Orientation of icon when map is pitched.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.39.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-pitch-alignment\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The text is aligned to the plane of the map.\"\n },\n viewport: {\n doc: \"The text is aligned to the plane of the viewport.\"\n },\n auto: {\n doc: \"Automatically matches the value of `text-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n doc: \"Orientation of text when map is pitched.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.21.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.2.1\"\n },\n \"`auto` value\": {\n js: \"0.25.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.3.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotation-alignment\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.\"\n },\n viewport: {\n doc: \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n auto: {\n doc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n }\n },\n \"default\": \"auto\",\n doc: \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"`auto` value\": {\n js: \"0.25.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.3.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-field\": {\n type: \"formatted\",\n \"default\": \"\",\n tokens: true,\n doc: \"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-font\": {\n type: \"array\",\n value: \"string\",\n \"default\": [\"Open Sans Regular\", \"Arial Unicode MS Regular\"],\n doc: \"Font stack to use for displaying text.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-size\": {\n type: \"number\",\n \"default\": 16,\n minimum: 0,\n units: \"pixels\",\n doc: \"Font size.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.35.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-width\": {\n type: \"number\",\n \"default\": 10,\n minimum: 0,\n units: \"ems\",\n doc: \"The maximum line width for text wrapping.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.40.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-line-height\": {\n type: \"number\",\n \"default\": 1.2,\n units: \"ems\",\n doc: \"Text leading value for multi-line text.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-letter-spacing\": {\n type: \"number\",\n \"default\": 0,\n units: \"ems\",\n doc: \"Text tracking amount.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.40.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-justify\": {\n type: \"enum\",\n values: {\n auto: {\n doc: \"The text is aligned towards the anchor position.\"\n },\n left: {\n doc: \"The text is aligned to the left.\"\n },\n center: {\n doc: \"The text is centered.\"\n },\n right: {\n doc: \"The text is aligned to the right.\"\n }\n },\n \"default\": \"center\",\n doc: \"Text justification options.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.39.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n },\n auto: {\n js: \"0.54.0\",\n android: \"7.4.0\",\n ios: \"4.10.0\",\n macos: \"0.14.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-radial-offset\": {\n type: \"number\",\n units: \"ems\",\n \"default\": 0,\n doc: \"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.54.0\",\n android: \"7.4.0\",\n ios: \"4.10.0\",\n macos: \"0.14.0\"\n },\n \"data-driven styling\": {\n js: \"0.54.0\",\n android: \"7.4.0\",\n ios: \"4.10.0\",\n macos: \"0.14.0\"\n }\n },\n requires: [\"text-field\"],\n \"property-type\": \"data-driven\",\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n }\n },\n \"text-variable-anchor\": {\n type: \"array\",\n value: \"enum\",\n values: {\n center: {\n doc: \"The center of the text is placed closest to the anchor.\"\n },\n left: {\n doc: \"The left side of the text is placed closest to the anchor.\"\n },\n right: {\n doc: \"The right side of the text is placed closest to the anchor.\"\n },\n top: {\n doc: \"The top of the text is placed closest to the anchor.\"\n },\n bottom: {\n doc: \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n doc: \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n doc: \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n doc: \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n doc: \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n requires: [\"text-field\", {\n \"symbol-placement\": [\"point\"]\n }],\n doc: \"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.54.0\",\n android: \"7.4.0\",\n ios: \"4.10.0\",\n macos: \"0.14.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-anchor\": {\n type: \"enum\",\n values: {\n center: {\n doc: \"The center of the text is placed closest to the anchor.\"\n },\n left: {\n doc: \"The left side of the text is placed closest to the anchor.\"\n },\n right: {\n doc: \"The right side of the text is placed closest to the anchor.\"\n },\n top: {\n doc: \"The top of the text is placed closest to the anchor.\"\n },\n bottom: {\n doc: \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n doc: \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n doc: \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n doc: \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n doc: \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n doc: \"Part of the text placed closest to the anchor.\",\n requires: [\"text-field\", {\n \"!\": \"text-variable-anchor\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.39.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-angle\": {\n type: \"number\",\n \"default\": 45,\n units: \"degrees\",\n doc: \"Maximum angle change between adjacent characters.\",\n requires: [\"text-field\", {\n \"symbol-placement\": [\"line\", \"line-center\"]\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-writing-mode\": {\n type: \"array\",\n value: \"enum\",\n values: {\n horizontal: {\n doc: \"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally.\"\n },\n vertical: {\n doc: \"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.\"\n }\n },\n doc: \"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.\",\n requires: [\"text-field\", {\n \"symbol-placement\": [\"point\"]\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.3.0\",\n android: \"8.3.0\",\n ios: \"5.3.0\",\n macos: \"0.15.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotate\": {\n type: \"number\",\n \"default\": 0,\n period: 360,\n units: \"degrees\",\n doc: \"Rotates the text clockwise.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.35.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-padding\": {\n type: \"number\",\n \"default\": 2,\n minimum: 0,\n units: \"pixels\",\n doc: \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-keep-upright\": {\n type: \"boolean\",\n \"default\": true,\n doc: \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n requires: [\"text-field\", {\n \"text-rotation-alignment\": \"map\"\n }, {\n \"symbol-placement\": [\"line\", \"line-center\"]\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-transform\": {\n type: \"enum\",\n values: {\n none: {\n doc: \"The text is not altered.\"\n },\n uppercase: {\n doc: \"Forces all letters to be displayed in uppercase.\"\n },\n lowercase: {\n doc: \"Forces all letters to be displayed in lowercase.\"\n }\n },\n \"default\": \"none\",\n doc: \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-offset\": {\n type: \"array\",\n doc: \"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.\",\n value: \"number\",\n units: \"ems\",\n length: 2,\n \"default\": [0, 0],\n requires: [\"text-field\", {\n \"!\": \"text-radial-offset\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.35.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-allow-overlap\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-ignore-placement\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, other symbols can be visible even if they collide with the text.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-optional\": {\n type: \"boolean\",\n \"default\": false,\n doc: \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n requires: [\"text-field\", \"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_raster = {\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar layout_hillshade = {\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n};\nvar filter = {\n type: \"array\",\n value: \"*\",\n doc: \"A filter selects specific features from a layer.\"\n};\nvar filter_operator = {\n type: \"enum\",\n values: {\n \"==\": {\n doc: \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n },\n \"!=\": {\n doc: \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n },\n \">\": {\n doc: \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n },\n \">=\": {\n doc: \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n },\n \"<\": {\n doc: \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n },\n \"<=\": {\n doc: \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n },\n \"in\": {\n doc: \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n },\n \"!in\": {\n doc: \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n },\n all: {\n doc: \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n },\n any: {\n doc: \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n },\n none: {\n doc: \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n },\n has: {\n doc: \"`[\\\"has\\\", key]` `feature[key]` exists\"\n },\n \"!has\": {\n doc: \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n },\n within: {\n doc: \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n }\n },\n doc: \"The filter operator.\"\n};\nvar geometry_type = {\n type: \"enum\",\n values: {\n Point: {\n doc: \"Filter to point geometries.\"\n },\n LineString: {\n doc: \"Filter to line geometries.\"\n },\n Polygon: {\n doc: \"Filter to polygon geometries.\"\n }\n },\n doc: \"The geometry type for the filter to select.\"\n};\nvar function_stop = {\n type: \"array\",\n minimum: 0,\n maximum: 24,\n value: [\"number\", \"color\"],\n length: 2,\n doc: \"Zoom level and value pair.\"\n};\nvar expression = {\n type: \"array\",\n value: \"*\",\n minimum: 1,\n doc: \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n};\nvar expression_name = {\n doc: \"\",\n type: \"enum\",\n values: {\n \"let\": {\n doc: \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n group: \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"var\": {\n doc: \"References variable bound using \\\"let\\\".\",\n group: \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n literal: {\n doc: \"Provides a literal array or object value.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n array: {\n doc: \"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n at: {\n doc: \"Retrieves an item from an array.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"in\": {\n doc: \"Determines whether an item exists in an array or a substring exists in a string.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.6.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n }\n }\n },\n \"index-of\": {\n doc: \"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.10.0\"\n }\n }\n },\n slice: {\n doc: \"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.10.0\"\n }\n }\n },\n \"case\": {\n doc: \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n match: {\n doc: \"Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be either:\\n - a single literal value; or\\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`). The input matches if any of the values in the array matches, similar to the `\\\"in\\\"` operator.\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n coalesce: {\n doc: \"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n step: {\n doc: \"Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\",\n group: \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.42.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n interpolate: {\n doc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\\n\\nInterpolation types:\\n- `[\\\"linear\\\"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `[\\\"exponential\\\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n- `[\\\"cubic-bezier\\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\",\n group: \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.42.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"interpolate-hcl\": {\n doc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.\",\n group: \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.49.0\"\n }\n }\n },\n \"interpolate-lab\": {\n doc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.\",\n group: \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.49.0\"\n }\n }\n },\n ln2: {\n doc: \"Returns mathematical constant ln(2).\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n pi: {\n doc: \"Returns the mathematical constant pi.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n e: {\n doc: \"Returns the mathematical constant e.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"typeof\": {\n doc: \"Returns a string describing the type of the given value.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n string: {\n doc: \"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n number: {\n doc: \"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n boolean: {\n doc: \"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n object: {\n doc: \"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n collator: {\n doc: \"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n format: {\n doc: \"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\\n- `\\\"text-font\\\"`: Overrides the font stack specified by the root layout property.\\n- `\\\"text-color\\\"`: Overrides the color specified by the root paint property.\\n- `\\\"font-scale\\\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.48.0\",\n android: \"6.7.0\",\n ios: \"4.6.0\",\n macos: \"0.12.0\"\n },\n \"text-font\": {\n js: \"0.48.0\",\n android: \"6.7.0\",\n ios: \"4.6.0\",\n macos: \"0.12.0\"\n },\n \"font-scale\": {\n js: \"0.48.0\",\n android: \"6.7.0\",\n ios: \"4.6.0\",\n macos: \"0.12.0\"\n },\n \"text-color\": {\n js: \"1.3.0\",\n android: \"7.3.0\",\n ios: \"4.10.0\",\n macos: \"0.14.0\"\n },\n image: {\n js: \"1.6.0\",\n android: \"8.6.0\",\n ios: \"5.7.0\",\n macos: \"0.15.0\"\n }\n }\n },\n image: {\n doc: \"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.4.0\",\n android: \"8.6.0\",\n ios: \"5.7.0\",\n macos: \"0.15.0\"\n }\n }\n },\n \"number-format\": {\n doc: \"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.54.0\"\n }\n }\n },\n \"to-string\": {\n doc: \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a boolean, the result is `\\\"true\\\"` or `\\\"false\\\"`. If the input is a number, it is converted to a string as specified by the [\\\"NumberToString\\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\\"rgba(r,g,b,a)\\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"to-number\": {\n doc: \"Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\\\"ToNumber Applied to the String Type\\\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"to-boolean\": {\n doc: \"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"to-rgba\": {\n doc: \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n group: \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"to-color\": {\n doc: \"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n group: \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n rgb: {\n doc: \"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.\",\n group: \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n rgba: {\n doc: \"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.\",\n group: \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n get: {\n doc: \"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n has: {\n doc: \"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n length: {\n doc: \"Gets the length of an array or string.\",\n group: \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n properties: {\n doc: \"Gets the feature properties object. Note that in some cases, it may be more efficient to use [\\\"get\\\", \\\"property_name\\\"] directly.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"feature-state\": {\n doc: \"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\\\"feature-state\\\"] can only be used with paint properties that support data-driven styling.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.46.0\"\n }\n }\n },\n \"geometry-type\": {\n doc: \"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n id: {\n doc: \"Gets the feature's id, if it has one.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n zoom: {\n doc: \"Gets the current zoom level. Note that in style layout and paint properties, [\\\"zoom\\\"] may only appear as the input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.\",\n group: \"Zoom\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"heatmap-density\": {\n doc: \"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.\",\n group: \"Heatmap\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"line-progress\": {\n doc: \"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.6.0\",\n macos: \"0.12.0\"\n }\n }\n },\n accumulated: {\n doc: \"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n group: \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.53.0\"\n }\n }\n },\n \"+\": {\n doc: \"Returns the sum of the inputs.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"*\": {\n doc: \"Returns the product of the inputs.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"-\": {\n doc: \"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"/\": {\n doc: \"Returns the result of floating point division of the first input by the second.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"%\": {\n doc: \"Returns the remainder after integer division of the first input by the second.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"^\": {\n doc: \"Returns the result of raising the first input to the power specified by the second.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n sqrt: {\n doc: \"Returns the square root of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.42.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n log10: {\n doc: \"Returns the base-ten logarithm of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n ln: {\n doc: \"Returns the natural logarithm of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n log2: {\n doc: \"Returns the base-two logarithm of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n sin: {\n doc: \"Returns the sine of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n cos: {\n doc: \"Returns the cosine of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n tan: {\n doc: \"Returns the tangent of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n asin: {\n doc: \"Returns the arcsine of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n acos: {\n doc: \"Returns the arccosine of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n atan: {\n doc: \"Returns the arctangent of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n min: {\n doc: \"Returns the minimum value of the inputs.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n max: {\n doc: \"Returns the maximum value of the inputs.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n round: {\n doc: \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n abs: {\n doc: \"Returns the absolute value of the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n ceil: {\n doc: \"Returns the smallest integer that is greater than or equal to the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n floor: {\n doc: \"Returns the largest integer that is less than or equal to the input.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n distance: {\n doc: \"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.\",\n group: \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n android: \"9.2.0\",\n ios: \"5.9.0\",\n macos: \"0.16.0\"\n }\n }\n },\n \"==\": {\n doc: \"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n \"!=\": {\n doc: \"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n \">\": {\n doc: \"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n \"<\": {\n doc: \"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n \">=\": {\n doc: \"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n \"<=\": {\n doc: \"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n collator: {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n },\n all: {\n doc: \"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n any: {\n doc: \"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"!\": {\n doc: \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n within: {\n doc: \"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.\",\n group: \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"1.9.0\",\n android: \"9.1.0\",\n ios: \"5.8.0\",\n macos: \"0.15.0\"\n }\n }\n },\n \"is-supported-script\": {\n doc: \"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).\",\n group: \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.6.0\"\n }\n }\n },\n upcase: {\n doc: \"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n group: \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n downcase: {\n doc: \"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n group: \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n concat: {\n doc: \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n group: \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n }\n },\n \"resolved-locale\": {\n doc: \"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.\",\n group: \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n }\n }\n }\n};\nvar light = {\n anchor: {\n type: \"enum\",\n \"default\": \"viewport\",\n values: {\n map: {\n doc: \"The position of the light source is aligned to the rotation of the map.\"\n },\n viewport: {\n doc: \"The position of the light source is aligned to the rotation of the viewport.\"\n }\n },\n \"property-type\": \"data-constant\",\n transition: false,\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n doc: \"Whether extruded geometries are lit relative to the map or viewport.\",\n example: \"map\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n }\n },\n position: {\n type: \"array\",\n \"default\": [1.15, 210, 30],\n length: 3,\n value: \"number\",\n \"property-type\": \"data-constant\",\n transition: true,\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n doc: \"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).\",\n example: [1.5, 90, 80],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n }\n },\n color: {\n type: \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n transition: true,\n doc: \"Color tint for lighting extruded geometries.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n }\n },\n intensity: {\n type: \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 0.5,\n minimum: 0,\n maximum: 1,\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n transition: true,\n doc: \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n }\n }\n};\nvar paint = [\"paint_fill\", \"paint_line\", \"paint_circle\", \"paint_heatmap\", \"paint_fill-extrusion\", \"paint_symbol\", \"paint_raster\", \"paint_hillshade\", \"paint_background\"];\nvar paint_fill = {\n \"fill-antialias\": {\n type: \"boolean\",\n \"default\": true,\n doc: \"Whether or not the fill should be antialiased.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-opacity\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n doc: \"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.21.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.\",\n transition: true,\n requires: [{\n \"!\": \"fill-pattern\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.19.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-outline-color\": {\n type: \"color\",\n doc: \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n transition: true,\n requires: [{\n \"!\": \"fill-pattern\"\n }, {\n \"fill-antialias\": true\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.19.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The fill is translated relative to the map.\"\n },\n viewport: {\n doc: \"The fill is translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `fill-translate`.\",\n \"default\": \"map\",\n requires: [\"fill-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-pattern\": {\n type: \"resolvedImage\",\n transition: true,\n doc: \"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.49.0\",\n android: \"6.5.0\",\n macos: \"0.11.0\",\n ios: \"4.4.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"cross-faded-data-driven\"\n }\n};\nvar paint_line = {\n \"line-opacity\": {\n type: \"number\",\n doc: \"The opacity at which the line will be drawn.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-color\": {\n type: \"color\",\n doc: \"The color with which the line will be drawn.\",\n \"default\": \"#000000\",\n transition: true,\n requires: [{\n \"!\": \"line-pattern\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.23.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The line is translated relative to the map.\"\n },\n viewport: {\n doc: \"The line is translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `line-translate`.\",\n \"default\": \"map\",\n requires: [\"line-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-width\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Stroke thickness.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.39.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-gap-width\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n doc: \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n transition: true,\n units: \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-offset\": {\n type: \"number\",\n \"default\": 0,\n doc: \"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.\",\n transition: true,\n units: \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.12.1\",\n android: \"3.0.0\",\n ios: \"3.1.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-blur\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Blur applied to the line, in pixels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-dasharray\": {\n type: \"array\",\n value: \"number\",\n doc: \"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n minimum: 0,\n transition: true,\n units: \"line widths\",\n requires: [{\n \"!\": \"line-pattern\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {}\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"cross-faded\"\n },\n \"line-pattern\": {\n type: \"resolvedImage\",\n transition: true,\n doc: \"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.49.0\",\n android: \"6.5.0\",\n macos: \"0.11.0\",\n ios: \"4.4.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"cross-faded-data-driven\"\n },\n \"line-gradient\": {\n type: \"color\",\n doc: \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n transition: false,\n requires: [{\n \"!\": \"line-dasharray\"\n }, {\n \"!\": \"line-pattern\"\n }, {\n source: \"geojson\",\n has: {\n lineMetrics: true\n }\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.45.0\",\n android: \"6.5.0\",\n ios: \"4.4.0\",\n macos: \"0.11.0\"\n },\n \"data-driven styling\": {}\n },\n expression: {\n interpolated: true,\n parameters: [\"line-progress\"]\n },\n \"property-type\": \"color-ramp\"\n }\n};\nvar paint_circle = {\n \"circle-radius\": {\n type: \"number\",\n \"default\": 5,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Circle radius.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.18.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The fill color of the circle.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.18.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-blur\": {\n type: \"number\",\n \"default\": 0,\n doc: \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.20.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-opacity\": {\n type: \"number\",\n doc: \"The opacity at which the circle will be drawn.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.20.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The circle is translated relative to the map.\"\n },\n viewport: {\n doc: \"The circle is translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `circle-translate`.\",\n \"default\": \"map\",\n requires: [\"circle-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-scale\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"Circles are scaled according to their apparent distance to the camera.\"\n },\n viewport: {\n doc: \"Circles are not scaled.\"\n }\n },\n \"default\": \"map\",\n doc: \"Controls the scaling behavior of the circle when the map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.21.0\",\n android: \"4.2.0\",\n ios: \"3.4.0\",\n macos: \"0.2.1\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-alignment\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The circle is aligned to the plane of the map.\"\n },\n viewport: {\n doc: \"The circle is aligned to the plane of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n doc: \"Orientation of circle when map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.39.0\",\n android: \"5.2.0\",\n ios: \"3.7.0\",\n macos: \"0.6.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-stroke-width\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The stroke color of the circle.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-opacity\": {\n type: \"number\",\n doc: \"The opacity of the circle's stroke.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n },\n \"data-driven styling\": {\n js: \"0.29.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n }\n};\nvar paint_heatmap = {\n \"heatmap-radius\": {\n type: \"number\",\n \"default\": 30,\n minimum: 1,\n transition: true,\n units: \"pixels\",\n doc: \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n \"data-driven styling\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-weight\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n transition: false,\n doc: \"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n \"data-driven styling\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-intensity\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n transition: true,\n doc: \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"heatmap-color\": {\n type: \"color\",\n \"default\": [\"interpolate\", [\"linear\"], [\"heatmap-density\"], 0, \"rgba(0, 0, 255, 0)\", 0.1, \"royalblue\", 0.3, \"cyan\", 0.5, \"lime\", 0.7, \"yellow\", 1, \"red\"],\n doc: \"Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `[\\\"heatmap-density\\\"]` as input.\",\n transition: false,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n },\n \"data-driven styling\": {}\n },\n expression: {\n interpolated: true,\n parameters: [\"heatmap-density\"]\n },\n \"property-type\": \"color-ramp\"\n },\n \"heatmap-opacity\": {\n type: \"number\",\n doc: \"The global opacity at which the heatmap layer will be drawn.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.41.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n};\nvar paint_symbol = {\n \"icon-opacity\": {\n doc: \"The opacity at which the icon will be drawn.\",\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n transition: true,\n doc: \"The color of the icon. This can only be used with sdf icons.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-color\": {\n type: \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n transition: true,\n doc: \"The color of the icon's halo. Icon halos can only be used with SDF icons.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-width\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Distance of halo to the icon outline.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-blur\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Fade out the halo towards the outside.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n requires: [\"icon-image\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"Icons are translated relative to the map.\"\n },\n viewport: {\n doc: \"Icons are translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `icon-translate`.\",\n \"default\": \"map\",\n requires: [\"icon-image\", \"icon-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-opacity\": {\n type: \"number\",\n doc: \"The opacity at which the text will be drawn.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-color\": {\n type: \"color\",\n doc: \"The color with which the text will be drawn.\",\n \"default\": \"#000000\",\n transition: true,\n overridable: true,\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-color\": {\n type: \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n transition: true,\n doc: \"The color of the text's halo, which helps it stand out from backgrounds.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-width\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-blur\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n transition: true,\n units: \"pixels\",\n doc: \"The halo's fadeout distance towards the outside.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {\n js: \"0.33.0\",\n android: \"5.0.0\",\n ios: \"3.5.0\",\n macos: \"0.4.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n requires: [\"text-field\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The text is translated relative to the map.\"\n },\n viewport: {\n doc: \"The text is translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `text-translate`.\",\n \"default\": \"map\",\n requires: [\"text-field\", \"text-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n};\nvar paint_raster = {\n \"raster-opacity\": {\n type: \"number\",\n doc: \"The opacity at which the image will be drawn.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-hue-rotate\": {\n type: \"number\",\n \"default\": 0,\n period: 360,\n transition: true,\n units: \"degrees\",\n doc: \"Rotates hues around the color wheel.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-min\": {\n type: \"number\",\n doc: \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n \"default\": 0,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-max\": {\n type: \"number\",\n doc: \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-saturation\": {\n type: \"number\",\n doc: \"Increase or reduce the saturation of the image.\",\n \"default\": 0,\n minimum: -1,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-contrast\": {\n type: \"number\",\n doc: \"Increase or reduce the contrast of the image.\",\n \"default\": 0,\n minimum: -1,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-resampling\": {\n type: \"enum\",\n doc: \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n values: {\n linear: {\n doc: \"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled\"\n },\n nearest: {\n doc: \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n }\n },\n \"default\": \"linear\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.47.0\",\n android: \"6.3.0\",\n ios: \"4.2.0\",\n macos: \"0.9.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-fade-duration\": {\n type: \"number\",\n \"default\": 300,\n minimum: 0,\n transition: false,\n units: \"milliseconds\",\n doc: \"Fade duration when a new tile is added.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n};\nvar paint_hillshade = {\n \"hillshade-illumination-direction\": {\n type: \"number\",\n \"default\": 335,\n minimum: 0,\n maximum: 359,\n doc: \"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.\",\n transition: false,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-illumination-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The hillshade illumination is relative to the north direction.\"\n },\n viewport: {\n doc: \"The hillshade illumination is relative to the top of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n doc: \"Direction of light source when map is rotated.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-exaggeration\": {\n type: \"number\",\n doc: \"Intensity of the hillshade\",\n \"default\": 0.5,\n minimum: 0,\n maximum: 1,\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-shadow-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The shading color of areas that face away from the light source.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-highlight-color\": {\n type: \"color\",\n \"default\": \"#FFFFFF\",\n doc: \"The shading color of areas that faces towards the light source.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-accent-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.43.0\",\n android: \"6.0.0\",\n ios: \"4.0.0\",\n macos: \"0.7.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n};\nvar paint_background = {\n \"background-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The color with which the background will be drawn.\",\n transition: true,\n requires: [{\n \"!\": \"background-pattern\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-pattern\": {\n type: \"resolvedImage\",\n transition: true,\n doc: \"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n },\n \"data-driven styling\": {}\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"cross-faded\"\n },\n \"background-opacity\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n doc: \"The opacity at which the background will be drawn.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.10.0\",\n android: \"2.0.1\",\n ios: \"2.0.0\",\n macos: \"0.1.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n};\nvar transition = {\n duration: {\n type: \"number\",\n \"default\": 300,\n minimum: 0,\n units: \"milliseconds\",\n doc: \"Time allotted for transitions to complete.\"\n },\n delay: {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n units: \"milliseconds\",\n doc: \"Length of time before a transition begins.\"\n }\n};\nvar promoteId = {\n \"*\": {\n type: \"string\",\n doc: \"A name of a feature property to use as ID for feature state.\"\n }\n};\nvar v8 = {\n $version: $version,\n $root: $root,\n sources: sources,\n source: source,\n source_vector: source_vector,\n source_raster: source_raster,\n source_raster_dem: source_raster_dem,\n source_geojson: source_geojson,\n source_video: source_video,\n source_image: source_image,\n layer: layer,\n layout: layout,\n layout_background: layout_background,\n layout_fill: layout_fill,\n layout_circle: layout_circle,\n layout_heatmap: layout_heatmap,\n \"layout_fill-extrusion\": {\n visibility: {\n type: \"enum\",\n values: {\n visible: {\n doc: \"The layer is shown.\"\n },\n none: {\n doc: \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n doc: \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n layout_line: layout_line,\n layout_symbol: layout_symbol,\n layout_raster: layout_raster,\n layout_hillshade: layout_hillshade,\n filter: filter,\n filter_operator: filter_operator,\n geometry_type: geometry_type,\n \"function\": {\n expression: {\n type: \"expression\",\n doc: \"An expression.\"\n },\n stops: {\n type: \"array\",\n doc: \"An array of stops.\",\n value: \"function_stop\"\n },\n base: {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n doc: \"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly.\"\n },\n property: {\n type: \"string\",\n doc: \"The name of a feature property to use as the function input.\",\n \"default\": \"$zoom\"\n },\n type: {\n type: \"enum\",\n values: {\n identity: {\n doc: \"Return the input value as the output value.\"\n },\n exponential: {\n doc: \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n },\n interval: {\n doc: \"Return the output value of the stop just less than the function input.\"\n },\n categorical: {\n doc: \"Return the output value of the stop equal to the function input.\"\n }\n },\n doc: \"The interpolation strategy to use in function evaluation.\",\n \"default\": \"exponential\"\n },\n colorSpace: {\n type: \"enum\",\n values: {\n rgb: {\n doc: \"Use the RGB color space to interpolate color values\"\n },\n lab: {\n doc: \"Use the LAB color space to interpolate color values.\"\n },\n hcl: {\n doc: \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n }\n },\n doc: \"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.\",\n \"default\": \"rgb\"\n },\n \"default\": {\n type: \"*\",\n required: false,\n doc: \"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property's default is used in these circumstances.\"\n }\n },\n function_stop: function_stop,\n expression: expression,\n expression_name: expression_name,\n light: light,\n paint: paint,\n paint_fill: paint_fill,\n \"paint_fill-extrusion\": {\n \"fill-extrusion-opacity\": {\n type: \"number\",\n \"default\": 1,\n minimum: 0,\n maximum: 1,\n doc: \"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-color\": {\n type: \"color\",\n \"default\": \"#000000\",\n doc: \"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.\",\n transition: true,\n requires: [{\n \"!\": \"fill-extrusion-pattern\"\n }],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n },\n \"data-driven styling\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-translate\": {\n type: \"array\",\n value: \"number\",\n length: 2,\n \"default\": [0, 0],\n transition: true,\n units: \"pixels\",\n doc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-translate-anchor\": {\n type: \"enum\",\n values: {\n map: {\n doc: \"The fill extrusion is translated relative to the map.\"\n },\n viewport: {\n doc: \"The fill extrusion is translated relative to the viewport.\"\n }\n },\n doc: \"Controls the frame of reference for `fill-extrusion-translate`.\",\n \"default\": \"map\",\n requires: [\"fill-extrusion-translate\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-pattern\": {\n type: \"resolvedImage\",\n transition: true,\n doc: \"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n },\n \"data-driven styling\": {\n js: \"0.49.0\",\n android: \"6.5.0\",\n macos: \"0.11.0\",\n ios: \"4.4.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\", \"feature\"]\n },\n \"property-type\": \"cross-faded-data-driven\"\n },\n \"fill-extrusion-height\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n units: \"meters\",\n doc: \"The height with which to extrude this layer.\",\n transition: true,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n },\n \"data-driven styling\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-base\": {\n type: \"number\",\n \"default\": 0,\n minimum: 0,\n units: \"meters\",\n doc: \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n transition: true,\n requires: [\"fill-extrusion-height\"],\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n },\n \"data-driven styling\": {\n js: \"0.27.0\",\n android: \"5.1.0\",\n ios: \"3.6.0\",\n macos: \"0.5.0\"\n }\n },\n expression: {\n interpolated: true,\n parameters: [\"zoom\", \"feature\", \"feature-state\"]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-vertical-gradient\": {\n type: \"boolean\",\n \"default\": true,\n doc: \"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.\",\n transition: false,\n \"sdk-support\": {\n \"basic functionality\": {\n js: \"0.50.0\",\n ios: \"4.7.0\",\n macos: \"0.13.0\"\n }\n },\n expression: {\n interpolated: false,\n parameters: [\"zoom\"]\n },\n \"property-type\": \"data-constant\"\n }\n },\n paint_line: paint_line,\n paint_circle: paint_circle,\n paint_heatmap: paint_heatmap,\n paint_symbol: paint_symbol,\n paint_raster: paint_raster,\n paint_hillshade: paint_hillshade,\n paint_background: paint_background,\n transition: transition,\n \"property-type\": {\n \"data-driven\": {\n type: \"property-type\",\n doc: \"Property is interpolable and can be represented using a property expression.\"\n },\n \"cross-faded\": {\n type: \"property-type\",\n doc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n },\n \"cross-faded-data-driven\": {\n type: \"property-type\",\n doc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression.\"\n },\n \"color-ramp\": {\n type: \"property-type\",\n doc: \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n },\n \"data-constant\": {\n type: \"property-type\",\n doc: \"Property is interpolable but cannot be represented using a property expression.\"\n },\n constant: {\n type: \"property-type\",\n doc: \"Property is constant across all zoom levels and property values.\"\n }\n },\n promoteId: promoteId\n};\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nvar jsonStringifyPrettyCompact = function stringify(passedObj, options) {\n var indent, maxLength, replacer;\n\n options = options || {};\n indent = JSON.stringify([1], undefined, options.indent === undefined ? 2 : options.indent).slice(2, -3);\n maxLength = indent === \"\" ? Infinity : options.maxLength === undefined ? 80 : options.maxLength;\n replacer = options.replacer;\n\n return function _stringify(obj, currentIndent, reserved) {\n // prettier-ignore\n var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n if (obj && typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n\n string = JSON.stringify(obj, replacer);\n\n if (string === undefined) {\n return string;\n }\n\n length = maxLength - currentIndent.length - reserved;\n\n if (string.length <= length) {\n prettified = string.replace(stringOrChar, function (match, stringLiteral) {\n return stringLiteral || match + \" \";\n });\n if (prettified.length <= length) {\n return prettified;\n }\n }\n\n if (replacer != null) {\n obj = JSON.parse(string);\n replacer = undefined;\n }\n\n if ((typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj)) === \"object\" && obj !== null) {\n nextIndent = currentIndent + indent;\n items = [];\n index = 0;\n\n if (Array.isArray(obj)) {\n start = \"[\";\n end = \"]\";\n length = obj.length;\n for (; index < length; index++) {\n items.push(_stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) || \"null\");\n }\n } else {\n start = \"{\";\n end = \"}\";\n keys = Object.keys(obj);\n length = keys.length;\n for (; index < length; index++) {\n key = keys[index];\n keyPart = JSON.stringify(key) + \": \";\n value = _stringify(obj[key], nextIndent, keyPart.length + (index === length - 1 ? 0 : 1));\n if (value !== undefined) {\n items.push(keyPart + value);\n }\n }\n }\n\n if (items.length > 0) {\n return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\"\\n\" + currentIndent);\n }\n }\n\n return string;\n }(passedObj, \"\", 0);\n};\n\nfunction sortKeysBy(obj, reference) {\n var result = {};\n for (var key in reference) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n }\n for (var key$1 in obj) {\n if (result[key$1] === undefined) {\n result[key$1] = obj[key$1];\n }\n }\n return result;\n}\nfunction format(style, space) {\n if (space === void 0) space = 2;\n style = sortKeysBy(style, v8.$root);\n if (style.layers) {\n style.layers = style.layers.map(function (layer) {\n return sortKeysBy(layer, v8.layer);\n });\n }\n return jsonStringifyPrettyCompact(style, { indent: space });\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire() {\n throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n return module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar punycode = createCommonjsModule(function (module, exports) {\n (function (root) {\n\n /** Detect free variables */\n var freeExports = exports && !exports.nodeType && exports;\n var freeModule = module && !module.nodeType && module;\n var freeGlobal = (typeof commonjsGlobal === \"undefined\" ? \"undefined\" : _typeof(commonjsGlobal)) == 'object' && commonjsGlobal;\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n root = freeGlobal;\n }\n\n /**\n * The `punycode` object.\n * @name punycode\n * @type Object\n */\n var punycode,\n\n\n /** Highest positive signed 32-bit float value */\n maxInt = 2147483647,\n // aka. 0x7FFFFFFF or 2^31-1\n\n /** Bootstring parameters */\n base = 36,\n tMin = 1,\n tMax = 26,\n skew = 38,\n damp = 700,\n initialBias = 72,\n initialN = 128,\n // 0x80\n delimiter = '-',\n // '\\x2D'\n\n /** Regular expressions */\n regexPunycode = /^xn--/,\n regexNonASCII = /[^\\x20-\\x7E]/,\n // unprintable ASCII chars + non-ASCII chars\n regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n // RFC 3490 separators\n\n /** Error messages */\n errors = {\n 'overflow': 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n },\n\n\n /** Convenience shortcuts */\n baseMinusTMin = base - tMin,\n floor = Math.floor,\n stringFromCharCode = String.fromCharCode,\n\n\n /** Temporary variable */\n key;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\n function error(type) {\n throw RangeError(errors[type]);\n }\n\n /**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\n function map(array, fn) {\n var length = array.length;\n var result = [];\n while (length--) {\n result[length] = fn(array[length]);\n }\n return result;\n }\n\n /**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\n function mapDomain(string, fn) {\n var parts = string.split('@');\n var result = '';\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n string = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n string = string.replace(regexSeparators, '\\x2E');\n var labels = string.split('.');\n var encoded = map(labels, fn).join('.');\n return result + encoded;\n }\n\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n function ucs2decode(string) {\n var output = [],\n counter = 0,\n length = string.length,\n value,\n extra;\n while (counter < length) {\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n\n /**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\n function ucs2encode(array) {\n return map(array, function (value) {\n var output = '';\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n output += stringFromCharCode(value);\n return output;\n }).join('');\n }\n\n /**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\n function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) {\n return codePoint - 22;\n }\n if (codePoint - 65 < 26) {\n return codePoint - 65;\n }\n if (codePoint - 97 < 26) {\n return codePoint - 97;\n }\n return base;\n }\n\n /**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\n function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * http://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\n function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n\n /**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\n function decode(input) {\n // Don't use UCS-2\n var output = [],\n inputLength = input.length,\n out,\n i = 0,\n n = initialN,\n bias = initialBias,\n basic,\n j,\n index,\n oldi,\n w,\n k,\n digit,\n t,\n\n /** Cached calculation results */\n baseMinusT;\n\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n basic = input.lastIndexOf(delimiter);\n if (basic < 0) {\n basic = 0;\n }\n\n for (j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n output.push(input.charCodeAt(j));\n }\n\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n for (index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{\n\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for (oldi = i, w = 1, k = base;; /* no condition */k += base) {\n\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base || digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out;\n\n // Insert `n` at position `i` of the output\n output.splice(i++, 0, n);\n }\n\n return ucs2encode(output);\n }\n\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\n function encode(input) {\n var n,\n delta,\n handledCPCount,\n basicLength,\n bias,\n j,\n m,\n q,\n k,\n t,\n currentValue,\n output = [],\n\n /** `inputLength` will hold the number of code points in `input`. */\n inputLength,\n\n /** Cached calculation results */\n handledCPCountPlusOne,\n baseMinusT,\n qMinusT;\n\n // Convert the input in UCS-2 to Unicode\n input = ucs2decode(input);\n\n // Cache the length\n inputLength = input.length;\n\n // Initialize the state\n n = initialN;\n delta = 0;\n bias = initialBias;\n\n // Handle the basic code points\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n handledCPCount = basicLength = output.length;\n\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n\n // Finish the basic string - if it is not empty - with a delimiter\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for (m = maxInt, j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for (q = delta, k = base;; /* no condition */k += base) {\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) {\n break;\n }\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n }\n\n /**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\n function toUnicode(input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n\n /**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\n function toASCII(input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n }\n\n /*--------------------------------------------------------------------------*/\n\n /** Define the public API */\n punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n 'version': '1.3.2',\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n 'ucs2': {\n 'decode': ucs2decode,\n 'encode': ucs2encode\n },\n 'decode': decode,\n 'encode': encode,\n 'toASCII': toASCII,\n 'toUnicode': toUnicode\n };\n\n /** Expose `punycode` */\n // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n if (freeExports && freeModule) {\n if (module.exports == freeExports) {\n // in Node.js or RingoJS v0.8.0+\n freeModule.exports = punycode;\n } else {\n // in Narwhal or RingoJS v0.7.0-\n for (key in punycode) {\n punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n }\n }\n } else {\n // in Rhino or a web browser\n root.punycode = punycode;\n }\n })(commonjsGlobal);\n});\n\nvar util = {\n isString: function isString(arg) {\n return typeof arg === 'string';\n },\n isObject: function isObject(arg) {\n return (typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg)) === 'object' && arg !== null;\n },\n isNull: function isNull(arg) {\n return arg === null;\n },\n isNullOrUndefined: function isNullOrUndefined(arg) {\n return arg == null;\n }\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar decode = function decode(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr,\n vstr,\n k,\n v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\nvar stringifyPrimitive = function stringifyPrimitive(v) {\n switch (typeof v === \"undefined\" ? \"undefined\" : _typeof(v)) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nvar encode = function encode(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if ((typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj)) === 'object') {\n return Object.keys(obj).map(function (k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function (v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n }\n\n if (!name) {\n return '';\n }\n return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar querystring = createCommonjsModule(function (module, exports) {\n\n exports.decode = exports.parse = decode;\n exports.encode = exports.stringify = encode;\n});\nvar querystring_1 = querystring.decode;\nvar querystring_2 = querystring.parse;\nvar querystring_3 = querystring.encode;\nvar querystring_4 = querystring.stringify;\n\nvar parse = urlParse;\nvar resolve = urlResolve;\nvar resolveObject = urlResolveObject;\nvar format$1 = urlFormat;\n\nvar Url_1 = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n\n// Special case for a simple path URL\nsimplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n\n// RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\ndelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n\n// RFC 2396: characters not allowed for various reasons.\nunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n\n// Allowed by RFCs, but cause of XSS attacks. Always escape these.\nautoEscape = ['\\''].concat(unwise),\n\n// Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nnonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n\n// protocols that can allow \"unsafe\" and \"unwise\" chars.\nunsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n\n// protocols that never have a hostname.\nhostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n\n// protocols that always contain a // bit.\nslashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n};\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) {\n return url;\n }\n\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + (typeof url === \"undefined\" ? \"undefined\" : _typeof(url)));\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) {\n continue;\n }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) {\n continue;\n }\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) {\n this.pathname = rest;\n }\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) {\n obj = urlParse(obj);\n }\n if (!(obj instanceof Url)) {\n return Url.prototype.format.call(obj);\n }\n return obj.format();\n}\n\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && util.isObject(this.query) && Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || query && '?' + query || '';\n\n if (protocol && protocol.substr(-1) !== ':') {\n protocol += ':';\n }\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') {\n hash = '#' + hash;\n }\n if (search && search.charAt(0) !== '?') {\n search = '?' + search;\n }\n\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) {\n return relative;\n }\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function (relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') {\n result[rkey] = relative[rkey];\n }\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift())) {}\n if (!relative.host) {\n relative.host = '';\n }\n if (!relative.hostname) {\n relative.hostname = '';\n }\n if (relPath[0] !== '') {\n relPath.unshift('');\n }\n if (relPath.length < 2) {\n relPath.unshift('');\n }\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') {\n srcPath[0] = result.host;\n } else {\n srcPath.unshift(result.host);\n }\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') {\n relPath[0] = relative.host;\n } else {\n relPath.unshift(relative.host);\n }\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) {\n srcPath = [];\n }\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/';\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || result.host && srcPath.length;\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) {\n this.hostname = host;\n }\n};\n\nvar url = {\n parse: parse,\n resolve: resolve,\n resolveObject: resolveObject,\n format: format$1,\n Url: Url_1\n};\n\nfunction getPropertyReference(propertyName) {\n for (var i = 0; i < v8.layout.length; i++) {\n for (var key in v8[v8.layout[i]]) {\n if (key === propertyName) {\n return v8[v8.layout[i]][key];\n }\n }\n }\n for (var i$1 = 0; i$1 < v8.paint.length; i$1++) {\n for (var key$1 in v8[v8.paint[i$1]]) {\n if (key$1 === propertyName) {\n return v8[v8.paint[i$1]][key$1];\n }\n }\n }\n return null;\n}\nfunction eachSource(style, callback) {\n for (var k in style.sources) {\n callback(style.sources[k]);\n }\n}\nfunction eachLayer(style, callback) {\n for (var i = 0, list = style.layers; i < list.length; i += 1) {\n var layer = list[i];\n callback(layer);\n }\n}\nfunction eachProperty(style, options, callback) {\n function inner(layer, propertyType) {\n var properties = layer[propertyType];\n if (!properties) {\n return;\n }\n Object.keys(properties).forEach(function (key) {\n callback({\n path: [layer.id, propertyType, key],\n key: key,\n value: properties[key],\n reference: getPropertyReference(key),\n set: function set(x) {\n properties[key] = x;\n }\n });\n });\n }\n eachLayer(style, function (layer) {\n if (options.paint) {\n inner(layer, 'paint');\n }\n if (options.layout) {\n inner(layer, 'layout');\n }\n });\n}\n\nfunction eachLayout(layer, callback) {\n for (var k in layer) {\n if (k.indexOf('layout') === 0) {\n callback(layer[k], k);\n }\n }\n}\nfunction eachPaint(layer, callback) {\n for (var k in layer) {\n if (k.indexOf('paint') === 0) {\n callback(layer[k], k);\n }\n }\n}\nfunction resolveConstant(style, value) {\n if (typeof value === 'string' && value[0] === '@') {\n return resolveConstant(style, style.constants[value]);\n } else {\n return value;\n }\n}\nfunction isFunction(value) {\n return Array.isArray(value.stops);\n}\nfunction renameProperty(obj, from, to) {\n obj[to] = obj[from];\n delete obj[from];\n}\nfunction migrateToV8(style) {\n style.version = 8;\n eachSource(style, function (source) {\n if (source.type === 'video' && source.url !== undefined) {\n renameProperty(source, 'url', 'urls');\n }\n if (source.type === 'video') {\n source.coordinates.forEach(function (coord) {\n return coord.reverse();\n });\n }\n });\n eachLayer(style, function (layer) {\n eachLayout(layer, function (layout) {\n if (layout['symbol-min-distance'] !== undefined) {\n renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n }\n });\n eachPaint(layer, function (paint) {\n if (paint['background-image'] !== undefined) {\n renameProperty(paint, 'background-image', 'background-pattern');\n }\n if (paint['line-image'] !== undefined) {\n renameProperty(paint, 'line-image', 'line-pattern');\n }\n if (paint['fill-image'] !== undefined) {\n renameProperty(paint, 'fill-image', 'fill-pattern');\n }\n });\n });\n eachProperty(style, {\n paint: true,\n layout: true\n }, function (property) {\n var value = resolveConstant(style, property.value);\n if (isFunction(value)) {\n value.stops.forEach(function (stop) {\n stop[1] = resolveConstant(style, stop[1]);\n });\n }\n property.set(value);\n });\n delete style.constants;\n eachLayer(style, function (layer) {\n eachLayout(layer, function (layout) {\n delete layout['text-max-size'];\n delete layout['icon-max-size'];\n });\n eachPaint(layer, function (paint) {\n if (paint['text-size']) {\n if (!layer.layout) {\n layer.layout = {};\n }\n layer.layout['text-size'] = paint['text-size'];\n delete paint['text-size'];\n }\n if (paint['icon-size']) {\n if (!layer.layout) {\n layer.layout = {};\n }\n layer.layout['icon-size'] = paint['icon-size'];\n delete paint['icon-size'];\n }\n });\n });\n function migrateFontstackURL(input) {\n var inputParsed = url.parse(input);\n var inputPathnameParts = inputParsed.pathname.split('/');\n if (inputParsed.protocol !== 'mapbox:') {\n return input;\n } else if (inputParsed.hostname === 'fontstack') {\n return 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf';\n } else if (inputParsed.hostname === 'fonts') {\n return 'mapbox://fonts/' + inputPathnameParts[2] + '/{fontstack}/{range}.pbf';\n }\n }\n if (style.glyphs) {\n style.glyphs = migrateFontstackURL(style.glyphs);\n }\n function migrateFontStack(font) {\n function splitAndTrim(string) {\n return string.split(',').map(function (s) {\n return s.trim();\n });\n }\n if (Array.isArray(font)) {\n return font;\n } else if (typeof font === 'string') {\n return splitAndTrim(font);\n } else if ((typeof font === \"undefined\" ? \"undefined\" : _typeof(font)) === 'object') {\n font.stops.forEach(function (stop) {\n stop[1] = splitAndTrim(stop[1]);\n });\n return font;\n } else {\n throw new Error('unexpected font value');\n }\n }\n eachLayer(style, function (layer) {\n eachLayout(layer, function (layout) {\n if (layout['text-font']) {\n layout['text-font'] = migrateFontStack(layout['text-font']);\n }\n });\n });\n var firstSymbolLayer = 0;\n for (var i = style.layers.length - 1; i >= 0; i--) {\n var layer = style.layers[i];\n if (layer.type !== 'symbol') {\n firstSymbolLayer = i + 1;\n break;\n }\n }\n var symbolLayers = style.layers.splice(firstSymbolLayer);\n symbolLayers.reverse();\n style.layers = style.layers.concat(symbolLayers);\n return style;\n}\n\nfunction extend(output) {\n var inputs = [],\n len = arguments.length - 1;\n while (len-- > 0) {\n inputs[len] = arguments[len + 1];\n }for (var i = 0, list = inputs; i < list.length; i += 1) {\n var input = list[i];\n for (var k in input) {\n output[k] = input[k];\n }\n }\n return output;\n}\n\nvar ParsingError = function (Error) {\n function ParsingError(key, message) {\n Error.call(this, message);\n this.message = message;\n this.key = key;\n }\n if (Error) ParsingError.__proto__ = Error;\n ParsingError.prototype = Object.create(Error && Error.prototype);\n ParsingError.prototype.constructor = ParsingError;\n return ParsingError;\n}(Error);\n\nvar Scope = function Scope(parent, bindings) {\n if (bindings === void 0) bindings = [];\n this.parent = parent;\n this.bindings = {};\n for (var i = 0, list = bindings; i < list.length; i += 1) {\n var ref = list[i];\n var name = ref[0];\n var expression = ref[1];\n this.bindings[name] = expression;\n }\n};\nScope.prototype.concat = function concat(bindings) {\n return new Scope(this, bindings);\n};\nScope.prototype.get = function get(name) {\n if (this.bindings[name]) {\n return this.bindings[name];\n }\n if (this.parent) {\n return this.parent.get(name);\n }\n throw new Error(name + ' not found in scope.');\n};\nScope.prototype.has = function has(name) {\n if (this.bindings[name]) {\n return true;\n }\n return this.parent ? this.parent.has(name) : false;\n};\n\nvar NullType = { kind: 'null' };\nvar NumberType = { kind: 'number' };\nvar StringType = { kind: 'string' };\nvar BooleanType = { kind: 'boolean' };\nvar ColorType = { kind: 'color' };\nvar ObjectType = { kind: 'object' };\nvar ValueType = { kind: 'value' };\nvar ErrorType = { kind: 'error' };\nvar CollatorType = { kind: 'collator' };\nvar FormattedType = { kind: 'formatted' };\nvar ResolvedImageType = { kind: 'resolvedImage' };\nfunction array(itemType, N) {\n return {\n kind: 'array',\n itemType: itemType,\n N: N\n };\n}\nfunction toString(type) {\n if (type.kind === 'array') {\n var itemType = toString(type.itemType);\n return typeof type.N === 'number' ? 'array<' + itemType + ', ' + type.N + '>' : type.itemType.kind === 'value' ? 'array' : 'array<' + itemType + '>';\n } else {\n return type.kind;\n }\n}\nvar valueMemberTypes = [NullType, NumberType, StringType, BooleanType, ColorType, FormattedType, ObjectType, array(ValueType), ResolvedImageType];\nfunction checkSubtype(expected, t) {\n if (t.kind === 'error') {\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.N)) {\n return null;\n }\n } else if (expected.kind === t.kind) {\n return null;\n } else if (expected.kind === 'value') {\n for (var i = 0, list = valueMemberTypes; i < list.length; i += 1) {\n var memberType = list[i];\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n return 'Expected ' + toString(expected) + ' but found ' + toString(t) + ' instead.';\n}\nfunction isValidType(provided, allowedTypes) {\n return allowedTypes.some(function (t) {\n return t.kind === provided.kind;\n });\n}\nfunction isValidNativeType(provided, allowedTypes) {\n return allowedTypes.some(function (t) {\n if (t === 'null') {\n return provided === null;\n } else if (t === 'array') {\n return Array.isArray(provided);\n } else if (t === 'object') {\n return provided && !Array.isArray(provided) && (typeof provided === \"undefined\" ? \"undefined\" : _typeof(provided)) === 'object';\n } else {\n return t === (typeof provided === \"undefined\" ? \"undefined\" : _typeof(provided));\n }\n });\n}\n\nvar csscolorparser = createCommonjsModule(function (module, exports) {\n // (c) Dean McNamee , 2012.\n //\n // https://github.com/deanm/css-color-parser-js\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n\n // http://www.w3.org/TR/css3-color/\n var kCSSColorTable = {\n \"transparent\": [0, 0, 0, 0], \"aliceblue\": [240, 248, 255, 1],\n \"antiquewhite\": [250, 235, 215, 1], \"aqua\": [0, 255, 255, 1],\n \"aquamarine\": [127, 255, 212, 1], \"azure\": [240, 255, 255, 1],\n \"beige\": [245, 245, 220, 1], \"bisque\": [255, 228, 196, 1],\n \"black\": [0, 0, 0, 1], \"blanchedalmond\": [255, 235, 205, 1],\n \"blue\": [0, 0, 255, 1], \"blueviolet\": [138, 43, 226, 1],\n \"brown\": [165, 42, 42, 1], \"burlywood\": [222, 184, 135, 1],\n \"cadetblue\": [95, 158, 160, 1], \"chartreuse\": [127, 255, 0, 1],\n \"chocolate\": [210, 105, 30, 1], \"coral\": [255, 127, 80, 1],\n \"cornflowerblue\": [100, 149, 237, 1], \"cornsilk\": [255, 248, 220, 1],\n \"crimson\": [220, 20, 60, 1], \"cyan\": [0, 255, 255, 1],\n \"darkblue\": [0, 0, 139, 1], \"darkcyan\": [0, 139, 139, 1],\n \"darkgoldenrod\": [184, 134, 11, 1], \"darkgray\": [169, 169, 169, 1],\n \"darkgreen\": [0, 100, 0, 1], \"darkgrey\": [169, 169, 169, 1],\n \"darkkhaki\": [189, 183, 107, 1], \"darkmagenta\": [139, 0, 139, 1],\n \"darkolivegreen\": [85, 107, 47, 1], \"darkorange\": [255, 140, 0, 1],\n \"darkorchid\": [153, 50, 204, 1], \"darkred\": [139, 0, 0, 1],\n \"darksalmon\": [233, 150, 122, 1], \"darkseagreen\": [143, 188, 143, 1],\n \"darkslateblue\": [72, 61, 139, 1], \"darkslategray\": [47, 79, 79, 1],\n \"darkslategrey\": [47, 79, 79, 1], \"darkturquoise\": [0, 206, 209, 1],\n \"darkviolet\": [148, 0, 211, 1], \"deeppink\": [255, 20, 147, 1],\n \"deepskyblue\": [0, 191, 255, 1], \"dimgray\": [105, 105, 105, 1],\n \"dimgrey\": [105, 105, 105, 1], \"dodgerblue\": [30, 144, 255, 1],\n \"firebrick\": [178, 34, 34, 1], \"floralwhite\": [255, 250, 240, 1],\n \"forestgreen\": [34, 139, 34, 1], \"fuchsia\": [255, 0, 255, 1],\n \"gainsboro\": [220, 220, 220, 1], \"ghostwhite\": [248, 248, 255, 1],\n \"gold\": [255, 215, 0, 1], \"goldenrod\": [218, 165, 32, 1],\n \"gray\": [128, 128, 128, 1], \"green\": [0, 128, 0, 1],\n \"greenyellow\": [173, 255, 47, 1], \"grey\": [128, 128, 128, 1],\n \"honeydew\": [240, 255, 240, 1], \"hotpink\": [255, 105, 180, 1],\n \"indianred\": [205, 92, 92, 1], \"indigo\": [75, 0, 130, 1],\n \"ivory\": [255, 255, 240, 1], \"khaki\": [240, 230, 140, 1],\n \"lavender\": [230, 230, 250, 1], \"lavenderblush\": [255, 240, 245, 1],\n \"lawngreen\": [124, 252, 0, 1], \"lemonchiffon\": [255, 250, 205, 1],\n \"lightblue\": [173, 216, 230, 1], \"lightcoral\": [240, 128, 128, 1],\n \"lightcyan\": [224, 255, 255, 1], \"lightgoldenrodyellow\": [250, 250, 210, 1],\n \"lightgray\": [211, 211, 211, 1], \"lightgreen\": [144, 238, 144, 1],\n \"lightgrey\": [211, 211, 211, 1], \"lightpink\": [255, 182, 193, 1],\n \"lightsalmon\": [255, 160, 122, 1], \"lightseagreen\": [32, 178, 170, 1],\n \"lightskyblue\": [135, 206, 250, 1], \"lightslategray\": [119, 136, 153, 1],\n \"lightslategrey\": [119, 136, 153, 1], \"lightsteelblue\": [176, 196, 222, 1],\n \"lightyellow\": [255, 255, 224, 1], \"lime\": [0, 255, 0, 1],\n \"limegreen\": [50, 205, 50, 1], \"linen\": [250, 240, 230, 1],\n \"magenta\": [255, 0, 255, 1], \"maroon\": [128, 0, 0, 1],\n \"mediumaquamarine\": [102, 205, 170, 1], \"mediumblue\": [0, 0, 205, 1],\n \"mediumorchid\": [186, 85, 211, 1], \"mediumpurple\": [147, 112, 219, 1],\n \"mediumseagreen\": [60, 179, 113, 1], \"mediumslateblue\": [123, 104, 238, 1],\n \"mediumspringgreen\": [0, 250, 154, 1], \"mediumturquoise\": [72, 209, 204, 1],\n \"mediumvioletred\": [199, 21, 133, 1], \"midnightblue\": [25, 25, 112, 1],\n \"mintcream\": [245, 255, 250, 1], \"mistyrose\": [255, 228, 225, 1],\n \"moccasin\": [255, 228, 181, 1], \"navajowhite\": [255, 222, 173, 1],\n \"navy\": [0, 0, 128, 1], \"oldlace\": [253, 245, 230, 1],\n \"olive\": [128, 128, 0, 1], \"olivedrab\": [107, 142, 35, 1],\n \"orange\": [255, 165, 0, 1], \"orangered\": [255, 69, 0, 1],\n \"orchid\": [218, 112, 214, 1], \"palegoldenrod\": [238, 232, 170, 1],\n \"palegreen\": [152, 251, 152, 1], \"paleturquoise\": [175, 238, 238, 1],\n \"palevioletred\": [219, 112, 147, 1], \"papayawhip\": [255, 239, 213, 1],\n \"peachpuff\": [255, 218, 185, 1], \"peru\": [205, 133, 63, 1],\n \"pink\": [255, 192, 203, 1], \"plum\": [221, 160, 221, 1],\n \"powderblue\": [176, 224, 230, 1], \"purple\": [128, 0, 128, 1],\n \"rebeccapurple\": [102, 51, 153, 1],\n \"red\": [255, 0, 0, 1], \"rosybrown\": [188, 143, 143, 1],\n \"royalblue\": [65, 105, 225, 1], \"saddlebrown\": [139, 69, 19, 1],\n \"salmon\": [250, 128, 114, 1], \"sandybrown\": [244, 164, 96, 1],\n \"seagreen\": [46, 139, 87, 1], \"seashell\": [255, 245, 238, 1],\n \"sienna\": [160, 82, 45, 1], \"silver\": [192, 192, 192, 1],\n \"skyblue\": [135, 206, 235, 1], \"slateblue\": [106, 90, 205, 1],\n \"slategray\": [112, 128, 144, 1], \"slategrey\": [112, 128, 144, 1],\n \"snow\": [255, 250, 250, 1], \"springgreen\": [0, 255, 127, 1],\n \"steelblue\": [70, 130, 180, 1], \"tan\": [210, 180, 140, 1],\n \"teal\": [0, 128, 128, 1], \"thistle\": [216, 191, 216, 1],\n \"tomato\": [255, 99, 71, 1], \"turquoise\": [64, 224, 208, 1],\n \"violet\": [238, 130, 238, 1], \"wheat\": [245, 222, 179, 1],\n \"white\": [255, 255, 255, 1], \"whitesmoke\": [245, 245, 245, 1],\n \"yellow\": [255, 255, 0, 1], \"yellowgreen\": [154, 205, 50, 1] };\n\n function clamp_css_byte(i) {\n // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n }\n\n function clamp_css_float(f) {\n // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n }\n\n function parse_css_int(str) {\n // int or percentage.\n if (str[str.length - 1] === '%') {\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n }\n return clamp_css_byte(parseInt(str));\n }\n\n function parse_css_float(str) {\n // float or percentage.\n if (str[str.length - 1] === '%') {\n return clamp_css_float(parseFloat(str) / 100);\n }\n return clamp_css_float(parseFloat(str));\n }\n\n function css_hue_to_rgb(m1, m2, h) {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n }\n\n function parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) {\n return kCSSColorTable[str].slice();\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xf00) >> 4 | (iv & 0xf00) >> 8, iv & 0xf0 | (iv & 0xf0) >> 4, iv & 0xf | (iv & 0xf) << 4, 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('),\n ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) {\n return null;\n }\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) {\n return null;\n }\n return [parse_css_int(params[0]), parse_css_int(params[1]), parse_css_int(params[2]), alpha];\n case 'hsla':\n if (params.length !== 4) {\n return null;\n }\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) {\n return null;\n }\n var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h + 1 / 3) * 255), clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255), clamp_css_byte(css_hue_to_rgb(m1, m2, h - 1 / 3) * 255), alpha];\n default:\n return null;\n }\n }\n\n return null;\n }\n\n try {\n exports.parseCSSColor = parseCSSColor;\n } catch (e) {}\n});\nvar csscolorparser_1 = csscolorparser.parseCSSColor;\n\nvar Color = function Color(r, g, b, a) {\n if (a === void 0) a = 1;\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n};\nColor.parse = function parse(input) {\n if (!input) {\n return undefined;\n }\n if (input instanceof Color) {\n return input;\n }\n if (typeof input !== 'string') {\n return undefined;\n }\n var rgba = csscolorparser_1(input);\n if (!rgba) {\n return undefined;\n }\n return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]);\n};\nColor.prototype.toString = function toString() {\n var ref = this.toArray();\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var a = ref[3];\n return 'rgba(' + Math.round(r) + ',' + Math.round(g) + ',' + Math.round(b) + ',' + a + ')';\n};\nColor.prototype.toArray = function toArray() {\n var ref = this;\n var r = ref.r;\n var g = ref.g;\n var b = ref.b;\n var a = ref.a;\n return a === 0 ? [0, 0, 0, 0] : [r * 255 / a, g * 255 / a, b * 255 / a, a];\n};\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\n\nvar Collator = function Collator(caseSensitive, diacriticSensitive, locale) {\n if (caseSensitive) {\n this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n } else {\n this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n }\n this.locale = locale;\n this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n sensitivity: this.sensitivity,\n usage: 'search'\n });\n};\nCollator.prototype.compare = function compare(lhs, rhs) {\n return this.collator.compare(lhs, rhs);\n};\nCollator.prototype.resolvedLocale = function resolvedLocale() {\n return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n};\n\nvar FormattedSection = function FormattedSection(text, image, scale, fontStack, textColor) {\n this.text = text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n};\nvar Formatted = function Formatted(sections) {\n this.sections = sections;\n};\nFormatted.fromString = function fromString(unformatted) {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n};\nFormatted.prototype.isEmpty = function isEmpty() {\n if (this.sections.length === 0) {\n return true;\n }\n return !this.sections.some(function (section) {\n return section.text.length !== 0 || section.image && section.image.name.length !== 0;\n });\n};\nFormatted.factory = function factory(text) {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n};\nFormatted.prototype.toString = function toString() {\n if (this.sections.length === 0) {\n return '';\n }\n return this.sections.map(function (section) {\n return section.text;\n }).join('');\n};\nFormatted.prototype.serialize = function serialize() {\n var serialized = ['format'];\n for (var i = 0, list = this.sections; i < list.length; i += 1) {\n var section = list[i];\n if (section.image) {\n serialized.push(['image', section.image.name]);\n continue;\n }\n serialized.push(section.text);\n var options = {};\n if (section.fontStack) {\n options['text-font'] = ['literal', section.fontStack.split(',')];\n }\n if (section.scale) {\n options['font-scale'] = section.scale;\n }\n if (section.textColor) {\n options['text-color'] = ['rgba'].concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n};\n\nvar ResolvedImage = function ResolvedImage(options) {\n this.name = options.name;\n this.available = options.available;\n};\nResolvedImage.prototype.toString = function toString() {\n return this.name;\n};\nResolvedImage.fromString = function fromString(name) {\n if (!name) {\n return null;\n }\n return new ResolvedImage({\n name: name,\n available: false\n });\n};\nResolvedImage.prototype.serialize = function serialize() {\n return ['image', this.name];\n};\n\nfunction validateRGBA(r, g, b, a) {\n if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) {\n var value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return 'Invalid rgba value [' + value.join(', ') + ']: \\'r\\', \\'g\\', and \\'b\\' must be between 0 and 255.';\n }\n if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) {\n return 'Invalid rgba value [' + [r, g, b, a].join(', ') + ']: \\'a\\' must be between 0 and 1.';\n }\n return null;\n}\nfunction isValue(mixed) {\n if (mixed === null) {\n return true;\n } else if (typeof mixed === 'string') {\n return true;\n } else if (typeof mixed === 'boolean') {\n return true;\n } else if (typeof mixed === 'number') {\n return true;\n } else if (mixed instanceof Color) {\n return true;\n } else if (mixed instanceof Collator) {\n return true;\n } else if (mixed instanceof Formatted) {\n return true;\n } else if (mixed instanceof ResolvedImage) {\n return true;\n } else if (Array.isArray(mixed)) {\n for (var i = 0, list = mixed; i < list.length; i += 1) {\n var item = list[i];\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if ((typeof mixed === \"undefined\" ? \"undefined\" : _typeof(mixed)) === 'object') {\n for (var key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\nfunction typeOf(value) {\n if (value === null) {\n return NullType;\n } else if (typeof value === 'string') {\n return StringType;\n } else if (typeof value === 'boolean') {\n return BooleanType;\n } else if (typeof value === 'number') {\n return NumberType;\n } else if (value instanceof Color) {\n return ColorType;\n } else if (value instanceof Collator) {\n return CollatorType;\n } else if (value instanceof Formatted) {\n return FormattedType;\n } else if (value instanceof ResolvedImage) {\n return ResolvedImageType;\n } else if (Array.isArray(value)) {\n var length = value.length;\n var itemType;\n for (var i = 0, list = value; i < list.length; i += 1) {\n var item = list[i];\n var t = typeOf(item);\n if (!itemType) {\n itemType = t;\n } else if (itemType === t) {\n continue;\n } else {\n itemType = ValueType;\n break;\n }\n }\n return array(itemType || ValueType, length);\n } else {\n return ObjectType;\n }\n}\nfunction toString$1(value) {\n var type = typeof value === \"undefined\" ? \"undefined\" : _typeof(value);\n if (value === null) {\n return '';\n } else if (type === 'string' || type === 'number' || type === 'boolean') {\n return String(value);\n } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n return value.toString();\n } else {\n return JSON.stringify(value);\n }\n}\n\nvar Literal = function Literal(type, value) {\n this.type = type;\n this.value = value;\n};\nLiteral.parse = function parse(args, context) {\n if (args.length !== 2) {\n return context.error('\\'literal\\' expression requires exactly one argument, but found ' + (args.length - 1) + ' instead.');\n }\n if (!isValue(args[1])) {\n return context.error('invalid value');\n }\n var value = args[1];\n var type = typeOf(value);\n var expected = context.expectedType;\n if (type.kind === 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) {\n type = expected;\n }\n return new Literal(type, value);\n};\nLiteral.prototype.evaluate = function evaluate() {\n return this.value;\n};\nLiteral.prototype.eachChild = function eachChild() {};\nLiteral.prototype.outputDefined = function outputDefined() {\n return true;\n};\nLiteral.prototype.serialize = function serialize() {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return ['literal', this.value];\n } else if (this.value instanceof Color) {\n return ['rgba'].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n return this.value.serialize();\n } else {\n return this.value;\n }\n};\n\nvar RuntimeError = function RuntimeError(message) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n};\nRuntimeError.prototype.toJSON = function toJSON() {\n return this.message;\n};\n\nvar types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\nvar Assertion = function Assertion(type, args) {\n this.type = type;\n this.args = args;\n};\nAssertion.parse = function parse(args, context) {\n if (args.length < 2) {\n return context.error('Expected at least one argument.');\n }\n var i = 1;\n var type;\n var name = args[0];\n if (name === 'array') {\n var itemType;\n if (args.length > 2) {\n var type$1 = args[1];\n if (typeof type$1 !== 'string' || !(type$1 in types) || type$1 === 'object') {\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n }\n itemType = types[type$1];\n i++;\n } else {\n itemType = ValueType;\n }\n var N;\n if (args.length > 3) {\n if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) {\n return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n }\n N = args[2];\n i++;\n }\n type = array(itemType, N);\n } else {\n type = types[name];\n }\n var parsed = [];\n for (; i < args.length; i++) {\n var input = context.parse(args[i], i, ValueType);\n if (!input) {\n return null;\n }\n parsed.push(input);\n }\n return new Assertion(type, parsed);\n};\nAssertion.prototype.evaluate = function evaluate(ctx) {\n for (var i = 0; i < this.args.length; i++) {\n var value = this.args[i].evaluate(ctx);\n var error = checkSubtype(this.type, typeOf(value));\n if (!error) {\n return value;\n } else if (i === this.args.length - 1) {\n throw new RuntimeError('Expected value to be of type ' + toString(this.type) + ', but found ' + toString(typeOf(value)) + ' instead.');\n }\n }\n return null;\n};\nAssertion.prototype.eachChild = function eachChild(fn) {\n this.args.forEach(fn);\n};\nAssertion.prototype.outputDefined = function outputDefined() {\n return this.args.every(function (arg) {\n return arg.outputDefined();\n });\n};\nAssertion.prototype.serialize = function serialize() {\n var type = this.type;\n var serialized = [type.kind];\n if (type.kind === 'array') {\n var itemType = type.itemType;\n if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n var N = type.N;\n if (typeof N === 'number' || this.args.length > 1) {\n serialized.push(N);\n }\n }\n }\n return serialized.concat(this.args.map(function (arg) {\n return arg.serialize();\n }));\n};\n\nvar FormatExpression = function FormatExpression(sections) {\n this.type = FormattedType;\n this.sections = sections;\n};\nFormatExpression.parse = function parse(args, context) {\n if (args.length < 2) {\n return context.error('Expected at least one argument.');\n }\n var firstArg = args[1];\n if (!Array.isArray(firstArg) && (typeof firstArg === \"undefined\" ? \"undefined\" : _typeof(firstArg)) === 'object') {\n return context.error('First argument must be an image or text section.');\n }\n var sections = [];\n var nextTokenMayBeObject = false;\n for (var i = 1; i <= args.length - 1; ++i) {\n var arg = args[i];\n if (nextTokenMayBeObject && (typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg)) === 'object' && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n var scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) {\n return null;\n }\n }\n var font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) {\n return null;\n }\n }\n var textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) {\n return null;\n }\n }\n var lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n var content = context.parse(args[i], 1, ValueType);\n if (!content) {\n return null;\n }\n var kind = content.type.kind;\n if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage') {\n return context.error('Formatted text type must be \\'string\\', \\'value\\', \\'image\\' or \\'null\\'.');\n }\n nextTokenMayBeObject = true;\n sections.push({\n content: content,\n scale: null,\n font: null,\n textColor: null\n });\n }\n }\n return new FormatExpression(sections);\n};\nFormatExpression.prototype.evaluate = function evaluate(ctx) {\n var evaluateSection = function evaluateSection(section) {\n var evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n return new FormattedSection(toString$1(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null);\n };\n return new Formatted(this.sections.map(evaluateSection));\n};\nFormatExpression.prototype.eachChild = function eachChild(fn) {\n for (var i = 0, list = this.sections; i < list.length; i += 1) {\n var section = list[i];\n fn(section.content);\n if (section.scale) {\n fn(section.scale);\n }\n if (section.font) {\n fn(section.font);\n }\n if (section.textColor) {\n fn(section.textColor);\n }\n }\n};\nFormatExpression.prototype.outputDefined = function outputDefined() {\n return false;\n};\nFormatExpression.prototype.serialize = function serialize() {\n var serialized = ['format'];\n for (var i = 0, list = this.sections; i < list.length; i += 1) {\n var section = list[i];\n serialized.push(section.content.serialize());\n var options = {};\n if (section.scale) {\n options['font-scale'] = section.scale.serialize();\n }\n if (section.font) {\n options['text-font'] = section.font.serialize();\n }\n if (section.textColor) {\n options['text-color'] = section.textColor.serialize();\n }\n serialized.push(options);\n }\n return serialized;\n};\n\nvar ImageExpression = function ImageExpression(input) {\n this.type = ResolvedImageType;\n this.input = input;\n};\nImageExpression.parse = function parse(args, context) {\n if (args.length !== 2) {\n return context.error('Expected two arguments.');\n }\n var name = context.parse(args[1], 1, StringType);\n if (!name) {\n return context.error('No image name provided.');\n }\n return new ImageExpression(name);\n};\nImageExpression.prototype.evaluate = function evaluate(ctx) {\n var evaluatedImageName = this.input.evaluate(ctx);\n var value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) {\n value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n }\n return value;\n};\nImageExpression.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n};\nImageExpression.prototype.outputDefined = function outputDefined() {\n return false;\n};\nImageExpression.prototype.serialize = function serialize() {\n return ['image', this.input.serialize()];\n};\n\nvar types$1 = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\nvar Coercion = function Coercion(type, args) {\n this.type = type;\n this.args = args;\n};\nCoercion.parse = function parse(args, context) {\n if (args.length < 2) {\n return context.error('Expected at least one argument.');\n }\n var name = args[0];\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2) {\n return context.error('Expected one argument.');\n }\n var type = types$1[name];\n var parsed = [];\n for (var i = 1; i < args.length; i++) {\n var input = context.parse(args[i], i, ValueType);\n if (!input) {\n return null;\n }\n parsed.push(input);\n }\n return new Coercion(type, parsed);\n};\nCoercion.prototype.evaluate = function evaluate(ctx) {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n var input;\n var error;\n for (var i = 0, list = this.args; i < list.length; i += 1) {\n var arg = list[i];\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n var c = ctx.parseColor(input);\n if (c) {\n return c;\n }\n } else if (Array.isArray(input)) {\n if (input.length < 3 || input.length > 4) {\n error = 'Invalid rbga value ' + JSON.stringify(input) + ': expected an array containing either three or four numeric values.';\n } else {\n error = validateRGBA(input[0], input[1], input[2], input[3]);\n }\n if (!error) {\n return new Color(input[0] / 255, input[1] / 255, input[2] / 255, input[3]);\n }\n }\n }\n throw new RuntimeError(error || 'Could not parse color from value \\'' + (typeof input === 'string' ? input : String(JSON.stringify(input))) + '\\'');\n } else if (this.type.kind === 'number') {\n var value = null;\n for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) {\n var arg$1 = list$1[i$1];\n value = arg$1.evaluate(ctx);\n if (value === null) {\n return 0;\n }\n var num = Number(value);\n if (isNaN(num)) {\n continue;\n }\n return num;\n }\n throw new RuntimeError('Could not convert ' + JSON.stringify(value) + ' to number.');\n } else if (this.type.kind === 'formatted') {\n return Formatted.fromString(toString$1(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(toString$1(this.args[0].evaluate(ctx)));\n } else {\n return toString$1(this.args[0].evaluate(ctx));\n }\n};\nCoercion.prototype.eachChild = function eachChild(fn) {\n this.args.forEach(fn);\n};\nCoercion.prototype.outputDefined = function outputDefined() {\n return this.args.every(function (arg) {\n return arg.outputDefined();\n });\n};\nCoercion.prototype.serialize = function serialize() {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{\n content: this.args[0],\n scale: null,\n font: null,\n textColor: null\n }]).serialize();\n }\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n var serialized = ['to-' + this.type.kind];\n this.eachChild(function (child) {\n serialized.push(child.serialize());\n });\n return serialized;\n};\n\nvar geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\nvar EvaluationContext = function EvaluationContext() {\n this.globals = null;\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n};\nEvaluationContext.prototype.id = function id() {\n return this.feature && 'id' in this.feature ? this.feature.id : null;\n};\nEvaluationContext.prototype.geometryType = function geometryType() {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n};\nEvaluationContext.prototype.geometry = function geometry() {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n};\nEvaluationContext.prototype.canonicalID = function canonicalID() {\n return this.canonical;\n};\nEvaluationContext.prototype.properties = function properties() {\n return this.feature && this.feature.properties || {};\n};\nEvaluationContext.prototype.parseColor = function parseColor(input) {\n var cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n};\n\nvar CompoundExpression = function CompoundExpression(name, type, evaluate, args) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n};\nCompoundExpression.prototype.evaluate = function evaluate(ctx) {\n return this._evaluate(ctx, this.args);\n};\nCompoundExpression.prototype.eachChild = function eachChild(fn) {\n this.args.forEach(fn);\n};\nCompoundExpression.prototype.outputDefined = function outputDefined() {\n return false;\n};\nCompoundExpression.prototype.serialize = function serialize() {\n return [this.name].concat(this.args.map(function (arg) {\n return arg.serialize();\n }));\n};\nCompoundExpression.parse = function parse(args, context) {\n var ref$1;\n var op = args[0];\n var definition = CompoundExpression.definitions[op];\n if (!definition) {\n return context.error('Unknown expression \"' + op + '\". If you wanted a literal array, use [\"literal\", [...]].', 0);\n }\n var type = Array.isArray(definition) ? definition[0] : definition.type;\n var availableOverloads = Array.isArray(definition) ? [[definition[1], definition[2]]] : definition.overloads;\n var overloads = availableOverloads.filter(function (ref) {\n var signature = ref[0];\n return !Array.isArray(signature) || signature.length === args.length - 1;\n });\n var signatureContext = null;\n for (var i$3 = 0, list = overloads; i$3 < list.length; i$3 += 1) {\n var ref = list[i$3];\n var params = ref[0];\n var evaluate = ref[1];\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n var parsedArgs = [];\n var argParseFailed = false;\n for (var i = 1; i < args.length; i++) {\n var arg = args[i];\n var expectedType = Array.isArray(params) ? params[i - 1] : params.type;\n var parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n if (!parsed) {\n argParseFailed = true;\n break;\n }\n parsedArgs.push(parsed);\n }\n if (argParseFailed) {\n continue;\n }\n if (Array.isArray(params)) {\n if (params.length !== parsedArgs.length) {\n signatureContext.error('Expected ' + params.length + ' arguments, but found ' + parsedArgs.length + ' instead.');\n continue;\n }\n }\n for (var i$1 = 0; i$1 < parsedArgs.length; i$1++) {\n var expected = Array.isArray(params) ? params[i$1] : params.type;\n var arg$1 = parsedArgs[i$1];\n signatureContext.concat(i$1 + 1).checkSubtype(expected, arg$1.type);\n }\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n if (overloads.length === 1) {\n (ref$1 = context.errors).push.apply(ref$1, signatureContext.errors);\n } else {\n var expected$1 = overloads.length ? overloads : availableOverloads;\n var signatures = expected$1.map(function (ref) {\n var params = ref[0];\n return stringifySignature(params);\n }).join(' | ');\n var actualTypes = [];\n for (var i$2 = 1; i$2 < args.length; i$2++) {\n var parsed$1 = context.parse(args[i$2], 1 + actualTypes.length);\n if (!parsed$1) {\n return null;\n }\n actualTypes.push(toString(parsed$1.type));\n }\n context.error('Expected arguments of type ' + signatures + ', but found (' + actualTypes.join(', ') + ') instead.');\n }\n return null;\n};\nCompoundExpression.register = function register(registry, definitions) {\n CompoundExpression.definitions = definitions;\n for (var name in definitions) {\n registry[name] = CompoundExpression;\n }\n};\nfunction stringifySignature(signature) {\n if (Array.isArray(signature)) {\n return '(' + signature.map(toString).join(', ') + ')';\n } else {\n return '(' + toString(signature.type) + '...)';\n }\n}\n\nvar CollatorExpression = function CollatorExpression(caseSensitive, diacriticSensitive, locale) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n};\nCollatorExpression.parse = function parse(args, context) {\n if (args.length !== 2) {\n return context.error('Expected one argument.');\n }\n var options = args[1];\n if ((typeof options === \"undefined\" ? \"undefined\" : _typeof(options)) !== 'object' || Array.isArray(options)) {\n return context.error('Collator options argument must be an object.');\n }\n var caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) {\n return null;\n }\n var diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) {\n return null;\n }\n var locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) {\n return null;\n }\n }\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n};\nCollatorExpression.prototype.evaluate = function evaluate(ctx) {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n};\nCollatorExpression.prototype.eachChild = function eachChild(fn) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n};\nCollatorExpression.prototype.outputDefined = function outputDefined() {\n return false;\n};\nCollatorExpression.prototype.serialize = function serialize() {\n var options = {};\n options['case-sensitive'] = this.caseSensitive.serialize();\n options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n return ['collator', options];\n};\n\nvar EXTENT = 8192;\nfunction updateBBox(bbox, coord) {\n bbox[0] = Math.min(bbox[0], coord[0]);\n bbox[1] = Math.min(bbox[1], coord[1]);\n bbox[2] = Math.max(bbox[2], coord[0]);\n bbox[3] = Math.max(bbox[3], coord[1]);\n}\nfunction mercatorXfromLng(lng) {\n return (180 + lng) / 360;\n}\nfunction mercatorYfromLat(lat) {\n return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360;\n}\nfunction boxWithinBox(bbox1, bbox2) {\n if (bbox1[0] <= bbox2[0]) {\n return false;\n }\n if (bbox1[2] >= bbox2[2]) {\n return false;\n }\n if (bbox1[1] <= bbox2[1]) {\n return false;\n }\n if (bbox1[3] >= bbox2[3]) {\n return false;\n }\n return true;\n}\nfunction getTileCoordinates(p, canonical) {\n var x = mercatorXfromLng(p[0]);\n var y = mercatorYfromLat(p[1]);\n var tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\nfunction onBoundary(p, p1, p2) {\n var x1 = p[0] - p1[0];\n var y1 = p[1] - p1[1];\n var x2 = p[0] - p2[0];\n var y2 = p[1] - p2[1];\n return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0;\n}\nfunction rayIntersect(p, p1, p2) {\n return p1[1] > p[1] !== p2[1] > p[1] && p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0];\n}\nfunction pointWithinPolygon(point, rings) {\n var inside = false;\n for (var i = 0, len = rings.length; i < len; i++) {\n var ring = rings[i];\n for (var j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) {\n return false;\n }\n if (rayIntersect(point, ring[j], ring[j + 1])) {\n inside = !inside;\n }\n }\n }\n return inside;\n}\nfunction pointWithinPolygons(point, polygons) {\n for (var i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) {\n return true;\n }\n }\n return false;\n}\nfunction perp(v1, v2) {\n return v1[0] * v2[1] - v1[1] * v2[0];\n}\nfunction twoSided(p1, p2, q1, q2) {\n var x1 = p1[0] - q1[0];\n var y1 = p1[1] - q1[1];\n var x2 = p2[0] - q1[0];\n var y2 = p2[1] - q1[1];\n var x3 = q2[0] - q1[0];\n var y3 = q2[1] - q1[1];\n var det1 = x1 * y3 - x3 * y1;\n var det2 = x2 * y3 - x3 * y2;\n if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0) {\n return true;\n }\n return false;\n}\nfunction lineIntersectLine(a, b, c, d) {\n var vectorP = [b[0] - a[0], b[1] - a[1]];\n var vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) {\n return false;\n }\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) {\n return true;\n }\n return false;\n}\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (var i = 0, list = polygon; i < list.length; i += 1) {\n var ring = list[i];\n for (var j = 0; j < ring.length - 1; ++j) {\n if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n return true;\n }\n }\n }\n return false;\n}\nfunction lineStringWithinPolygon(line, polygon) {\n for (var i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n for (var i$1 = 0; i$1 < line.length - 1; ++i$1) {\n if (lineIntersectPolygon(line[i$1], line[i$1 + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\nfunction lineStringWithinPolygons(line, polygons) {\n for (var i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) {\n return true;\n }\n }\n return false;\n}\nfunction getTilePolygon(coordinates, bbox, canonical) {\n var polygon = [];\n for (var i = 0; i < coordinates.length; i++) {\n var ring = [];\n for (var j = 0; j < coordinates[i].length; j++) {\n var coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\nfunction getTilePolygons(coordinates, bbox, canonical) {\n var polygons = [];\n for (var i = 0; i < coordinates.length; i++) {\n var polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n var halfWorldSize = worldSize * 0.5;\n var shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfWorldSize ? worldSize : 0;\n if (shift === 0) {\n shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0;\n }\n p[0] += shift;\n }\n updateBBox(bbox, p);\n}\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n var worldSize = Math.pow(2, canonical.z) * EXTENT;\n var shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n var tilePoints = [];\n for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n var points = list$1[i$1];\n for (var i = 0, list = points; i < list.length; i += 1) {\n var point = list[i];\n var p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n var worldSize = Math.pow(2, canonical.z) * EXTENT;\n var shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n var tileLines = [];\n for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n var line = list$1[i$1];\n var tileLine = [];\n for (var i = 0, list = line; i < list.length; i += 1) {\n var point = list[i];\n var p = [point.x + shifts[0], point.y + shifts[1]];\n updateBBox(lineBBox, p);\n tileLine.push(p);\n }\n tileLines.push(tileLine);\n }\n if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n resetBBox(lineBBox);\n for (var i$3 = 0, list$3 = tileLines; i$3 < list$3.length; i$3 += 1) {\n var line$1 = list$3[i$3];\n for (var i$2 = 0, list$2 = line$1; i$2 < list$2.length; i$2 += 1) {\n var p$1 = list$2[i$2];\n updatePoint(p$1, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\nfunction pointsWithinPolygons(ctx, polygonGeometry) {\n var pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n var polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n var canonical = ctx.canonicalID();\n if (polygonGeometry.type === 'Polygon') {\n var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n var tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) {\n return false;\n }\n for (var i = 0, list = tilePoints; i < list.length; i += 1) {\n var point = list[i];\n if (!pointWithinPolygon(point, tilePolygon)) {\n return false;\n }\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n var tilePoints$1 = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) {\n return false;\n }\n for (var i$1 = 0, list$1 = tilePoints$1; i$1 < list$1.length; i$1 += 1) {\n var point$1 = list$1[i$1];\n if (!pointWithinPolygons(point$1, tilePolygons)) {\n return false;\n }\n }\n }\n return true;\n}\nfunction linesWithinPolygons(ctx, polygonGeometry) {\n var lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n var polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n var canonical = ctx.canonicalID();\n if (polygonGeometry.type === 'Polygon') {\n var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n var tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) {\n return false;\n }\n for (var i = 0, list = tileLines; i < list.length; i += 1) {\n var line = list[i];\n if (!lineStringWithinPolygon(line, tilePolygon)) {\n return false;\n }\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n var tileLines$1 = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) {\n return false;\n }\n for (var i$1 = 0, list$1 = tileLines$1; i$1 < list$1.length; i$1 += 1) {\n var line$1 = list$1[i$1];\n if (!lineStringWithinPolygons(line$1, tilePolygons)) {\n return false;\n }\n }\n }\n return true;\n}\nvar Within = function Within(geojson, geometries) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n};\nWithin.parse = function parse(args, context) {\n if (args.length !== 2) {\n return context.error('\\'within\\' expression requires exactly one argument, but found ' + (args.length - 1) + ' instead.');\n }\n if (isValue(args[1])) {\n var geojson = args[1];\n if (geojson.type === 'FeatureCollection') {\n for (var i = 0; i < geojson.features.length; ++i) {\n var type = geojson.features[i].geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.features[i].geometry);\n }\n }\n } else if (geojson.type === 'Feature') {\n var type$1 = geojson.geometry.type;\n if (type$1 === 'Polygon' || type$1 === 'MultiPolygon') {\n return new Within(geojson, geojson.geometry);\n }\n } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n return new Within(geojson, geojson);\n }\n }\n return context.error('\\'within\\' expression requires valid geojson object that contains polygon geometry type.');\n};\nWithin.prototype.evaluate = function evaluate(ctx) {\n if (ctx.geometry() != null && ctx.canonicalID() != null) {\n if (ctx.geometryType() === 'Point') {\n return pointsWithinPolygons(ctx, this.geometries);\n } else if (ctx.geometryType() === 'LineString') {\n return linesWithinPolygons(ctx, this.geometries);\n }\n }\n return false;\n};\nWithin.prototype.eachChild = function eachChild() {};\nWithin.prototype.outputDefined = function outputDefined() {\n return true;\n};\nWithin.prototype.serialize = function serialize() {\n return ['within', this.geojson];\n};\n\nfunction isFeatureConstant(e) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'get' && e.args.length === 1) {\n return false;\n } else if (e.name === 'feature-state') {\n return false;\n } else if (e.name === 'has' && e.args.length === 1) {\n return false;\n } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n if (e instanceof Within) {\n return false;\n }\n var result = true;\n e.eachChild(function (arg) {\n if (result && !isFeatureConstant(arg)) {\n result = false;\n }\n });\n return result;\n}\nfunction isStateConstant(e) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n var result = true;\n e.eachChild(function (arg) {\n if (result && !isStateConstant(arg)) {\n result = false;\n }\n });\n return result;\n}\nfunction isGlobalPropertyConstant(e, properties) {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {\n return false;\n }\n var result = true;\n e.eachChild(function (arg) {\n if (result && !isGlobalPropertyConstant(arg, properties)) {\n result = false;\n }\n });\n return result;\n}\n\nvar Var = function Var(name, boundExpression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n};\nVar.parse = function parse(args, context) {\n if (args.length !== 2 || typeof args[1] !== 'string') {\n return context.error('\\'var\\' expression requires exactly one string literal argument.');\n }\n var name = args[1];\n if (!context.scope.has(name)) {\n return context.error('Unknown variable \"' + name + '\". Make sure \"' + name + '\" has been bound in an enclosing \"let\" expression before using it.', 1);\n }\n return new Var(name, context.scope.get(name));\n};\nVar.prototype.evaluate = function evaluate(ctx) {\n return this.boundExpression.evaluate(ctx);\n};\nVar.prototype.eachChild = function eachChild() {};\nVar.prototype.outputDefined = function outputDefined() {\n return false;\n};\nVar.prototype.serialize = function serialize() {\n return ['var', this.name];\n};\n\nvar ParsingContext = function ParsingContext(registry, path, expectedType, scope, errors) {\n if (path === void 0) path = [];\n if (scope === void 0) scope = new Scope();\n if (errors === void 0) errors = [];\n this.registry = registry;\n this.path = path;\n this.key = path.map(function (part) {\n return '[' + part + ']';\n }).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n};\nParsingContext.prototype.parse = function parse(expr, index, expectedType, bindings, options) {\n if (options === void 0) options = {};\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n};\nParsingContext.prototype._parse = function _parse(expr, options) {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n function annotate(parsed, type, typeAnnotation) {\n if (typeAnnotation === 'assert') {\n return new Assertion(type, [parsed]);\n } else if (typeAnnotation === 'coerce') {\n return new Coercion(type, [parsed]);\n } else {\n return parsed;\n }\n }\n if (Array.isArray(expr)) {\n if (expr.length === 0) {\n return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');\n }\n var op = expr[0];\n if (typeof op !== 'string') {\n this.error('Expression name must be a string, but found ' + (typeof op === \"undefined\" ? \"undefined\" : _typeof(op)) + ' instead. If you wanted a literal array, use [\"literal\", [...]].', 0);\n return null;\n }\n var Expr = this.registry[op];\n if (Expr) {\n var parsed = Expr.parse(expr, this);\n if (!parsed) {\n return null;\n }\n if (this.expectedType) {\n var expected = this.expectedType;\n var actual = parsed.type;\n if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n } else if (this.checkSubtype(expected, actual)) {\n return null;\n }\n }\n if (!(parsed instanceof Literal) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) {\n var ec = new EvaluationContext();\n try {\n parsed = new Literal(parsed.type, parsed.evaluate(ec));\n } catch (e) {\n this.error(e.message);\n return null;\n }\n }\n return parsed;\n }\n return this.error('Unknown expression \"' + op + '\". If you wanted a literal array, use [\"literal\", [...]].', 0);\n } else if (typeof expr === 'undefined') {\n return this.error('\\'undefined\\' value invalid. Use null instead.');\n } else if ((typeof expr === \"undefined\" ? \"undefined\" : _typeof(expr)) === 'object') {\n return this.error('Bare objects invalid. Use [\"literal\", {...}] instead.');\n } else {\n return this.error('Expected an array, but found ' + (typeof expr === \"undefined\" ? \"undefined\" : _typeof(expr)) + ' instead.');\n }\n};\nParsingContext.prototype.concat = function concat(index, expectedType, bindings) {\n var path = typeof index === 'number' ? this.path.concat(index) : this.path;\n var scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors);\n};\nParsingContext.prototype.error = function error(error$1) {\n var keys = [],\n len = arguments.length - 1;\n while (len-- > 0) {\n keys[len] = arguments[len + 1];\n }var key = '' + this.key + keys.map(function (k) {\n return '[' + k + ']';\n }).join('');\n this.errors.push(new ParsingError(key, error$1));\n};\nParsingContext.prototype.checkSubtype = function checkSubtype$1(expected, t) {\n var error = checkSubtype(expected, t);\n if (error) {\n this.error(error);\n }\n return error;\n};\nfunction isConstant(expression) {\n if (expression instanceof Var) {\n return isConstant(expression.boundExpression);\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n } else if (expression instanceof CollatorExpression) {\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n var isTypeAnnotation = expression instanceof Coercion || expression instanceof Assertion;\n var childrenConstant = true;\n expression.eachChild(function (child) {\n if (isTypeAnnotation) {\n childrenConstant = childrenConstant && isConstant(child);\n } else {\n childrenConstant = childrenConstant && child instanceof Literal;\n }\n });\n if (!childrenConstant) {\n return false;\n }\n return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'accumulated', 'is-supported-script']);\n}\n\nfunction findStopLessThanOrEqualTo(stops, input) {\n var lastIndex = stops.length - 1;\n var lowerIndex = 0;\n var upperIndex = lastIndex;\n var currentIndex = 0;\n var currentValue, nextValue;\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) {\n return currentIndex;\n }\n lowerIndex = currentIndex + 1;\n } else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n } else {\n throw new RuntimeError('Input is not a number.');\n }\n }\n return 0;\n}\n\nvar Step = function Step(type, input, stops) {\n this.type = type;\n this.input = input;\n this.labels = [];\n this.outputs = [];\n for (var i = 0, list = stops; i < list.length; i += 1) {\n var ref = list[i];\n var label = ref[0];\n var expression = ref[1];\n this.labels.push(label);\n this.outputs.push(expression);\n }\n};\nStep.parse = function parse(args, context) {\n if (args.length - 1 < 4) {\n return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n }\n if ((args.length - 1) % 2 !== 0) {\n return context.error('Expected an even number of arguments.');\n }\n var input = context.parse(args[1], 1, NumberType);\n if (!input) {\n return null;\n }\n var stops = [];\n var outputType = null;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n for (var i = 1; i < args.length; i += 2) {\n var label = i === 1 ? -Infinity : args[i];\n var value = args[i + 1];\n var labelKey = i;\n var valueKey = i + 1;\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n var parsed = context.parse(value, valueKey, outputType);\n if (!parsed) {\n return null;\n }\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n return new Step(outputType, input, stops);\n};\nStep.prototype.evaluate = function evaluate(ctx) {\n var labels = this.labels;\n var outputs = this.outputs;\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n var value = this.input.evaluate(ctx);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n var stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n var index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n};\nStep.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n var expression = list[i];\n fn(expression);\n }\n};\nStep.prototype.outputDefined = function outputDefined() {\n return this.outputs.every(function (out) {\n return out.outputDefined();\n });\n};\nStep.prototype.serialize = function serialize() {\n var serialized = ['step', this.input.serialize()];\n for (var i = 0; i < this.labels.length; i++) {\n if (i > 0) {\n serialized.push(this.labels[i]);\n }\n serialized.push(this.outputs[i].serialize());\n }\n return serialized;\n};\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nvar unitbezier = 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 = p2y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype.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\nUnitBezier.prototype.sampleCurveY = function (t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function (t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function (x, epsilon) {\n if (typeof epsilon === 'undefined') {\n epsilon = 1e-6;\n }\n\n var t0, t1, t2, x2, i;\n\n // First try a few iterations of Newton's method -- normally very fast.\n for (t2 = x, i = 0; i < 8; i++) {\n\n x2 = this.sampleCurveX(t2) - x;\n if (Math.abs(x2) < epsilon) {\n return t2;\n }\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) {\n break;\n }\n\n t2 = t2 - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n t0 = 0.0;\n t1 = 1.0;\n t2 = x;\n\n if (t2 < t0) {\n return t0;\n }\n if (t2 > t1) {\n return t1;\n }\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) {\n return t2;\n }\n\n if (x > x2) {\n t0 = t2;\n } else {\n t1 = t2;\n }\n\n t2 = (t1 - t0) * 0.5 + t0;\n }\n\n // Failure.\n return t2;\n};\n\nUnitBezier.prototype.solve = function (x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n\nfunction number(a, b, t) {\n return a * (1 - t) + b * t;\n}\nfunction color(from, to, t) {\n return new Color(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t));\n}\nfunction array$1(from, to, t) {\n return from.map(function (d, i) {\n return number(d, to[i], t);\n });\n}\n\nvar interpolate = /*#__PURE__*/Object.freeze({\n __proto__: null,\n number: number,\n color: color,\n array: array$1\n});\n\nvar Xn = 0.95047,\n Yn = 1,\n Zn = 1.08883,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\nfunction xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\nfunction rgb2xyz(x) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\nfunction rgbToLab(rgbColor) {\n var b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.072175 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.119192 * a + 0.9503041 * l) / Zn);\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\nfunction labToRgb(labColor) {\n var y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Color(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha);\n}\nfunction interpolateLab(from, to, t) {\n return {\n l: number(from.l, to.l, t),\n a: number(from.a, to.a, t),\n b: number(from.b, to.b, t),\n alpha: number(from.alpha, to.alpha, t)\n };\n}\nfunction rgbToHcl(rgbColor) {\n var ref = rgbToLab(rgbColor);\n var l = ref.l;\n var a = ref.a;\n var b = ref.b;\n var h = Math.atan2(b, a) * rad2deg;\n return {\n h: h < 0 ? h + 360 : h,\n c: Math.sqrt(a * a + b * b),\n l: l,\n alpha: rgbColor.a\n };\n}\nfunction hclToRgb(hclColor) {\n var h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l: l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\nfunction interpolateHue(a, b, t) {\n var d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\nfunction interpolateHcl(from, to, t) {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: number(from.c, to.c, t),\n l: number(from.l, to.l, t),\n alpha: number(from.alpha, to.alpha, t)\n };\n}\nvar lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\nvar hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n\nvar colorSpaces = /*#__PURE__*/Object.freeze({\n __proto__: null,\n lab: lab,\n hcl: hcl\n});\n\nvar Interpolate = function Interpolate(type, operator, interpolation, input, stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n this.labels = [];\n this.outputs = [];\n for (var i = 0, list = stops; i < list.length; i += 1) {\n var ref = list[i];\n var label = ref[0];\n var expression = ref[1];\n this.labels.push(label);\n this.outputs.push(expression);\n }\n};\nInterpolate.interpolationFactor = function interpolationFactor(interpolation, input, lower, upper) {\n var t = 0;\n if (interpolation.name === 'exponential') {\n t = exponentialInterpolation(input, interpolation.base, lower, upper);\n } else if (interpolation.name === 'linear') {\n t = exponentialInterpolation(input, 1, lower, upper);\n } else if (interpolation.name === 'cubic-bezier') {\n var c = interpolation.controlPoints;\n var ub = new unitbezier(c[0], c[1], c[2], c[3]);\n t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n }\n return t;\n};\nInterpolate.parse = function parse(args, context) {\n var operator = args[0];\n var interpolation = args[1];\n var input = args[2];\n var rest = args.slice(3);\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error('Expected an interpolation type expression.', 1);\n }\n if (interpolation[0] === 'linear') {\n interpolation = { name: 'linear' };\n } else if (interpolation[0] === 'exponential') {\n var base = interpolation[1];\n if (typeof base !== 'number') {\n return context.error('Exponential interpolation requires a numeric base.', 1, 1);\n }\n interpolation = {\n name: 'exponential',\n base: base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n var controlPoints = interpolation.slice(1);\n if (controlPoints.length !== 4 || controlPoints.some(function (t) {\n return typeof t !== 'number' || t < 0 || t > 1;\n })) {\n return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n }\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: controlPoints\n };\n } else {\n return context.error('Unknown interpolation type ' + String(interpolation[0]), 1, 0);\n }\n if (args.length - 1 < 4) {\n return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n }\n if ((args.length - 1) % 2 !== 0) {\n return context.error('Expected an even number of arguments.');\n }\n input = context.parse(input, 2, NumberType);\n if (!input) {\n return null;\n }\n var stops = [];\n var outputType = null;\n if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n outputType = ColorType;\n } else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n for (var i = 0; i < rest.length; i += 2) {\n var label = rest[i];\n var value = rest[i + 1];\n var labelKey = i + 3;\n var valueKey = i + 4;\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n var parsed = context.parse(value, valueKey, outputType);\n if (!parsed) {\n return null;\n }\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {\n return context.error('Type ' + toString(outputType) + ' is not interpolatable.');\n }\n return new Interpolate(outputType, operator, interpolation, input, stops);\n};\nInterpolate.prototype.evaluate = function evaluate(ctx) {\n var labels = this.labels;\n var outputs = this.outputs;\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n var value = this.input.evaluate(ctx);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n var stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n var index = findStopLessThanOrEqualTo(labels, value);\n var lower = labels[index];\n var upper = labels[index + 1];\n var t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n var outputLower = outputs[index].evaluate(ctx);\n var outputUpper = outputs[index + 1].evaluate(ctx);\n if (this.operator === 'interpolate') {\n return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t);\n } else if (this.operator === 'interpolate-hcl') {\n return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n } else {\n return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n }\n};\nInterpolate.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n var expression = list[i];\n fn(expression);\n }\n};\nInterpolate.prototype.outputDefined = function outputDefined() {\n return this.outputs.every(function (out) {\n return out.outputDefined();\n });\n};\nInterpolate.prototype.serialize = function serialize() {\n var interpolation;\n if (this.interpolation.name === 'linear') {\n interpolation = ['linear'];\n } else if (this.interpolation.name === 'exponential') {\n if (this.interpolation.base === 1) {\n interpolation = ['linear'];\n } else {\n interpolation = ['exponential', this.interpolation.base];\n }\n } else {\n interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints);\n }\n var serialized = [this.operator, interpolation, this.input.serialize()];\n for (var i = 0; i < this.labels.length; i++) {\n serialized.push(this.labels[i], this.outputs[i].serialize());\n }\n return serialized;\n};\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n var difference = upperValue - lowerValue;\n var progress = input - lowerValue;\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nvar Coalesce = function Coalesce(type, args) {\n this.type = type;\n this.args = args;\n};\nCoalesce.parse = function parse(args, context) {\n if (args.length < 2) {\n return context.error('Expectected at least one argument.');\n }\n var outputType = null;\n var expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n var parsedArgs = [];\n for (var i = 0, list = args.slice(1); i < list.length; i += 1) {\n var arg = list[i];\n var parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' });\n if (!parsed) {\n return null;\n }\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n var needsAnnotation = expectedType && parsedArgs.some(function (arg) {\n return checkSubtype(expectedType, arg.type);\n });\n return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);\n};\nCoalesce.prototype.evaluate = function evaluate(ctx) {\n var result = null;\n var argCount = 0;\n var requestedImageName;\n for (var i = 0, list = this.args; i < list.length; i += 1) {\n var arg = list[i];\n argCount++;\n result = arg.evaluate(ctx);\n if (result && result instanceof ResolvedImage && !result.available) {\n if (!requestedImageName) {\n requestedImageName = result.name;\n }\n result = null;\n if (argCount === this.args.length) {\n result = requestedImageName;\n }\n }\n if (result !== null) {\n break;\n }\n }\n return result;\n};\nCoalesce.prototype.eachChild = function eachChild(fn) {\n this.args.forEach(fn);\n};\nCoalesce.prototype.outputDefined = function outputDefined() {\n return this.args.every(function (arg) {\n return arg.outputDefined();\n });\n};\nCoalesce.prototype.serialize = function serialize() {\n var serialized = ['coalesce'];\n this.eachChild(function (child) {\n serialized.push(child.serialize());\n });\n return serialized;\n};\n\nvar Let = function Let(bindings, result) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n};\nLet.prototype.evaluate = function evaluate(ctx) {\n return this.result.evaluate(ctx);\n};\nLet.prototype.eachChild = function eachChild(fn) {\n for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n var binding = list[i];\n fn(binding[1]);\n }\n fn(this.result);\n};\nLet.parse = function parse(args, context) {\n if (args.length < 4) {\n return context.error('Expected at least 3 arguments, but found ' + (args.length - 1) + ' instead.');\n }\n var bindings = [];\n for (var i = 1; i < args.length - 1; i += 2) {\n var name = args[i];\n if (typeof name !== 'string') {\n return context.error('Expected string, but found ' + (typeof name === \"undefined\" ? \"undefined\" : _typeof(name)) + ' instead.', i);\n }\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error('Variable names must contain only alphanumeric characters or \\'_\\'.', i);\n }\n var value = context.parse(args[i + 1], i + 1);\n if (!value) {\n return null;\n }\n bindings.push([name, value]);\n }\n var result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) {\n return null;\n }\n return new Let(bindings, result);\n};\nLet.prototype.outputDefined = function outputDefined() {\n return this.result.outputDefined();\n};\nLet.prototype.serialize = function serialize() {\n var serialized = ['let'];\n for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n var ref = list[i];\n var name = ref[0];\n var expr = ref[1];\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n};\n\nvar At = function At(type, index, input) {\n this.type = type;\n this.index = index;\n this.input = input;\n};\nAt.parse = function parse(args, context) {\n if (args.length !== 3) {\n return context.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n }\n var index = context.parse(args[1], 1, NumberType);\n var input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n if (!index || !input) {\n return null;\n }\n var t = input.type;\n return new At(t.itemType, index, input);\n};\nAt.prototype.evaluate = function evaluate(ctx) {\n var index = this.index.evaluate(ctx);\n var array = this.input.evaluate(ctx);\n if (index < 0) {\n throw new RuntimeError('Array index out of bounds: ' + index + ' < 0.');\n }\n if (index >= array.length) {\n throw new RuntimeError('Array index out of bounds: ' + index + ' > ' + (array.length - 1) + '.');\n }\n if (index !== Math.floor(index)) {\n throw new RuntimeError('Array index must be an integer, but found ' + index + ' instead.');\n }\n return array[index];\n};\nAt.prototype.eachChild = function eachChild(fn) {\n fn(this.index);\n fn(this.input);\n};\nAt.prototype.outputDefined = function outputDefined() {\n return false;\n};\nAt.prototype.serialize = function serialize() {\n return ['at', this.index.serialize(), this.input.serialize()];\n};\n\nvar In = function In(needle, haystack) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n};\nIn.parse = function parse(args, context) {\n if (args.length !== 3) {\n return context.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n }\n var needle = context.parse(args[1], 1, ValueType);\n var haystack = context.parse(args[2], 2, ValueType);\n if (!needle || !haystack) {\n return null;\n }\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error('Expected first argument to be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n }\n return new In(needle, haystack);\n};\nIn.prototype.evaluate = function evaluate(ctx) {\n var needle = this.needle.evaluate(ctx);\n var haystack = this.haystack.evaluate(ctx);\n if (!haystack) {\n return false;\n }\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n }\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n }\n return haystack.indexOf(needle) >= 0;\n};\nIn.prototype.eachChild = function eachChild(fn) {\n fn(this.needle);\n fn(this.haystack);\n};\nIn.prototype.outputDefined = function outputDefined() {\n return true;\n};\nIn.prototype.serialize = function serialize() {\n return ['in', this.needle.serialize(), this.haystack.serialize()];\n};\n\nvar IndexOf = function IndexOf(needle, haystack, fromIndex) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n};\nIndexOf.parse = function parse(args, context) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n }\n var needle = context.parse(args[1], 1, ValueType);\n var haystack = context.parse(args[2], 2, ValueType);\n if (!needle || !haystack) {\n return null;\n }\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error('Expected first argument to be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n }\n if (args.length === 4) {\n var fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) {\n return null;\n }\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n};\nIndexOf.prototype.evaluate = function evaluate(ctx) {\n var needle = this.needle.evaluate(ctx);\n var haystack = this.haystack.evaluate(ctx);\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n }\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n }\n if (this.fromIndex) {\n var fromIndex = this.fromIndex.evaluate(ctx);\n return haystack.indexOf(needle, fromIndex);\n }\n return haystack.indexOf(needle);\n};\nIndexOf.prototype.eachChild = function eachChild(fn) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n};\nIndexOf.prototype.outputDefined = function outputDefined() {\n return false;\n};\nIndexOf.prototype.serialize = function serialize() {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n var fromIndex = this.fromIndex.serialize();\n return ['index-of', this.needle.serialize(), this.haystack.serialize(), fromIndex];\n }\n return ['index-of', this.needle.serialize(), this.haystack.serialize()];\n};\n\nvar Match = function Match(inputType, outputType, input, cases, outputs, otherwise) {\n this.inputType = inputType;\n this.type = outputType;\n this.input = input;\n this.cases = cases;\n this.outputs = outputs;\n this.otherwise = otherwise;\n};\nMatch.parse = function parse(args, context) {\n if (args.length < 5) {\n return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n }\n if (args.length % 2 !== 1) {\n return context.error('Expected an even number of arguments.');\n }\n var inputType;\n var outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n var cases = {};\n var outputs = [];\n for (var i = 2; i < args.length - 1; i += 2) {\n var labels = args[i];\n var value = args[i + 1];\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n var labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n for (var i$1 = 0, list = labels; i$1 < list.length; i$1 += 1) {\n var label = list[i$1];\n if (typeof label !== 'number' && typeof label !== 'string') {\n return labelContext.error('Branch labels must be numbers or strings.');\n } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n return labelContext.error('Branch labels must be integers no larger than ' + Number.MAX_SAFE_INTEGER + '.');\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error('Numeric branch labels must be integer values.');\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n cases[String(label)] = outputs.length;\n }\n var result = context.parse(value, i, outputType);\n if (!result) {\n return null;\n }\n outputType = outputType || result.type;\n outputs.push(result);\n }\n var input = context.parse(args[1], 1, ValueType);\n if (!input) {\n return null;\n }\n var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) {\n return null;\n }\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) {\n return null;\n }\n return new Match(inputType, outputType, input, cases, outputs, otherwise);\n};\nMatch.prototype.evaluate = function evaluate(ctx) {\n var input = this.input.evaluate(ctx);\n var output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise;\n return output.evaluate(ctx);\n};\nMatch.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n};\nMatch.prototype.outputDefined = function outputDefined() {\n return this.outputs.every(function (out) {\n return out.outputDefined();\n }) && this.otherwise.outputDefined();\n};\nMatch.prototype.serialize = function serialize() {\n var this$1 = this;\n var serialized = ['match', this.input.serialize()];\n var sortedLabels = Object.keys(this.cases).sort();\n var groupedByOutput = [];\n var outputLookup = {};\n for (var i = 0, list = sortedLabels; i < list.length; i += 1) {\n var label = list[i];\n var outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n var coerceLabel = function coerceLabel(label) {\n return this$1.inputType.kind === 'number' ? Number(label) : label;\n };\n for (var i$1 = 0, list$1 = groupedByOutput; i$1 < list$1.length; i$1 += 1) {\n var ref = list$1[i$1];\n var outputIndex = ref[0];\n var labels = ref[1];\n if (labels.length === 1) {\n serialized.push(coerceLabel(labels[0]));\n } else {\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex$1].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n};\n\nvar Case = function Case(type, branches, otherwise) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n};\nCase.parse = function parse(args, context) {\n if (args.length < 4) {\n return context.error('Expected at least 3 arguments, but found only ' + (args.length - 1) + '.');\n }\n if (args.length % 2 !== 0) {\n return context.error('Expected an odd number of arguments.');\n }\n var outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n var branches = [];\n for (var i = 1; i < args.length - 1; i += 2) {\n var test = context.parse(args[i], i, BooleanType);\n if (!test) {\n return null;\n }\n var result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) {\n return null;\n }\n branches.push([test, result]);\n outputType = outputType || result.type;\n }\n var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) {\n return null;\n }\n return new Case(outputType, branches, otherwise);\n};\nCase.prototype.evaluate = function evaluate(ctx) {\n for (var i = 0, list = this.branches; i < list.length; i += 1) {\n var ref = list[i];\n var test = ref[0];\n var expression = ref[1];\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n};\nCase.prototype.eachChild = function eachChild(fn) {\n for (var i = 0, list = this.branches; i < list.length; i += 1) {\n var ref = list[i];\n var test = ref[0];\n var expression = ref[1];\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n};\nCase.prototype.outputDefined = function outputDefined() {\n return this.branches.every(function (ref) {\n var _ = ref[0];\n var out = ref[1];\n return out.outputDefined();\n }) && this.otherwise.outputDefined();\n};\nCase.prototype.serialize = function serialize() {\n var serialized = ['case'];\n this.eachChild(function (child) {\n serialized.push(child.serialize());\n });\n return serialized;\n};\n\nvar Slice = function Slice(type, input, beginIndex, endIndex) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n};\nSlice.parse = function parse(args, context) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n }\n var input = context.parse(args[1], 1, ValueType);\n var beginIndex = context.parse(args[2], 2, NumberType);\n if (!input || !beginIndex) {\n return null;\n }\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error('Expected first argument to be of type array or string, but found ' + toString(input.type) + ' instead');\n }\n if (args.length === 4) {\n var endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) {\n return null;\n }\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n};\nSlice.prototype.evaluate = function evaluate(ctx) {\n var input = this.input.evaluate(ctx);\n var beginIndex = this.beginIndex.evaluate(ctx);\n if (!isValidNativeType(input, ['string', 'array'])) {\n throw new RuntimeError('Expected first argument to be of type array or string, but found ' + toString(typeOf(input)) + ' instead.');\n }\n if (this.endIndex) {\n var endIndex = this.endIndex.evaluate(ctx);\n return input.slice(beginIndex, endIndex);\n }\n return input.slice(beginIndex);\n};\nSlice.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n};\nSlice.prototype.outputDefined = function outputDefined() {\n return false;\n};\nSlice.prototype.serialize = function serialize() {\n if (this.endIndex != null && this.endIndex !== undefined) {\n var endIndex = this.endIndex.serialize();\n return ['slice', this.input.serialize(), this.beginIndex.serialize(), endIndex];\n }\n return ['slice', this.input.serialize(), this.beginIndex.serialize()];\n};\n\nfunction isComparableType(op, type) {\n if (op === '==' || op === '!=') {\n return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value';\n } else {\n return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n }\n}\nfunction eq(ctx, a, b) {\n return a === b;\n}\nfunction neq(ctx, a, b) {\n return a !== b;\n}\nfunction lt(ctx, a, b) {\n return a < b;\n}\nfunction gt(ctx, a, b) {\n return a > b;\n}\nfunction lteq(ctx, a, b) {\n return a <= b;\n}\nfunction gteq(ctx, a, b) {\n return a >= b;\n}\nfunction eqCollate(ctx, a, b, c) {\n return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n return c.compare(a, b) >= 0;\n}\nfunction makeComparison(op, compareBasic, compareWithCollator) {\n var isOrderComparison = op !== '==' && op !== '!=';\n return function () {\n function Comparison(lhs, rhs, collator) {\n this.type = BooleanType;\n this.lhs = lhs;\n this.rhs = rhs;\n this.collator = collator;\n this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n }\n Comparison.parse = function parse(args, context) {\n if (args.length !== 3 && args.length !== 4) {\n return context.error('Expected two or three arguments.');\n }\n var op = args[0];\n var lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) {\n return null;\n }\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(lhs.type) + '\\'.');\n }\n var rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) {\n return null;\n }\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(rhs.type) + '\\'.');\n }\n if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n return context.error('Cannot compare types \\'' + toString(lhs.type) + '\\' and \\'' + toString(rhs.type) + '\\'.');\n }\n if (isOrderComparison) {\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n var collator = null;\n if (args.length === 4) {\n if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n return context.error('Cannot use collator to compare non-string types.');\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) {\n return null;\n }\n }\n return new Comparison(lhs, rhs, collator);\n };\n Comparison.prototype.evaluate = function evaluate(ctx) {\n var lhs = this.lhs.evaluate(ctx);\n var rhs = this.rhs.evaluate(ctx);\n if (isOrderComparison && this.hasUntypedArgument) {\n var lt = typeOf(lhs);\n var rt = typeOf(rhs);\n if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n throw new RuntimeError('Expected arguments for \"' + op + '\" to be (string, string) or (number, number), but found (' + lt.kind + ', ' + rt.kind + ') instead.');\n }\n }\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n var lt$1 = typeOf(lhs);\n var rt$1 = typeOf(rhs);\n if (lt$1.kind !== 'string' || rt$1.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) : compareBasic(ctx, lhs, rhs);\n };\n Comparison.prototype.eachChild = function eachChild(fn) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n };\n Comparison.prototype.outputDefined = function outputDefined() {\n return true;\n };\n Comparison.prototype.serialize = function serialize() {\n var serialized = [op];\n this.eachChild(function (child) {\n serialized.push(child.serialize());\n });\n return serialized;\n };\n return Comparison;\n }();\n}\nvar Equals = makeComparison('==', eq, eqCollate);\nvar NotEquals = makeComparison('!=', neq, neqCollate);\nvar LessThan = makeComparison('<', lt, ltCollate);\nvar GreaterThan = makeComparison('>', gt, gtCollate);\nvar LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nvar GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n\nvar NumberFormat = function NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n};\nNumberFormat.parse = function parse(args, context) {\n if (args.length !== 3) {\n return context.error('Expected two arguments.');\n }\n var number = context.parse(args[1], 1, NumberType);\n if (!number) {\n return null;\n }\n var options = args[2];\n if ((typeof options === \"undefined\" ? \"undefined\" : _typeof(options)) !== 'object' || Array.isArray(options)) {\n return context.error('NumberFormat options argument must be an object.');\n }\n var locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) {\n return null;\n }\n }\n var currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) {\n return null;\n }\n }\n var minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) {\n return null;\n }\n }\n var maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) {\n return null;\n }\n }\n return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n};\nNumberFormat.prototype.evaluate = function evaluate(ctx) {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n style: this.currency ? 'currency' : 'decimal',\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined\n }).format(this.number.evaluate(ctx));\n};\nNumberFormat.prototype.eachChild = function eachChild(fn) {\n fn(this.number);\n if (this.locale) {\n fn(this.locale);\n }\n if (this.currency) {\n fn(this.currency);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n};\nNumberFormat.prototype.outputDefined = function outputDefined() {\n return false;\n};\nNumberFormat.prototype.serialize = function serialize() {\n var options = {};\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n if (this.currency) {\n options['currency'] = this.currency.serialize();\n }\n if (this.minFractionDigits) {\n options['min-fraction-digits'] = this.minFractionDigits.serialize();\n }\n if (this.maxFractionDigits) {\n options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n }\n return ['number-format', this.number.serialize(), options];\n};\n\nvar Length = function Length(input) {\n this.type = NumberType;\n this.input = input;\n};\nLength.parse = function parse(args, context) {\n if (args.length !== 2) {\n return context.error('Expected 1 argument, but found ' + (args.length - 1) + ' instead.');\n }\n var input = context.parse(args[1], 1);\n if (!input) {\n return null;\n }\n if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value') {\n return context.error('Expected argument of type string or array, but found ' + toString(input.type) + ' instead.');\n }\n return new Length(input);\n};\nLength.prototype.evaluate = function evaluate(ctx) {\n var input = this.input.evaluate(ctx);\n if (typeof input === 'string') {\n return input.length;\n } else if (Array.isArray(input)) {\n return input.length;\n } else {\n throw new RuntimeError('Expected value to be of type string or array, but found ' + toString(typeOf(input)) + ' instead.');\n }\n};\nLength.prototype.eachChild = function eachChild(fn) {\n fn(this.input);\n};\nLength.prototype.outputDefined = function outputDefined() {\n return false;\n};\nLength.prototype.serialize = function serialize() {\n var serialized = ['length'];\n this.eachChild(function (child) {\n serialized.push(child.serialize());\n });\n return serialized;\n};\n\nvar expressions = {\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n 'array': Assertion,\n 'at': At,\n 'boolean': Assertion,\n 'case': Case,\n 'coalesce': Coalesce,\n 'collator': CollatorExpression,\n 'format': FormatExpression,\n 'image': ImageExpression,\n 'in': In,\n 'index-of': IndexOf,\n 'interpolate': Interpolate,\n 'interpolate-hcl': Interpolate,\n 'interpolate-lab': Interpolate,\n 'length': Length,\n 'let': Let,\n 'literal': Literal,\n 'match': Match,\n 'number': Assertion,\n 'number-format': NumberFormat,\n 'object': Assertion,\n 'slice': Slice,\n 'step': Step,\n 'string': Assertion,\n 'to-boolean': Coercion,\n 'to-color': Coercion,\n 'to-number': Coercion,\n 'to-string': Coercion,\n 'var': Var,\n 'within': Within\n};\nfunction rgba(ctx, ref) {\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var a = ref[3];\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n var alpha = a ? a.evaluate(ctx) : 1;\n var error = validateRGBA(r, g, b, alpha);\n if (error) {\n throw new RuntimeError(error);\n }\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\nfunction has(key, obj) {\n return key in obj;\n}\nfunction get(key, obj) {\n var v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n var m = i + j >> 1;\n if (a[m] === v) {\n return true;\n }\n if (a[m] > v) {\n j = m - 1;\n } else {\n i = m + 1;\n }\n }\n return false;\n}\nfunction varargs(type) {\n return { type: type };\n}\nCompoundExpression.register(expressions, {\n 'error': [ErrorType, [StringType], function (ctx, ref) {\n var v = ref[0];\n throw new RuntimeError(v.evaluate(ctx));\n }],\n 'typeof': [StringType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n return toString(typeOf(v.evaluate(ctx)));\n }],\n 'to-rgba': [array(NumberType, 4), [ColorType], function (ctx, ref) {\n var v = ref[0];\n return v.evaluate(ctx).toArray();\n }],\n 'rgb': [ColorType, [NumberType, NumberType, NumberType], rgba],\n 'rgba': [ColorType, [NumberType, NumberType, NumberType, NumberType], rgba],\n 'has': {\n type: BooleanType,\n overloads: [[[StringType], function (ctx, ref) {\n var key = ref[0];\n return has(key.evaluate(ctx), ctx.properties());\n }], [[StringType, ObjectType], function (ctx, ref) {\n var key = ref[0];\n var obj = ref[1];\n return has(key.evaluate(ctx), obj.evaluate(ctx));\n }]]\n },\n 'get': {\n type: ValueType,\n overloads: [[[StringType], function (ctx, ref) {\n var key = ref[0];\n return get(key.evaluate(ctx), ctx.properties());\n }], [[StringType, ObjectType], function (ctx, ref) {\n var key = ref[0];\n var obj = ref[1];\n return get(key.evaluate(ctx), obj.evaluate(ctx));\n }]]\n },\n 'feature-state': [ValueType, [StringType], function (ctx, ref) {\n var key = ref[0];\n return get(key.evaluate(ctx), ctx.featureState || {});\n }],\n 'properties': [ObjectType, [], function (ctx) {\n return ctx.properties();\n }],\n 'geometry-type': [StringType, [], function (ctx) {\n return ctx.geometryType();\n }],\n 'id': [ValueType, [], function (ctx) {\n return ctx.id();\n }],\n 'zoom': [NumberType, [], function (ctx) {\n return ctx.globals.zoom;\n }],\n 'heatmap-density': [NumberType, [], function (ctx) {\n return ctx.globals.heatmapDensity || 0;\n }],\n 'line-progress': [NumberType, [], function (ctx) {\n return ctx.globals.lineProgress || 0;\n }],\n 'accumulated': [ValueType, [], function (ctx) {\n return ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated;\n }],\n '+': [NumberType, varargs(NumberType), function (ctx, args) {\n var result = 0;\n for (var i = 0, list = args; i < list.length; i += 1) {\n var arg = list[i];\n result += arg.evaluate(ctx);\n }\n return result;\n }],\n '*': [NumberType, varargs(NumberType), function (ctx, args) {\n var result = 1;\n for (var i = 0, list = args; i < list.length; i += 1) {\n var arg = list[i];\n result *= arg.evaluate(ctx);\n }\n return result;\n }],\n '-': {\n type: NumberType,\n overloads: [[[NumberType, NumberType], function (ctx, ref) {\n var a = ref[0];\n var b = ref[1];\n return a.evaluate(ctx) - b.evaluate(ctx);\n }], [[NumberType], function (ctx, ref) {\n var a = ref[0];\n return -a.evaluate(ctx);\n }]]\n },\n '/': [NumberType, [NumberType, NumberType], function (ctx, ref) {\n var a = ref[0];\n var b = ref[1];\n return a.evaluate(ctx) / b.evaluate(ctx);\n }],\n '%': [NumberType, [NumberType, NumberType], function (ctx, ref) {\n var a = ref[0];\n var b = ref[1];\n return a.evaluate(ctx) % b.evaluate(ctx);\n }],\n 'ln2': [NumberType, [], function () {\n return Math.LN2;\n }],\n 'pi': [NumberType, [], function () {\n return Math.PI;\n }],\n 'e': [NumberType, [], function () {\n return Math.E;\n }],\n '^': [NumberType, [NumberType, NumberType], function (ctx, ref) {\n var b = ref[0];\n var e = ref[1];\n return Math.pow(b.evaluate(ctx), e.evaluate(ctx));\n }],\n 'sqrt': [NumberType, [NumberType], function (ctx, ref) {\n var x = ref[0];\n return Math.sqrt(x.evaluate(ctx));\n }],\n 'log10': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.log(n.evaluate(ctx)) / Math.LN10;\n }],\n 'ln': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.log(n.evaluate(ctx));\n }],\n 'log2': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.log(n.evaluate(ctx)) / Math.LN2;\n }],\n 'sin': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.sin(n.evaluate(ctx));\n }],\n 'cos': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.cos(n.evaluate(ctx));\n }],\n 'tan': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.tan(n.evaluate(ctx));\n }],\n 'asin': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.asin(n.evaluate(ctx));\n }],\n 'acos': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.acos(n.evaluate(ctx));\n }],\n 'atan': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.atan(n.evaluate(ctx));\n }],\n 'min': [NumberType, varargs(NumberType), function (ctx, args) {\n return Math.min.apply(Math, args.map(function (arg) {\n return arg.evaluate(ctx);\n }));\n }],\n 'max': [NumberType, varargs(NumberType), function (ctx, args) {\n return Math.max.apply(Math, args.map(function (arg) {\n return arg.evaluate(ctx);\n }));\n }],\n 'abs': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.abs(n.evaluate(ctx));\n }],\n 'round': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n var v = n.evaluate(ctx);\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }],\n 'floor': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.floor(n.evaluate(ctx));\n }],\n 'ceil': [NumberType, [NumberType], function (ctx, ref) {\n var n = ref[0];\n return Math.ceil(n.evaluate(ctx));\n }],\n 'filter-==': [BooleanType, [StringType, ValueType], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n return ctx.properties()[k.value] === v.value;\n }],\n 'filter-id-==': [BooleanType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n return ctx.id() === v.value;\n }],\n 'filter-type-==': [BooleanType, [StringType], function (ctx, ref) {\n var v = ref[0];\n return ctx.geometryType() === v.value;\n }],\n 'filter-<': [BooleanType, [StringType, ValueType], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n var a = ctx.properties()[k.value];\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a < b;\n }],\n 'filter-id-<': [BooleanType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n var a = ctx.id();\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a < b;\n }],\n 'filter->': [BooleanType, [StringType, ValueType], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n var a = ctx.properties()[k.value];\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a > b;\n }],\n 'filter-id->': [BooleanType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n var a = ctx.id();\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a > b;\n }],\n 'filter-<=': [BooleanType, [StringType, ValueType], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n var a = ctx.properties()[k.value];\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a <= b;\n }],\n 'filter-id-<=': [BooleanType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n var a = ctx.id();\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a <= b;\n }],\n 'filter->=': [BooleanType, [StringType, ValueType], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n var a = ctx.properties()[k.value];\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a >= b;\n }],\n 'filter-id->=': [BooleanType, [ValueType], function (ctx, ref) {\n var v = ref[0];\n var a = ctx.id();\n var b = v.value;\n return (typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === (typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) && a >= b;\n }],\n 'filter-has': [BooleanType, [ValueType], function (ctx, ref) {\n var k = ref[0];\n return k.value in ctx.properties();\n }],\n 'filter-has-id': [BooleanType, [], function (ctx) {\n return ctx.id() !== null && ctx.id() !== undefined;\n }],\n 'filter-type-in': [BooleanType, [array(StringType)], function (ctx, ref) {\n var v = ref[0];\n return v.value.indexOf(ctx.geometryType()) >= 0;\n }],\n 'filter-id-in': [BooleanType, [array(ValueType)], function (ctx, ref) {\n var v = ref[0];\n return v.value.indexOf(ctx.id()) >= 0;\n }],\n 'filter-in-small': [BooleanType, [StringType, array(ValueType)], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n return v.value.indexOf(ctx.properties()[k.value]) >= 0;\n }],\n 'filter-in-large': [BooleanType, [StringType, array(ValueType)], function (ctx, ref) {\n var k = ref[0];\n var v = ref[1];\n return binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1);\n }],\n 'all': {\n type: BooleanType,\n overloads: [[[BooleanType, BooleanType], function (ctx, ref) {\n var a = ref[0];\n var b = ref[1];\n return a.evaluate(ctx) && b.evaluate(ctx);\n }], [varargs(BooleanType), function (ctx, args) {\n for (var i = 0, list = args; i < list.length; i += 1) {\n var arg = list[i];\n if (!arg.evaluate(ctx)) {\n return false;\n }\n }\n return true;\n }]]\n },\n 'any': {\n type: BooleanType,\n overloads: [[[BooleanType, BooleanType], function (ctx, ref) {\n var a = ref[0];\n var b = ref[1];\n return a.evaluate(ctx) || b.evaluate(ctx);\n }], [varargs(BooleanType), function (ctx, args) {\n for (var i = 0, list = args; i < list.length; i += 1) {\n var arg = list[i];\n if (arg.evaluate(ctx)) {\n return true;\n }\n }\n return false;\n }]]\n },\n '!': [BooleanType, [BooleanType], function (ctx, ref) {\n var b = ref[0];\n return !b.evaluate(ctx);\n }],\n 'is-supported-script': [BooleanType, [StringType], function (ctx, ref) {\n var s = ref[0];\n var isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }],\n 'upcase': [StringType, [StringType], function (ctx, ref) {\n var s = ref[0];\n return s.evaluate(ctx).toUpperCase();\n }],\n 'downcase': [StringType, [StringType], function (ctx, ref) {\n var s = ref[0];\n return s.evaluate(ctx).toLowerCase();\n }],\n 'concat': [StringType, varargs(ValueType), function (ctx, args) {\n return args.map(function (arg) {\n return toString$1(arg.evaluate(ctx));\n }).join('');\n }],\n 'resolved-locale': [StringType, [CollatorType], function (ctx, ref) {\n var collator = ref[0];\n return collator.evaluate(ctx).resolvedLocale();\n }]\n});\n\nfunction success(value) {\n return {\n result: 'success',\n value: value\n };\n}\nfunction error(value) {\n return {\n result: 'error',\n value: value\n };\n}\n\nfunction supportsPropertyExpression(spec) {\n return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\nfunction supportsZoomExpression(spec) {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\nfunction supportsInterpolation(spec) {\n return !!spec.expression && spec.expression.interpolated;\n}\n\nfunction getType(val) {\n if (val instanceof Number) {\n return 'number';\n } else if (val instanceof String) {\n return 'string';\n } else if (val instanceof Boolean) {\n return 'boolean';\n } else if (Array.isArray(val)) {\n return 'array';\n } else if (val === null) {\n return 'null';\n } else {\n return typeof val === \"undefined\" ? \"undefined\" : _typeof(val);\n }\n}\n\nfunction isFunction$1(value) {\n return (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === 'object' && value !== null && !Array.isArray(value);\n}\nfunction identityFunction(x) {\n return x;\n}\nfunction createFunction(parameters, propertySpec) {\n var isColor = propertySpec.type === 'color';\n var zoomAndFeatureDependent = parameters.stops && _typeof(parameters.stops[0][0]) === 'object';\n var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n var type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n if (isColor) {\n parameters = extend({}, parameters);\n if (parameters.stops) {\n parameters.stops = parameters.stops.map(function (stop) {\n return [stop[0], Color.parse(stop[1])];\n });\n }\n if (parameters.default) {\n parameters.default = Color.parse(parameters.default);\n } else {\n parameters.default = Color.parse(propertySpec.default);\n }\n }\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {\n throw new Error('Unknown color space: ' + parameters.colorSpace);\n }\n var innerFun;\n var hashedStops;\n var categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n hashedStops = Object.create(null);\n for (var i = 0, list = parameters.stops; i < list.length; i += 1) {\n var stop = list[i];\n hashedStops[stop[0]] = stop[1];\n }\n categoricalKeyType = _typeof(parameters.stops[0][0]);\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error('Unknown function type \"' + type + '\"');\n }\n if (zoomAndFeatureDependent) {\n var featureFunctions = {};\n var zoomStops = [];\n for (var s = 0; s < parameters.stops.length; s++) {\n var stop$1 = parameters.stops[s];\n var zoom = stop$1[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom: zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop$1[0].value, stop$1[1]]);\n }\n var featureFunctionStops = [];\n for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n var z = list$1[i$1];\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n var interpolationType = { name: 'linear' };\n return {\n kind: 'composite',\n interpolationType: interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(function (s) {\n return s[0];\n }),\n evaluate: function evaluate(ref, properties) {\n var zoom = ref.zoom;\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n var interpolationType$1 = type === 'exponential' ? {\n name: 'exponential',\n base: parameters.base !== undefined ? parameters.base : 1\n } : null;\n return {\n kind: 'camera',\n interpolationType: interpolationType$1,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType$1),\n zoomStops: parameters.stops.map(function (s) {\n return s[0];\n }),\n evaluate: function evaluate(ref) {\n var zoom = ref.zoom;\n return innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType);\n }\n };\n } else {\n return {\n kind: 'source',\n evaluate: function evaluate(_, feature) {\n var value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n if (value === undefined) {\n return coalesce(parameters.default, propertySpec.default);\n }\n return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n }\n };\n }\n}\nfunction coalesce(a, b, c) {\n if (a !== undefined) {\n return a;\n }\n if (b !== undefined) {\n return b;\n }\n if (c !== undefined) {\n return c;\n }\n}\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n var evaluated = (typeof input === \"undefined\" ? \"undefined\" : _typeof(input)) === keyType ? hashedStops[input] : undefined;\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n if (getType(input) !== 'number') {\n return coalesce(parameters.default, propertySpec.default);\n }\n var n = parameters.stops.length;\n if (n === 1) {\n return parameters.stops[0][1];\n }\n if (input <= parameters.stops[0][0]) {\n return parameters.stops[0][1];\n }\n if (input >= parameters.stops[n - 1][0]) {\n return parameters.stops[n - 1][1];\n }\n var index = findStopLessThanOrEqualTo(parameters.stops.map(function (stop) {\n return stop[0];\n }), input);\n return parameters.stops[index][1];\n}\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n var base = parameters.base !== undefined ? parameters.base : 1;\n if (getType(input) !== 'number') {\n return coalesce(parameters.default, propertySpec.default);\n }\n var n = parameters.stops.length;\n if (n === 1) {\n return parameters.stops[0][1];\n }\n if (input <= parameters.stops[0][0]) {\n return parameters.stops[0][1];\n }\n if (input >= parameters.stops[n - 1][0]) {\n return parameters.stops[n - 1][1];\n }\n var index = findStopLessThanOrEqualTo(parameters.stops.map(function (stop) {\n return stop[0];\n }), input);\n var t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);\n var outputLower = parameters.stops[index][1];\n var outputUpper = parameters.stops[index + 1][1];\n var interp = interpolate[propertySpec.type] || identityFunction;\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n var colorspace = colorSpaces[parameters.colorSpace];\n interp = function interp(a, b) {\n return colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n };\n }\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate: function evaluate() {\n var args = [],\n len = arguments.length;\n while (len--) {\n args[len] = arguments[len];\n }var evaluatedLower = outputLower.evaluate.apply(undefined, args);\n var evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n return interp(outputLower, outputUpper, t);\n}\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n if (propertySpec.type === 'color') {\n input = Color.parse(input);\n } else if (propertySpec.type === 'formatted') {\n input = Formatted.fromString(input.toString());\n } else if (propertySpec.type === 'resolvedImage') {\n input = ResolvedImage.fromString(input.toString());\n } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n return coalesce(input, parameters.default, propertySpec.default);\n}\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n var difference = upperValue - lowerValue;\n var progress = input - lowerValue;\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nvar StyleExpression = function StyleExpression(expression, propertySpec) {\n this.expression = expression;\n this._warningHistory = {};\n this._evaluator = new EvaluationContext();\n this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n};\nStyleExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n return this.expression.evaluate(this._evaluator);\n};\nStyleExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n try {\n var val = this.expression.evaluate(this._evaluator);\n if (val === null || val === undefined || typeof val === 'number' && val !== val) {\n return this._defaultValue;\n }\n if (this._enumValues && !(val in this._enumValues)) {\n throw new RuntimeError('Expected value to be one of ' + Object.keys(this._enumValues).map(function (v) {\n return JSON.stringify(v);\n }).join(', ') + ', but found ' + JSON.stringify(val) + ' instead.');\n }\n return val;\n } catch (e) {\n if (!this._warningHistory[e.message]) {\n this._warningHistory[e.message] = true;\n if (typeof console !== 'undefined') {\n console.warn(e.message);\n }\n }\n return this._defaultValue;\n }\n};\nfunction isExpression(expression) {\n return Array.isArray(expression) && expression.length > 0 && typeof expression[0] === 'string' && expression[0] in expressions;\n}\nfunction createExpression(expression, propertySpec) {\n var parser = new ParsingContext(expressions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n var parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined);\n if (!parsed) {\n return error(parser.errors);\n }\n return success(new StyleExpression(parsed, propertySpec));\n}\nvar ZoomConstantExpression = function ZoomConstantExpression(kind, expression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);\n};\nZoomConstantExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomConstantExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nvar ZoomDependentExpression = function ZoomDependentExpression(kind, expression, zoomStops, interpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n};\nZoomDependentExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.interpolationFactor = function interpolationFactor(input, lower, upper) {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n};\nfunction createPropertyExpression(expression, propertySpec) {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n var parsed = expression.value.expression;\n var isFeatureConstant$1 = isFeatureConstant(parsed);\n if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n var isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n var zoomCurve = findZoomCurve(parsed);\n if (!zoomCurve && !isZoomConstant) {\n return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n } else if (zoomCurve instanceof ParsingError) {\n return error([zoomCurve]);\n } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n }\n if (!zoomCurve) {\n return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpression('source', expression.value));\n }\n var interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType));\n}\nvar StylePropertyFunction = function StylePropertyFunction(parameters, specification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n};\nStylePropertyFunction.deserialize = function deserialize(serialized) {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n};\nStylePropertyFunction.serialize = function serialize(input) {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n};\nfunction normalizePropertyExpression(value, specification) {\n if (isFunction$1(value)) {\n return new StylePropertyFunction(value, specification);\n } else if (isExpression(value)) {\n var expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n throw new Error(expression.value.map(function (err) {\n return err.key + ': ' + err.message;\n }).join(', '));\n }\n return expression.value;\n } else {\n var constant = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: function evaluate() {\n return constant;\n }\n };\n }\n}\nfunction findZoomCurve(expression) {\n var result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n } else if (expression instanceof Coalesce) {\n for (var i = 0, list = expression.args; i < list.length; i += 1) {\n var arg = list[i];\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n } else if ((expression instanceof Step || expression instanceof Interpolate) && expression.input instanceof CompoundExpression && expression.input.name === 'zoom') {\n result = expression;\n }\n if (result instanceof ParsingError) {\n return result;\n }\n expression.eachChild(function (child) {\n var childResult = findZoomCurve(child);\n if (childResult instanceof ParsingError) {\n result = childResult;\n } else if (!result && childResult) {\n result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n } else if (result && childResult && result !== childResult) {\n result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n return result;\n}\nfunction getExpectedType(spec) {\n var types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n return types[spec.type];\n}\nfunction getDefaultValue(spec) {\n if (spec.type === 'color' && isFunction$1(spec.default)) {\n return new Color(0, 0, 0, 0);\n } else if (spec.type === 'color') {\n return Color.parse(spec.default) || null;\n } else if (spec.default === undefined) {\n return null;\n } else {\n return spec.default;\n }\n}\n\nfunction convertLiteral(value) {\n return (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === 'object' ? ['literal', value] : value;\n}\nfunction convertFunction(parameters, propertySpec) {\n var stops = parameters.stops;\n if (!stops) {\n return convertIdentityFunction(parameters, propertySpec);\n }\n var zoomAndFeatureDependent = stops && _typeof(stops[0][0]) === 'object';\n var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n stops = stops.map(function (stop) {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], convertLiteral(stop[1])];\n });\n if (zoomAndFeatureDependent) {\n return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n } else if (zoomDependent) {\n return convertZoomFunction(parameters, propertySpec, stops);\n } else {\n return convertPropertyFunction(parameters, propertySpec, stops);\n }\n}\nfunction convertIdentityFunction(parameters, propertySpec) {\n var get = ['get', parameters.property];\n if (parameters.default === undefined) {\n return propertySpec.type === 'string' ? ['string', get] : get;\n } else if (propertySpec.type === 'enum') {\n return ['match', get, Object.keys(propertySpec.values), get, parameters.default];\n } else {\n var expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl':\n return 'interpolate-hcl';\n case 'lab':\n return 'interpolate-lab';\n default:\n return 'interpolate';\n }\n}\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n var featureFunctionParameters = {};\n var featureFunctionStops = {};\n var zoomStops = [];\n for (var s = 0; s < stops.length; s++) {\n var stop = stops[s];\n var zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n zoom: zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default\n };\n featureFunctionStops[zoom] = [];\n zoomStops.push(zoom);\n }\n featureFunctionStops[zoom].push([stop[0].value, stop[1]]);\n }\n var functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n var expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n for (var i = 0, list = zoomStops; i < list.length; i += 1) {\n var z = list[i];\n var output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n return expression;\n } else {\n var expression$1 = ['step', ['zoom']];\n for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n var z$1 = list$1[i$1];\n var output$1 = convertPropertyFunction(featureFunctionParameters[z$1], propertySpec, featureFunctionStops[z$1]);\n appendStopPair(expression$1, z$1, output$1, true);\n }\n fixupDegenerateStepCurve(expression$1);\n return expression$1;\n }\n}\nfunction coalesce$1(a, b) {\n if (a !== undefined) {\n return a;\n }\n if (b !== undefined) {\n return b;\n }\n}\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n var type = getFunctionType(parameters, propertySpec);\n var get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n var expression = ['case'];\n for (var i = 0, list = stops; i < list.length; i += 1) {\n var stop = list[i];\n expression.push(['==', get, stop[0]], stop[1]);\n }\n expression.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n return expression;\n } else if (type === 'categorical') {\n var expression$1 = ['match', get];\n for (var i$1 = 0, list$1 = stops; i$1 < list$1.length; i$1 += 1) {\n var stop$1 = list$1[i$1];\n appendStopPair(expression$1, stop$1[0], stop$1[1], false);\n }\n expression$1.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n return expression$1;\n } else if (type === 'interval') {\n var expression$2 = ['step', ['number', get]];\n for (var i$2 = 0, list$2 = stops; i$2 < list$2.length; i$2 += 1) {\n var stop$2 = list$2[i$2];\n appendStopPair(expression$2, stop$2[0], stop$2[1], true);\n }\n fixupDegenerateStepCurve(expression$2);\n return parameters.default === undefined ? expression$2 : ['case', ['==', ['typeof', get], 'number'], expression$2, convertLiteral(parameters.default)];\n } else if (type === 'exponential') {\n var base = parameters.base !== undefined ? parameters.base : 1;\n var expression$3 = [getInterpolateOperator(parameters), base === 1 ? ['linear'] : ['exponential', base], ['number', get]];\n for (var i$3 = 0, list$3 = stops; i$3 < list$3.length; i$3 += 1) {\n var stop$3 = list$3[i$3];\n appendStopPair(expression$3, stop$3[0], stop$3[1], false);\n }\n return parameters.default === undefined ? expression$3 : ['case', ['==', ['typeof', get], 'number'], expression$3, convertLiteral(parameters.default)];\n } else {\n throw new Error('Unknown property function type ' + type);\n }\n}\nfunction convertZoomFunction(parameters, propertySpec, stops, input) {\n if (input === void 0) input = ['zoom'];\n var type = getFunctionType(parameters, propertySpec);\n var expression;\n var isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n var base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? ['linear'] : ['exponential', base], input];\n } else {\n throw new Error('Unknown zoom function type \"' + type + '\"');\n }\n for (var i = 0, list = stops; i < list.length; i += 1) {\n var stop = list[i];\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n fixupDegenerateStepCurve(expression);\n return expression;\n}\nfunction fixupDegenerateStepCurve(expression) {\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\nfunction appendStopPair(curve, input, output, isStep) {\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n return propertySpec.expression.interpolated ? 'exponential' : 'interval';\n }\n}\nfunction convertTokenString(s) {\n var result = ['concat'];\n var re = /{([^{}]+)}/g;\n var pos = 0;\n for (var match = re.exec(s); match !== null; match = re.exec(s)) {\n var literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) {\n result.push(literal);\n }\n result.push(['get', match[1]]);\n }\n if (result.length === 1) {\n return s;\n }\n if (pos < s.length) {\n result.push(s.slice(pos));\n } else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n return result;\n}\n\nfunction isExpressionFilter(filter) {\n if (filter === true || filter === false) {\n return true;\n }\n if (!Array.isArray(filter) || filter.length === 0) {\n return false;\n }\n switch (filter[0]) {\n case 'has':\n return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n case '!in':\n case '!has':\n case 'none':\n return false;\n case '==':\n case '!=':\n case '>':\n case '>=':\n case '<':\n case '<=':\n return filter.length !== 3 || Array.isArray(filter[1]) || Array.isArray(filter[2]);\n case 'any':\n case 'all':\n for (var i = 0, list = filter.slice(1); i < list.length; i += 1) {\n var f = list[i];\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n default:\n return true;\n }\n}\nvar filterSpec = {\n 'type': 'boolean',\n 'default': false,\n 'transition': false,\n 'property-type': 'data-driven',\n 'expression': {\n 'interpolated': false,\n 'parameters': ['zoom', 'feature']\n }\n};\nfunction createFilter(filter) {\n if (filter === null || filter === undefined) {\n return {\n filter: function filter() {\n return true;\n },\n needGeometry: false\n };\n }\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n var compiled = createExpression(filter, filterSpec);\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map(function (err) {\n return err.key + ': ' + err.message;\n }).join(', '));\n } else {\n var needGeometry = geometryNeeded(filter);\n return {\n filter: function filter(globalProperties, feature, canonical) {\n return compiled.value.evaluate(globalProperties, feature, {}, canonical);\n },\n needGeometry: needGeometry\n };\n }\n}\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) {\n return false;\n }\n if (filter[0] === 'within') {\n return true;\n }\n for (var index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) {\n return true;\n }\n }\n return false;\n}\nfunction convertFilter(filter) {\n if (!filter) {\n return true;\n }\n var op = filter[0];\n if (filter.length <= 1) {\n return op !== 'any';\n }\n var converted = op === '==' ? convertComparisonOp(filter[1], filter[2], '==') : op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || op === '>=' ? convertComparisonOp(filter[1], filter[2], op) : op === 'any' ? convertDisjunctionOp(filter.slice(1)) : op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) : op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) : op === 'in' ? convertInOp(filter[1], filter.slice(2)) : op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) : op === 'has' ? convertHasOp(filter[1]) : op === '!has' ? convertNegation(convertHasOp(filter[1])) : op === 'within' ? filter : true;\n return converted;\n}\nfunction convertComparisonOp(property, value, op) {\n switch (property) {\n case '$type':\n return ['filter-type-' + op, value];\n case '$id':\n return ['filter-id-' + op, value];\n default:\n return ['filter-' + op, property, value];\n }\n}\nfunction convertDisjunctionOp(filters) {\n return ['any'].concat(filters.map(convertFilter));\n}\nfunction convertInOp(property, values) {\n if (values.length === 0) {\n return false;\n }\n switch (property) {\n case '$type':\n return ['filter-type-in', ['literal', values]];\n case '$id':\n return ['filter-id-in', ['literal', values]];\n default:\n if (values.length > 200 && !values.some(function (v) {\n return (typeof v === \"undefined\" ? \"undefined\" : _typeof(v)) !== _typeof(values[0]);\n })) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\nfunction convertHasOp(property) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return ['filter-has-id'];\n default:\n return ['filter-has', property];\n }\n}\nfunction convertNegation(filter) {\n return ['!', filter];\n}\n\nfunction convertFilter$1(filter) {\n return _convertFilter(filter, {});\n}\nfunction _convertFilter(filter, expectedTypes) {\n var ref$1;\n if (isExpressionFilter(filter)) {\n return filter;\n }\n if (!filter) {\n return true;\n }\n var op = filter[0];\n if (filter.length <= 1) {\n return op !== 'any';\n }\n var converted;\n if (op === '==' || op === '!=' || op === '<' || op === '>' || op === '<=' || op === '>=') {\n var ref = filter;\n var property = ref[1];\n var value = ref[2];\n converted = convertComparisonOp$1(property, value, op, expectedTypes);\n } else if (op === 'any') {\n var children = filter.slice(1).map(function (f) {\n var types = {};\n var child = _convertFilter(f, types);\n var typechecks = runtimeTypeChecks(types);\n return typechecks === true ? child : ['case', typechecks, child, false];\n });\n return ['any'].concat(children);\n } else if (op === 'all') {\n var children$1 = filter.slice(1).map(function (f) {\n return _convertFilter(f, expectedTypes);\n });\n return children$1.length > 1 ? ['all'].concat(children$1) : (ref$1 = []).concat.apply(ref$1, children$1);\n } else if (op === 'none') {\n return ['!', _convertFilter(['any'].concat(filter.slice(1)), {})];\n } else if (op === 'in') {\n converted = convertInOp$1(filter[1], filter.slice(2));\n } else if (op === '!in') {\n converted = convertInOp$1(filter[1], filter.slice(2), true);\n } else if (op === 'has') {\n converted = convertHasOp$1(filter[1]);\n } else if (op === '!has') {\n converted = ['!', convertHasOp$1(filter[1])];\n } else {\n converted = true;\n }\n return converted;\n}\nfunction runtimeTypeChecks(expectedTypes) {\n var conditions = [];\n for (var property in expectedTypes) {\n var get = property === '$id' ? ['id'] : ['get', property];\n conditions.push(['==', ['typeof', get], expectedTypes[property]]);\n }\n if (conditions.length === 0) {\n return true;\n }\n if (conditions.length === 1) {\n return conditions[0];\n }\n return ['all'].concat(conditions);\n}\nfunction convertComparisonOp$1(property, value, op, expectedTypes) {\n var get;\n if (property === '$type') {\n return [op, ['geometry-type'], value];\n } else if (property === '$id') {\n get = ['id'];\n } else {\n get = ['get', property];\n }\n if (expectedTypes && value !== null) {\n var type = typeof value === \"undefined\" ? \"undefined\" : _typeof(value);\n expectedTypes[property] = type;\n }\n if (op === '==' && property !== '$id' && value === null) {\n return ['all', ['has', property], ['==', get, null]];\n } else if (op === '!=' && property !== '$id' && value === null) {\n return ['any', ['!', ['has', property]], ['!=', get, null]];\n }\n return [op, get, value];\n}\nfunction convertInOp$1(property, values, negate) {\n if (negate === void 0) negate = false;\n if (values.length === 0) {\n return negate;\n }\n var get;\n if (property === '$type') {\n get = ['geometry-type'];\n } else if (property === '$id') {\n get = ['id'];\n } else {\n get = ['get', property];\n }\n var uniformTypes = true;\n var type = _typeof(values[0]);\n for (var i = 0, list = values; i < list.length; i += 1) {\n var value = list[i];\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) !== type) {\n uniformTypes = false;\n break;\n }\n }\n if (uniformTypes && (type === 'string' || type === 'number')) {\n var uniqueValues = values.sort().filter(function (v, i) {\n return i === 0 || values[i - 1] !== v;\n });\n return ['match', get, uniqueValues, !negate, negate];\n }\n return [negate ? 'all' : 'any'].concat(values.map(function (v) {\n return [negate ? '!=' : '==', get, v];\n }));\n}\nfunction convertHasOp$1(property) {\n if (property === '$type') {\n return true;\n } else if (property === '$id') {\n return ['!=', ['id'], null];\n } else {\n return ['has', property];\n }\n}\n\nfunction migrateToExpressions(style) {\n var converted = [];\n eachLayer(style, function (layer) {\n if (layer.filter) {\n layer.filter = convertFilter$1(layer.filter);\n }\n });\n eachProperty(style, {\n paint: true,\n layout: true\n }, function (ref) {\n var path = ref.path;\n var value = ref.value;\n var reference = ref.reference;\n var set = ref.set;\n if (isExpression(value)) {\n return;\n }\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === 'object' && !Array.isArray(value)) {\n set(convertFunction(value, reference));\n converted.push(path.join('.'));\n } else if (reference.tokens && typeof value === 'string') {\n set(convertTokenString(value));\n }\n });\n return style;\n}\n\nfunction migrate(style) {\n var migrated = false;\n if (style.version === 7) {\n style = migrateToV8(style);\n migrated = true;\n }\n if (style.version === 8) {\n migrated = migrateToExpressions(style);\n migrated = true;\n }\n if (!migrated) {\n throw new Error('cannot migrate from', style.version);\n }\n return style;\n}\n\nfunction composite(style) {\n var styleIDs = [];\n var sourceIDs = [];\n var compositedSourceLayers = [];\n for (var id in style.sources) {\n var source = style.sources[id];\n if (source.type !== 'vector') {\n continue;\n }\n var match = /^mapbox:\\/\\/(.*)/.exec(source.url);\n if (!match) {\n continue;\n }\n styleIDs.push(id);\n sourceIDs.push(match[1]);\n }\n if (styleIDs.length < 2) {\n return style;\n }\n styleIDs.forEach(function (id) {\n delete style.sources[id];\n });\n var compositeID = sourceIDs.join(',');\n style.sources[compositeID] = {\n 'type': 'vector',\n 'url': 'mapbox://' + compositeID\n };\n style.layers.forEach(function (layer) {\n if (styleIDs.indexOf(layer.source) >= 0) {\n layer.source = compositeID;\n if ('source-layer' in layer) {\n if (compositedSourceLayers.indexOf(layer['source-layer']) >= 0) {\n throw new Error('Conflicting source layer names');\n } else {\n compositedSourceLayers.push(layer['source-layer']);\n }\n }\n }\n });\n return style;\n}\n\nvar refProperties = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n\nfunction deref(layer, parent) {\n var result = {};\n for (var k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n refProperties.forEach(function (k) {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n return result;\n}\nfunction derefLayers(layers) {\n layers = layers.slice();\n var map = Object.create(null);\n for (var i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n for (var i$1 = 0; i$1 < layers.length; i$1++) {\n if ('ref' in layers[i$1]) {\n layers[i$1] = deref(layers[i$1], map[layers[i$1].ref]);\n }\n }\n return layers;\n}\n\nfunction deepEqual(a, b) {\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if ((typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === 'object' && a !== null && b !== null) {\n if (!((typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) === 'object')) {\n return false;\n }\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false;\n }\n for (var key in a) {\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a === b;\n}\n\nvar operations = {\n setStyle: 'setStyle',\n addLayer: 'addLayer',\n removeLayer: 'removeLayer',\n setPaintProperty: 'setPaintProperty',\n setLayoutProperty: 'setLayoutProperty',\n setFilter: 'setFilter',\n addSource: 'addSource',\n removeSource: 'removeSource',\n setGeoJSONSourceData: 'setGeoJSONSourceData',\n setLayerZoomRange: 'setLayerZoomRange',\n setLayerProperty: 'setLayerProperty',\n setCenter: 'setCenter',\n setZoom: 'setZoom',\n setBearing: 'setBearing',\n setPitch: 'setPitch',\n setSprite: 'setSprite',\n setGlyphs: 'setGlyphs',\n setTransition: 'setTransition',\n setLight: 'setLight'\n};\nfunction addSource(sourceId, after, commands) {\n commands.push({\n command: operations.addSource,\n args: [sourceId, after[sourceId]]\n });\n}\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n commands.push({\n command: operations.removeSource,\n args: [sourceId]\n });\n sourcesRemoved[sourceId] = true;\n}\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n removeSource(sourceId, commands, sourcesRemoved);\n addSource(sourceId, after, commands);\n}\nfunction canUpdateGeoJSON(before, after, sourceId) {\n var prop;\n for (prop in before[sourceId]) {\n if (!before[sourceId].hasOwnProperty(prop)) {\n continue;\n }\n if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n for (prop in after[sourceId]) {\n if (!after[sourceId].hasOwnProperty(prop)) {\n continue;\n }\n if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n return true;\n}\nfunction diffSources(before, after, commands, sourcesRemoved) {\n before = before || {};\n after = after || {};\n var sourceId;\n for (sourceId in before) {\n if (!before.hasOwnProperty(sourceId)) {\n continue;\n }\n if (!after.hasOwnProperty(sourceId)) {\n removeSource(sourceId, commands, sourcesRemoved);\n }\n }\n for (sourceId in after) {\n if (!after.hasOwnProperty(sourceId)) {\n continue;\n }\n if (!before.hasOwnProperty(sourceId)) {\n addSource(sourceId, after, commands);\n } else if (!deepEqual(before[sourceId], after[sourceId])) {\n if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n commands.push({\n command: operations.setGeoJSONSourceData,\n args: [sourceId, after[sourceId].data]\n });\n } else {\n updateSource(sourceId, after, commands, sourcesRemoved);\n }\n }\n }\n}\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n before = before || {};\n after = after || {};\n var prop;\n for (prop in before) {\n if (!before.hasOwnProperty(prop)) {\n continue;\n }\n if (!deepEqual(before[prop], after[prop])) {\n commands.push({\n command: command,\n args: [layerId, prop, after[prop], klass]\n });\n }\n }\n for (prop in after) {\n if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop)) {\n continue;\n }\n if (!deepEqual(before[prop], after[prop])) {\n commands.push({\n command: command,\n args: [layerId, prop, after[prop], klass]\n });\n }\n }\n}\nfunction pluckId(layer) {\n return layer.id;\n}\nfunction indexById(group, layer) {\n group[layer.id] = layer;\n return group;\n}\nfunction diffLayers(before, after, commands) {\n before = before || [];\n after = after || [];\n var beforeOrder = before.map(pluckId);\n var afterOrder = after.map(pluckId);\n var beforeIndex = before.reduce(indexById, {});\n var afterIndex = after.reduce(indexById, {});\n var tracker = beforeOrder.slice();\n var clean = Object.create(null);\n var i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n for (i = 0, d = 0; i < beforeOrder.length; i++) {\n layerId = beforeOrder[i];\n if (!afterIndex.hasOwnProperty(layerId)) {\n commands.push({\n command: operations.removeLayer,\n args: [layerId]\n });\n tracker.splice(tracker.indexOf(layerId, d), 1);\n } else {\n d++;\n }\n }\n for (i = 0, d = 0; i < afterOrder.length; i++) {\n layerId = afterOrder[afterOrder.length - 1 - i];\n if (tracker[tracker.length - 1 - i] === layerId) {\n continue;\n }\n if (beforeIndex.hasOwnProperty(layerId)) {\n commands.push({\n command: operations.removeLayer,\n args: [layerId]\n });\n tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n } else {\n d++;\n }\n insertBeforeLayerId = tracker[tracker.length - i];\n commands.push({\n command: operations.addLayer,\n args: [afterIndex[layerId], insertBeforeLayerId]\n });\n tracker.splice(tracker.length - i, 0, layerId);\n clean[layerId] = true;\n }\n for (i = 0; i < afterOrder.length; i++) {\n layerId = afterOrder[i];\n beforeLayer = beforeIndex[layerId];\n afterLayer = afterIndex[layerId];\n if (clean[layerId] || deepEqual(beforeLayer, afterLayer)) {\n continue;\n }\n if (!deepEqual(beforeLayer.source, afterLayer.source) || !deepEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !deepEqual(beforeLayer.type, afterLayer.type)) {\n commands.push({\n command: operations.removeLayer,\n args: [layerId]\n });\n insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n commands.push({\n command: operations.addLayer,\n args: [afterLayer, insertBeforeLayerId]\n });\n continue;\n }\n diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {\n commands.push({\n command: operations.setFilter,\n args: [layerId, afterLayer.filter]\n });\n }\n if (!deepEqual(beforeLayer.minzoom, afterLayer.minzoom) || !deepEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n commands.push({\n command: operations.setLayerZoomRange,\n args: [layerId, afterLayer.minzoom, afterLayer.maxzoom]\n });\n }\n for (prop in beforeLayer) {\n if (!beforeLayer.hasOwnProperty(prop)) {\n continue;\n }\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') {\n continue;\n }\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({\n command: operations.setLayerProperty,\n args: [layerId, prop, afterLayer[prop]]\n });\n }\n }\n for (prop in afterLayer) {\n if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) {\n continue;\n }\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') {\n continue;\n }\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({\n command: operations.setLayerProperty,\n args: [layerId, prop, afterLayer[prop]]\n });\n }\n }\n }\n}\nfunction diffStyles(before, after) {\n if (!before) {\n return [{\n command: operations.setStyle,\n args: [after]\n }];\n }\n var commands = [];\n try {\n if (!deepEqual(before.version, after.version)) {\n return [{\n command: operations.setStyle,\n args: [after]\n }];\n }\n if (!deepEqual(before.center, after.center)) {\n commands.push({\n command: operations.setCenter,\n args: [after.center]\n });\n }\n if (!deepEqual(before.zoom, after.zoom)) {\n commands.push({\n command: operations.setZoom,\n args: [after.zoom]\n });\n }\n if (!deepEqual(before.bearing, after.bearing)) {\n commands.push({\n command: operations.setBearing,\n args: [after.bearing]\n });\n }\n if (!deepEqual(before.pitch, after.pitch)) {\n commands.push({\n command: operations.setPitch,\n args: [after.pitch]\n });\n }\n if (!deepEqual(before.sprite, after.sprite)) {\n commands.push({\n command: operations.setSprite,\n args: [after.sprite]\n });\n }\n if (!deepEqual(before.glyphs, after.glyphs)) {\n commands.push({\n command: operations.setGlyphs,\n args: [after.glyphs]\n });\n }\n if (!deepEqual(before.transition, after.transition)) {\n commands.push({\n command: operations.setTransition,\n args: [after.transition]\n });\n }\n if (!deepEqual(before.light, after.light)) {\n commands.push({\n command: operations.setLight,\n args: [after.light]\n });\n }\n var sourcesRemoved = {};\n var removeOrAddSourceCommands = [];\n diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n var beforeLayers = [];\n if (before.layers) {\n before.layers.forEach(function (layer) {\n if (sourcesRemoved[layer.source]) {\n commands.push({\n command: operations.removeLayer,\n args: [layer.id]\n });\n } else {\n beforeLayers.push(layer);\n }\n });\n }\n commands = commands.concat(removeOrAddSourceCommands);\n diffLayers(beforeLayers, after.layers, commands);\n } catch (e) {\n console.warn('Unable to compute style diff:', e);\n commands = [{\n command: operations.setStyle,\n args: [after]\n }];\n }\n return commands;\n}\n\nvar ValidationError = function ValidationError(key, value, message, identifier) {\n this.message = (key ? key + ': ' : '') + message;\n if (identifier) {\n this.identifier = identifier;\n }\n if (value !== null && value !== undefined && value.__line__) {\n this.line = value.__line__;\n }\n};\n\nvar ParsingError$1 = function ParsingError(error) {\n this.error = error;\n this.message = error.message;\n var match = error.message.match(/line (\\d+)/);\n this.line = match ? parseInt(match[1], 10) : 0;\n};\n\nfunction validateConstants(options) {\n var key = options.key;\n var constants = options.value;\n if (constants) {\n return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n } else {\n return [];\n }\n}\n\nfunction unbundle(value) {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\nfunction deepUnbundle(value) {\n if (Array.isArray(value)) {\n return value.map(deepUnbundle);\n } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n var unbundledValue = {};\n for (var key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n return unbundle(value);\n}\n\nfunction validateObject(options) {\n var key = options.key;\n var object = options.value;\n var elementSpecs = options.valueSpec || {};\n var elementValidators = options.objectElementValidators || {};\n var style = options.style;\n var styleSpec = options.styleSpec;\n var errors = [];\n var type = getType(object);\n if (type !== 'object') {\n return [new ValidationError(key, object, 'object expected, ' + type + ' found')];\n }\n for (var objectKey in object) {\n var elementSpecKey = objectKey.split('.')[0];\n var elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n var validateElement = void 0;\n if (elementValidators[elementSpecKey]) {\n validateElement = elementValidators[elementSpecKey];\n } else if (elementSpecs[elementSpecKey]) {\n validateElement = validate;\n } else if (elementValidators['*']) {\n validateElement = elementValidators['*'];\n } else if (elementSpecs['*']) {\n validateElement = validate;\n } else {\n errors.push(new ValidationError(key, object[objectKey], 'unknown property \"' + objectKey + '\"'));\n continue;\n }\n errors = errors.concat(validateElement({\n key: (key ? key + '.' : key) + objectKey,\n value: object[objectKey],\n valueSpec: elementSpec,\n style: style,\n styleSpec: styleSpec,\n object: object,\n objectKey: objectKey\n }, object));\n }\n for (var elementSpecKey$1 in elementSpecs) {\n if (elementValidators[elementSpecKey$1]) {\n continue;\n }\n if (elementSpecs[elementSpecKey$1].required && elementSpecs[elementSpecKey$1]['default'] === undefined && object[elementSpecKey$1] === undefined) {\n errors.push(new ValidationError(key, object, 'missing required property \"' + elementSpecKey$1 + '\"'));\n }\n }\n return errors;\n}\n\nfunction validateArray(options) {\n var array = options.value;\n var arraySpec = options.valueSpec;\n var style = options.style;\n var styleSpec = options.styleSpec;\n var key = options.key;\n var validateArrayElement = options.arrayElementValidator || validate;\n if (getType(array) !== 'array') {\n return [new ValidationError(key, array, 'array expected, ' + getType(array) + ' found')];\n }\n if (arraySpec.length && array.length !== arraySpec.length) {\n return [new ValidationError(key, array, 'array length ' + arraySpec.length + ' expected, length ' + array.length + ' found')];\n }\n if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n return [new ValidationError(key, array, 'array length at least ' + arraySpec['min-length'] + ' expected, length ' + array.length + ' found')];\n }\n var arrayElementSpec = {\n 'type': arraySpec.value,\n 'values': arraySpec.values\n };\n if (styleSpec.$version < 7) {\n arrayElementSpec.function = arraySpec.function;\n }\n if (getType(arraySpec.value) === 'object') {\n arrayElementSpec = arraySpec.value;\n }\n var errors = [];\n for (var i = 0; i < array.length; i++) {\n errors = errors.concat(validateArrayElement({\n array: array,\n arrayIndex: i,\n value: array[i],\n valueSpec: arrayElementSpec,\n style: style,\n styleSpec: styleSpec,\n key: key + '[' + i + ']'\n }));\n }\n return errors;\n}\n\nfunction validateNumber(options) {\n var key = options.key;\n var value = options.value;\n var valueSpec = options.valueSpec;\n var type = getType(value);\n if (type === 'number' && value !== value) {\n type = 'NaN';\n }\n if (type !== 'number') {\n return [new ValidationError(key, value, 'number expected, ' + type + ' found')];\n }\n if ('minimum' in valueSpec && value < valueSpec.minimum) {\n return [new ValidationError(key, value, value + ' is less than the minimum value ' + valueSpec.minimum)];\n }\n if ('maximum' in valueSpec && value > valueSpec.maximum) {\n return [new ValidationError(key, value, value + ' is greater than the maximum value ' + valueSpec.maximum)];\n }\n return [];\n}\n\nfunction validateFunction(options) {\n var functionValueSpec = options.valueSpec;\n var functionType = unbundle(options.value.type);\n var stopKeyType;\n var stopDomainValues = {};\n var previousStopDomainValue;\n var previousStopDomainZoom;\n var isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n var isPropertyFunction = !isZoomFunction;\n var isZoomAndPropertyFunction = getType(options.value.stops) === 'array' && getType(options.value.stops[0]) === 'array' && getType(options.value.stops[0][0]) === 'object';\n var errors = validateObject({\n key: options.key,\n value: options.value,\n valueSpec: options.styleSpec.function,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n stops: validateFunctionStops,\n default: validateFunctionDefault\n }\n });\n if (functionType === 'identity' && isZoomFunction) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n }\n if (functionType !== 'identity' && !options.value.stops) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n }\n if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n }\n if (options.styleSpec.$version >= 8) {\n if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n }\n }\n if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n }\n return errors;\n function validateFunctionStops(options) {\n if (functionType === 'identity') {\n return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n }\n var errors = [];\n var value = options.value;\n errors = errors.concat(validateArray({\n key: options.key,\n value: value,\n valueSpec: options.valueSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n arrayElementValidator: validateFunctionStop\n }));\n if (getType(value) === 'array' && value.length === 0) {\n errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n }\n return errors;\n }\n function validateFunctionStop(options) {\n var errors = [];\n var value = options.value;\n var key = options.key;\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n }\n if (value.length !== 2) {\n return [new ValidationError(key, value, 'array length 2 expected, length ' + value.length + ' found')];\n }\n if (isZoomAndPropertyFunction) {\n if (getType(value[0]) !== 'object') {\n return [new ValidationError(key, value, 'object expected, ' + getType(value[0]) + ' found')];\n }\n if (value[0].zoom === undefined) {\n return [new ValidationError(key, value, 'object stop key must have zoom')];\n }\n if (value[0].value === undefined) {\n return [new ValidationError(key, value, 'object stop key must have value')];\n }\n if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n }\n if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n previousStopDomainZoom = unbundle(value[0].zoom);\n previousStopDomainValue = undefined;\n stopDomainValues = {};\n }\n errors = errors.concat(validateObject({\n key: key + '[0]',\n value: value[0],\n valueSpec: { zoom: {} },\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n zoom: validateNumber,\n value: validateStopDomainValue\n }\n }));\n } else {\n errors = errors.concat(validateStopDomainValue({\n key: key + '[0]',\n value: value[0],\n valueSpec: {},\n style: options.style,\n styleSpec: options.styleSpec\n }, value));\n }\n if (isExpression(deepUnbundle(value[1]))) {\n return errors.concat([new ValidationError(key + '[1]', value[1], 'expressions are not allowed in function stops.')]);\n }\n return errors.concat(validate({\n key: key + '[1]',\n value: value[1],\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n function validateStopDomainValue(options, stop) {\n var type = getType(options.value);\n var value = unbundle(options.value);\n var reportValue = options.value !== null ? options.value : stop;\n if (!stopKeyType) {\n stopKeyType = type;\n } else if (type !== stopKeyType) {\n return [new ValidationError(options.key, reportValue, type + ' stop domain type must match previous stop domain type ' + stopKeyType)];\n }\n if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n }\n if (type !== 'number' && functionType !== 'categorical') {\n var message = 'number expected, ' + type + ' found';\n if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n }\n return [new ValidationError(options.key, reportValue, message)];\n }\n if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n return [new ValidationError(options.key, reportValue, 'integer expected, found ' + value)];\n }\n if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n } else {\n previousStopDomainValue = value;\n }\n if (functionType === 'categorical' && value in stopDomainValues) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n } else {\n stopDomainValues[value] = true;\n }\n return [];\n }\n function validateFunctionDefault(options) {\n return validate({\n key: options.key,\n value: options.value,\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n });\n }\n}\n\nfunction validateExpression(options) {\n var expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n if (expression.result === 'error') {\n return expression.value.map(function (error) {\n return new ValidationError('' + options.key + error.key, options.value, error.message);\n });\n }\n var expressionObj = expression.value.expression || expression.value._styleExpression.expression;\n if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && !expressionObj.outputDefined()) {\n return [new ValidationError(options.key, options.value, 'Invalid data expression for \"' + options.propertyKey + '\". Output values must be contained as literals within the expression.')];\n }\n if (options.expressionContext === 'property' && options.propertyType === 'layout' && !isStateConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n }\n if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n }\n if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n if (!isGlobalPropertyConstant(expressionObj, ['zoom', 'feature-state'])) {\n return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n }\n if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')];\n }\n }\n return [];\n}\n\nfunction validateBoolean(options) {\n var value = options.value;\n var key = options.key;\n var type = getType(value);\n if (type !== 'boolean') {\n return [new ValidationError(key, value, 'boolean expected, ' + type + ' found')];\n }\n return [];\n}\n\nfunction validateColor(options) {\n var key = options.key;\n var value = options.value;\n var type = getType(value);\n if (type !== 'string') {\n return [new ValidationError(key, value, 'color expected, ' + type + ' found')];\n }\n if (csscolorparser_1(value) === null) {\n return [new ValidationError(key, value, 'color expected, \"' + value + '\" found')];\n }\n return [];\n}\n\nfunction validateEnum(options) {\n var key = options.key;\n var value = options.value;\n var valueSpec = options.valueSpec;\n var errors = [];\n if (Array.isArray(valueSpec.values)) {\n if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, 'expected one of [' + valueSpec.values.join(', ') + '], ' + JSON.stringify(value) + ' found'));\n }\n } else {\n if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, 'expected one of [' + Object.keys(valueSpec.values).join(', ') + '], ' + JSON.stringify(value) + ' found'));\n }\n }\n return errors;\n}\n\nfunction validateFilter(options) {\n if (isExpressionFilter(deepUnbundle(options.value))) {\n return validateExpression(extend({}, options, {\n expressionContext: 'filter',\n valueSpec: { value: 'boolean' }\n }));\n } else {\n return validateNonExpressionFilter(options);\n }\n}\nfunction validateNonExpressionFilter(options) {\n var value = options.value;\n var key = options.key;\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n }\n var styleSpec = options.styleSpec;\n var type;\n var errors = [];\n if (value.length < 1) {\n return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n }\n errors = errors.concat(validateEnum({\n key: key + '[0]',\n value: value[0],\n valueSpec: styleSpec.filter_operator,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n switch (unbundle(value[0])) {\n case '<':\n case '<=':\n case '>':\n case '>=':\n if (value.length >= 2 && unbundle(value[1]) === '$type') {\n errors.push(new ValidationError(key, value, '\"$type\" cannot be use with operator \"' + value[0] + '\"'));\n }\n case '==':\n case '!=':\n if (value.length !== 3) {\n errors.push(new ValidationError(key, value, 'filter array for operator \"' + value[0] + '\" must have 3 elements'));\n }\n case 'in':\n case '!in':\n if (value.length >= 2) {\n type = getType(value[1]);\n if (type !== 'string') {\n errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n }\n }\n for (var i = 2; i < value.length; i++) {\n type = getType(value[i]);\n if (unbundle(value[1]) === '$type') {\n errors = errors.concat(validateEnum({\n key: key + '[' + i + ']',\n value: value[i],\n valueSpec: styleSpec.geometry_type,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n errors.push(new ValidationError(key + '[' + i + ']', value[i], 'string, number, or boolean expected, ' + type + ' found'));\n }\n }\n break;\n case 'any':\n case 'all':\n case 'none':\n for (var i$1 = 1; i$1 < value.length; i$1++) {\n errors = errors.concat(validateNonExpressionFilter({\n key: key + '[' + i$1 + ']',\n value: value[i$1],\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n break;\n case 'has':\n case '!has':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, 'filter array for \"' + value[0] + '\" operator must have 2 elements'));\n } else if (type !== 'string') {\n errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n }\n break;\n case 'within':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, 'filter array for \"' + value[0] + '\" operator must have 2 elements'));\n } else if (type !== 'object') {\n errors.push(new ValidationError(key + '[1]', value[1], 'object expected, ' + type + ' found'));\n }\n break;\n }\n return errors;\n}\n\nfunction validateProperty(options, propertyType) {\n var key = options.key;\n var style = options.style;\n var styleSpec = options.styleSpec;\n var value = options.value;\n var propertyKey = options.objectKey;\n var layerSpec = styleSpec[propertyType + '_' + options.layerType];\n if (!layerSpec) {\n return [];\n }\n var transitionMatch = propertyKey.match(/^(.*)-transition$/);\n if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n return validate({\n key: key,\n value: value,\n valueSpec: styleSpec.transition,\n style: style,\n styleSpec: styleSpec\n });\n }\n var valueSpec = options.valueSpec || layerSpec[propertyKey];\n if (!valueSpec) {\n return [new ValidationError(key, value, 'unknown property \"' + propertyKey + '\"')];\n }\n var tokenMatch;\n if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n return [new ValidationError(key, value, '\"' + propertyKey + '\" does not support interpolation syntax\\n' + 'Use an identity property function instead: `{ \"type\": \"identity\", \"property\": ' + JSON.stringify(tokenMatch[1]) + ' }`.')];\n }\n var errors = [];\n if (options.layerType === 'symbol') {\n if (propertyKey === 'text-field' && style && !style.glyphs) {\n errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n }\n if (propertyKey === 'text-font' && isFunction$1(deepUnbundle(value)) && unbundle(value.type) === 'identity') {\n errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n }\n }\n return errors.concat(validate({\n key: options.key,\n value: value,\n valueSpec: valueSpec,\n style: style,\n styleSpec: styleSpec,\n expressionContext: 'property',\n propertyType: propertyType,\n propertyKey: propertyKey\n }));\n}\n\nfunction validatePaintProperty(options) {\n return validateProperty(options, 'paint');\n}\n\nfunction validateLayoutProperty(options) {\n return validateProperty(options, 'layout');\n}\n\nfunction validateLayer(options) {\n var errors = [];\n var layer = options.value;\n var key = options.key;\n var style = options.style;\n var styleSpec = options.styleSpec;\n if (!layer.type && !layer.ref) {\n errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n }\n var type = unbundle(layer.type);\n var ref = unbundle(layer.ref);\n if (layer.id) {\n var layerId = unbundle(layer.id);\n for (var i = 0; i < options.arrayIndex; i++) {\n var otherLayer = style.layers[i];\n if (unbundle(otherLayer.id) === layerId) {\n errors.push(new ValidationError(key, layer.id, 'duplicate layer id \"' + layer.id + '\", previously used at line ' + otherLayer.id.__line__));\n }\n }\n }\n if ('ref' in layer) {\n ['type', 'source', 'source-layer', 'filter', 'layout'].forEach(function (p) {\n if (p in layer) {\n errors.push(new ValidationError(key, layer[p], '\"' + p + '\" is prohibited for ref layers'));\n }\n });\n var parent;\n style.layers.forEach(function (layer) {\n if (unbundle(layer.id) === ref) {\n parent = layer;\n }\n });\n if (!parent) {\n errors.push(new ValidationError(key, layer.ref, 'ref layer \"' + ref + '\" not found'));\n } else if (parent.ref) {\n errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n } else {\n type = unbundle(parent.type);\n }\n } else if (type !== 'background') {\n if (!layer.source) {\n errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n } else {\n var source = style.sources && style.sources[layer.source];\n var sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, layer.source, 'source \"' + layer.source + '\" not found'));\n } else if (sourceType === 'vector' && type === 'raster') {\n errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requires a raster source'));\n } else if (sourceType === 'raster' && type !== 'raster') {\n errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requires a vector source'));\n } else if (sourceType === 'vector' && !layer['source-layer']) {\n errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" must specify a \"source-layer\"'));\n } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] && (sourceType !== 'geojson' || !source.lineMetrics)) {\n errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'));\n }\n }\n }\n errors = errors.concat(validateObject({\n key: key,\n value: layer,\n valueSpec: styleSpec.layer,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function _() {\n return [];\n },\n type: function type() {\n return validate({\n key: key + '.type',\n value: layer.type,\n valueSpec: styleSpec.layer.type,\n style: options.style,\n styleSpec: options.styleSpec,\n object: layer,\n objectKey: 'type'\n });\n },\n filter: validateFilter,\n layout: function layout(options) {\n return validateObject({\n layer: layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function _(options) {\n return validateLayoutProperty(extend({ layerType: type }, options));\n }\n }\n });\n },\n paint: function paint(options) {\n return validateObject({\n layer: layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function _(options) {\n return validatePaintProperty(extend({ layerType: type }, options));\n }\n }\n });\n }\n }\n }));\n return errors;\n}\n\nfunction validateString(options) {\n var value = options.value;\n var key = options.key;\n var type = getType(value);\n if (type !== 'string') {\n return [new ValidationError(key, value, 'string expected, ' + type + ' found')];\n }\n return [];\n}\n\nvar objectElementValidators = { promoteId: validatePromoteId };\nfunction validateSource(options) {\n var value = options.value;\n var key = options.key;\n var styleSpec = options.styleSpec;\n var style = options.style;\n if (!value.type) {\n return [new ValidationError(key, value, '\"type\" is required')];\n }\n var type = unbundle(value.type);\n var errors;\n switch (type) {\n case 'vector':\n case 'raster':\n case 'raster-dem':\n errors = validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec['source_' + type.replace('-', '_')],\n style: options.style,\n styleSpec: styleSpec,\n objectElementValidators: objectElementValidators\n });\n return errors;\n case 'geojson':\n errors = validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_geojson,\n style: style,\n styleSpec: styleSpec,\n objectElementValidators: objectElementValidators\n });\n if (value.cluster) {\n for (var prop in value.clusterProperties) {\n var ref = value.clusterProperties[prop];\n var operator = ref[0];\n var mapExpr = ref[1];\n var reduceExpr = typeof operator === 'string' ? [operator, ['accumulated'], ['get', prop]] : operator;\n errors.push.apply(errors, validateExpression({\n key: key + '.' + prop + '.map',\n value: mapExpr,\n expressionContext: 'cluster-map'\n }));\n errors.push.apply(errors, validateExpression({\n key: key + '.' + prop + '.reduce',\n value: reduceExpr,\n expressionContext: 'cluster-reduce'\n }));\n }\n }\n return errors;\n case 'video':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_video,\n style: style,\n styleSpec: styleSpec\n });\n case 'image':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_image,\n style: style,\n styleSpec: styleSpec\n });\n case 'canvas':\n return [new ValidationError(key, null, 'Please use runtime APIs to add canvas sources, rather than including them in stylesheets.', 'source.canvas')];\n default:\n return validateEnum({\n key: key + '.type',\n value: value.type,\n valueSpec: {\n values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image']\n },\n style: style,\n styleSpec: styleSpec\n });\n }\n}\nfunction validatePromoteId(ref) {\n var key = ref.key;\n var value = ref.value;\n if (getType(value) === 'string') {\n return validateString({\n key: key,\n value: value\n });\n } else {\n var errors = [];\n for (var prop in value) {\n errors.push.apply(errors, validateString({\n key: key + '.' + prop,\n value: value[prop]\n }));\n }\n return errors;\n }\n}\n\nfunction validateLight(options) {\n var light = options.value;\n var styleSpec = options.styleSpec;\n var lightSpec = styleSpec.light;\n var style = options.style;\n var errors = [];\n var rootType = getType(light);\n if (light === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('light', light, 'object expected, ' + rootType + ' found')]);\n return errors;\n }\n for (var key in light) {\n var transitionMatch = key.match(/^(.*)-transition$/);\n if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key: key,\n value: light[key],\n valueSpec: styleSpec.transition,\n style: style,\n styleSpec: styleSpec\n }));\n } else if (lightSpec[key]) {\n errors = errors.concat(validate({\n key: key,\n value: light[key],\n valueSpec: lightSpec[key],\n style: style,\n styleSpec: styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, light[key], 'unknown property \"' + key + '\"')]);\n }\n }\n return errors;\n}\n\nfunction validateFormatted(options) {\n if (validateString(options).length === 0) {\n return [];\n }\n return validateExpression(options);\n}\n\nfunction validateImage(options) {\n if (validateString(options).length === 0) {\n return [];\n }\n return validateExpression(options);\n}\n\nvar VALIDATORS = {\n '*': function _() {\n return [];\n },\n 'array': validateArray,\n 'boolean': validateBoolean,\n 'number': validateNumber,\n 'color': validateColor,\n 'constants': validateConstants,\n 'enum': validateEnum,\n 'filter': validateFilter,\n 'function': validateFunction,\n 'layer': validateLayer,\n 'object': validateObject,\n 'source': validateSource,\n 'light': validateLight,\n 'string': validateString,\n 'formatted': validateFormatted,\n 'resolvedImage': validateImage\n};\nfunction validate(options) {\n var value = options.value;\n var valueSpec = options.valueSpec;\n var styleSpec = options.styleSpec;\n if (valueSpec.expression && isFunction$1(unbundle(value))) {\n return validateFunction(options);\n } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n return validateExpression(options);\n } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n return VALIDATORS[valueSpec.type](options);\n } else {\n var valid = validateObject(extend({}, options, { valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec }));\n return valid;\n }\n}\n\nfunction validateGlyphsURL(options) {\n var value = options.value;\n var key = options.key;\n var errors = validateString(options);\n if (errors.length) {\n return errors;\n }\n if (value.indexOf('{fontstack}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n }\n if (value.indexOf('{range}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n }\n return errors;\n}\n\nfunction validateStyleMin(style, styleSpec) {\n if (styleSpec === void 0) styleSpec = v8;\n var errors = [];\n errors = errors.concat(validate({\n key: '',\n value: style,\n valueSpec: styleSpec.$root,\n styleSpec: styleSpec,\n style: style,\n objectElementValidators: {\n glyphs: validateGlyphsURL,\n '*': function _() {\n return [];\n }\n }\n }));\n if (style.constants) {\n errors = errors.concat(validateConstants({\n key: 'constants',\n value: style.constants,\n style: style,\n styleSpec: styleSpec\n }));\n }\n return sortErrors(errors);\n}\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);\nfunction sortErrors(errors) {\n return [].concat(errors).sort(function (a, b) {\n return a.line - b.line;\n });\n}\nfunction wrapCleanErrors(inner) {\n return function () {\n var args = [],\n len = arguments.length;\n while (len--) {\n args[len] = arguments[len];\n }return sortErrors(inner.apply(this, args));\n };\n}\n\nvar jsonlint = createCommonjsModule(function (module, exports) {\n /* parser generated by jison 0.4.15 */\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o, l) {\n for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;\n },\n $V0 = [1, 12],\n $V1 = [1, 13],\n $V2 = [1, 9],\n $V3 = [1, 10],\n $V4 = [1, 11],\n $V5 = [1, 14],\n $V6 = [1, 15],\n $V7 = [14, 18, 22, 24],\n $V8 = [18, 22],\n $V9 = [22, 24];\n var parser = { trace: function trace() {},\n yy: {},\n symbols_: { \"error\": 2, \"JSONString\": 3, \"STRING\": 4, \"JSONNumber\": 5, \"NUMBER\": 6, \"JSONNullLiteral\": 7, \"NULL\": 8, \"JSONBooleanLiteral\": 9, \"TRUE\": 10, \"FALSE\": 11, \"JSONText\": 12, \"JSONValue\": 13, \"EOF\": 14, \"JSONObject\": 15, \"JSONArray\": 16, \"{\": 17, \"}\": 18, \"JSONMemberList\": 19, \"JSONMember\": 20, \":\": 21, \",\": 22, \"[\": 23, \"]\": 24, \"JSONElementList\": 25, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 4: \"STRING\", 6: \"NUMBER\", 8: \"NULL\", 10: \"TRUE\", 11: \"FALSE\", 14: \"EOF\", 17: \"{\", 18: \"}\", 21: \":\", 22: \",\", 23: \"[\", 24: \"]\" },\n productions_: [0, [3, 1], [5, 1], [7, 1], [9, 1], [9, 1], [12, 2], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [15, 2], [15, 3], [20, 3], [19, 1], [19, 3], [16, 2], [16, 3], [25, 1], [25, 3]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n /* this == yyval */\n\n var $0 = $$.length - 1;\n switch (yystate) {\n case 1:\n // replace escaped characters with actual character\n this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\" + \"1\").replace(/\\\\n/g, '\\n').replace(/\\\\r/g, '\\r').replace(/\\\\t/g, '\\t').replace(/\\\\v/g, '\\v').replace(/\\\\f/g, '\\f').replace(/\\\\b/g, '\\b'));\n this.$.__line__ = this._$.first_line;\n\n break;\n case 2:\n\n this.$ = new Number(yytext);\n this.$.__line__ = this._$.first_line;\n\n break;\n case 3:\n\n this.$ = null;\n\n break;\n case 4:\n\n this.$ = new Boolean(true);\n this.$.__line__ = this._$.first_line;\n\n break;\n case 5:\n\n this.$ = new Boolean(false);\n this.$.__line__ = this._$.first_line;\n\n break;\n case 6:\n return this.$ = $$[$0 - 1];\n case 13:\n this.$ = {};Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n });\n break;\n case 14:case 19:\n this.$ = $$[$0 - 1];Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n });\n break;\n case 15:\n this.$ = [$$[$0 - 2], $$[$0]];\n break;\n case 16:\n this.$ = {};this.$[$$[$0][0]] = $$[$0][1];\n break;\n case 17:\n this.$ = $$[$0 - 2];$$[$0 - 2][$$[$0][0]] = $$[$0][1];\n break;\n case 18:\n this.$ = [];Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n });\n break;\n case 20:\n this.$ = [$$[$0]];\n break;\n case 21:\n this.$ = $$[$0 - 2];$$[$0 - 2].push($$[$0]);\n break;\n }\n },\n table: [{ 3: 5, 4: $V0, 5: 6, 6: $V1, 7: 3, 8: $V2, 9: 4, 10: $V3, 11: $V4, 12: 1, 13: 2, 15: 7, 16: 8, 17: $V5, 23: $V6 }, { 1: [3] }, { 14: [1, 16] }, o($V7, [2, 7]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), o($V7, [2, 12]), o($V7, [2, 3]), o($V7, [2, 4]), o($V7, [2, 5]), o([14, 18, 21, 22, 24], [2, 1]), o($V7, [2, 2]), { 3: 20, 4: $V0, 18: [1, 17], 19: 18, 20: 19 }, { 3: 5, 4: $V0, 5: 6, 6: $V1, 7: 3, 8: $V2, 9: 4, 10: $V3, 11: $V4, 13: 23, 15: 7, 16: 8, 17: $V5, 23: $V6, 24: [1, 21], 25: 22 }, { 1: [2, 6] }, o($V7, [2, 13]), { 18: [1, 24], 22: [1, 25] }, o($V8, [2, 16]), { 21: [1, 26] }, o($V7, [2, 18]), { 22: [1, 28], 24: [1, 27] }, o($V9, [2, 20]), o($V7, [2, 14]), { 3: 20, 4: $V0, 20: 29 }, { 3: 5, 4: $V0, 5: 6, 6: $V1, 7: 3, 8: $V2, 9: 4, 10: $V3, 11: $V4, 13: 30, 15: 7, 16: 8, 17: $V5, 23: $V6 }, o($V7, [2, 19]), { 3: 5, 4: $V0, 5: 6, 6: $V1, 7: 3, 8: $V2, 9: 4, 10: $V3, 11: $V4, 13: 31, 15: 7, 16: 8, 17: $V5, 23: $V6 }, o($V8, [2, 17]), o($V8, [2, 15]), o($V9, [2, 21])],\n defaultActions: { 16: [2, 6] },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n throw new Error(str);\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function lex() {\n var token;\n token = lexer.lex() || EOF;\n if (typeof token !== 'number') {\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol,\n state,\n action,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n } };\n /* generated by jison-lex 0.3.4 */\n var lexer = function () {\n var lexer = {\n\n EOF: 1,\n\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n },\n\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n },\n\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {},\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n switch ($avoiding_name_collisions) {\n case 0:\n /* skip whitespace */\n break;\n case 1:\n return 6;\n case 2:\n yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2);return 4;\n case 3:\n return 17;\n case 4:\n return 18;\n case 5:\n return 23;\n case 6:\n return 24;\n case 7:\n return 22;\n case 8:\n return 21;\n case 9:\n return 10;\n case 10:\n return 11;\n case 11:\n return 8;\n case 12:\n return 14;\n case 13:\n return 'INVALID';\n }\n },\n rules: [/^(?:\\s+)/, /^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/, /^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/, /^(?:\\{)/, /^(?:\\})/, /^(?:\\[)/, /^(?:\\])/, /^(?:,)/, /^(?::)/, /^(?:true\\b)/, /^(?:false\\b)/, /^(?:null\\b)/, /^(?:$)/, /^(?:.)/],\n conditions: { \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], \"inclusive\": true } }\n };\n return lexer;\n }();\n parser.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n Parser.prototype = parser;parser.Parser = Parser;\n return new Parser();\n }();\n\n if (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n }\n});\nvar jsonlint_1 = jsonlint.parser;\nvar jsonlint_2 = jsonlint.Parser;\nvar jsonlint_3 = jsonlint.parse;\n\nfunction readStyle(style) {\n if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n try {\n return jsonlint.parse(style.toString());\n } catch (e) {\n throw new ParsingError$1(e);\n }\n }\n return style;\n}\n\nfunction validateStyle(style, styleSpec) {\n if (styleSpec === void 0) styleSpec = v8;\n var s = style;\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n return validateStyleMin(s, styleSpec);\n}\n\nvar SUPPORTED_SPEC_VERSION = 8;\nvar MAX_SOURCES_IN_STYLE = 15;\nfunction isValid(value, regex) {\n if (!value || getType(value) !== 'string') {\n return true;\n }\n return !!value.match(regex);\n}\nfunction getSourceCount(source) {\n if (source.url) {\n return source.url.split(',').length;\n } else {\n return 0;\n }\n}\nfunction getAllowedKeyErrors(obj, keys, path) {\n var allowed = new Set(keys);\n var errors = [];\n Object.keys(obj).forEach(function (k) {\n if (!allowed.has(k)) {\n var prop = path ? path + '.' + k : null;\n errors.push(new ValidationError(prop, obj[k], 'Unsupported property \"' + k + '\"'));\n }\n });\n return errors;\n}\nfunction getSourceErrors(source, i) {\n var errors = [];\n var sourceKeys = ['type', 'url', 'tileSize'];\n errors.push.apply(errors, getAllowedKeyErrors(source, sourceKeys, 'source'));\n var sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n if (!isValid(source.url, sourceUrlPattern)) {\n errors.push(new ValidationError('sources[' + i + ']', source.url, 'Source url must be a valid Mapbox tileset url'));\n }\n return errors;\n}\nfunction getSourcesErrors(sources) {\n var errors = [];\n var count = 0;\n Object.keys(sources).forEach(function (s, i) {\n var sourceErrors = getSourceErrors(sources[s], i);\n if (!sourceErrors.length) {\n count = count + getSourceCount(sources[s]);\n }\n errors.push.apply(errors, sourceErrors);\n });\n if (count > MAX_SOURCES_IN_STYLE) {\n errors.push(new ValidationError('sources', null, 'Styles must contain ' + MAX_SOURCES_IN_STYLE + ' or fewer sources'));\n }\n return errors;\n}\nfunction getRootErrors(style, specKeys) {\n var errors = [];\n var optionalRootProperties = ['owner', 'id', 'cacheControl', 'draft', 'created', 'modified', 'visibility'];\n var allowedKeyErrors = getAllowedKeyErrors(style, specKeys.concat(optionalRootProperties));\n errors.push.apply(errors, allowedKeyErrors);\n if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSION) {\n errors.push(new ValidationError('version', style.version, 'Style version must be ' + SUPPORTED_SPEC_VERSION));\n }\n var glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n if (!isValid(style.glyphs, glyphUrlPattern)) {\n errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n }\n var spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n if (!isValid(style.sprite, spriteUrlPattern)) {\n errors.push(new ValidationError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n }\n var visibilityPattern = /^(public|private)$/;\n if (!isValid(style.visibility, visibilityPattern)) {\n errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n }\n return errors;\n}\nfunction validateMapboxApiSupported(style) {\n var s = style;\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n var errors = validateStyleMin(s, v8).concat(getRootErrors(s, Object.keys(v8.$root)));\n if (s.sources) {\n errors = errors.concat(getSourcesErrors(s.sources));\n }\n return errors;\n}\n\nvar expression$1 = {\n StyleExpression: StyleExpression,\n isExpression: isExpression,\n isExpressionFilter: isExpressionFilter,\n createExpression: createExpression,\n createPropertyExpression: createPropertyExpression,\n normalizePropertyExpression: normalizePropertyExpression,\n ZoomConstantExpression: ZoomConstantExpression,\n ZoomDependentExpression: ZoomDependentExpression,\n StylePropertyFunction: StylePropertyFunction\n};\nvar styleFunction = {\n convertFunction: convertFunction,\n createFunction: createFunction,\n isFunction: isFunction$1\n};\nvar visit = {\n eachSource: eachSource,\n eachLayer: eachLayer,\n eachProperty: eachProperty\n};\nvalidateStyle.parsed = validateStyle;\nvalidateStyle.latest = validateStyle;\n\nexports.Color = Color;\nexports.ParsingError = ParsingError$1;\nexports.ValidationError = ValidationError;\nexports.composite = composite;\nexports.convertFilter = convertFilter$1;\nexports.derefLayers = derefLayers;\nexports.diff = diffStyles;\nexports.expression = expression$1;\nexports.featureFilter = createFilter;\nexports.format = format;\nexports.function = styleFunction;\nexports.latest = v8;\nexports.migrate = migrate;\nexports.v8 = v8;\nexports.validate = validateStyle;\nexports.validateMapboxApiSupported = validateMapboxApiSupported;\nexports.visit = visit;\n//# sourceMappingURL=index.es.js.map\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js?"); /***/ }), /***/ "./node_modules/base64-js/index.js": /*!*****************************************!*\ !*** ./node_modules/base64-js/index.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nexports.byteLength = byteLength;\nexports.toByteArray = toByteArray;\nexports.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens(b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4');\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n\n return [validLen, placeHoldersLen];\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\n\nfunction _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\n\nfunction toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = tmp >> 16 & 0xFF;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr;\n}\n\nfunction tripletToBase64(num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n}\n\nfunction encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('');\n}\n\nfunction fromByteArray(uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n }\n\n return parts.join('');\n}\n\n//# sourceURL=webpack:///./node_modules/base64-js/index.js?"); /***/ }), /***/ "./node_modules/buffer/index.js": /*!**************************************!*\ !*** ./node_modules/buffer/index.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\");\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\");\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength();\n\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function foo() {\n return 42;\n } };\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\n\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\n\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n\n return that;\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n return allocUnsafe(this, arg);\n }\n return from(this, arg, encodingOrOffset, length);\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\n\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n\n return fromObject(that, value);\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length);\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\n\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\n\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size);\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n return createBuffer(that, size);\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding);\n};\n\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that;\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size);\n};\n\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that;\n}\n\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n}\n\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that;\n}\n\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that;\n }\n\n obj.copy(that, 0, 0, len);\n return that;\n }\n\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n return fromArrayLike(that, obj);\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\n\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n return length | 0;\n}\n\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length);\n}\n\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\n\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n\n if (a === b) return 0;\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n default:\n return false;\n }\n};\n\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer;\n};\n\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0;\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length;\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n case 'hex':\n return len >>> 1;\n case 'base64':\n return base64ToBytes(string).length;\n default:\n if (loweredCase) return utf8ToBytes(string).length; // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString(encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return '';\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return '';\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return '';\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n\n case 'ascii':\n return asciiSlice(this, start, end);\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n\n case 'base64':\n return base64Slice(this, start, end);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\n\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n};\n\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n};\n\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n};\n\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n};\n\nBuffer.prototype.equals = function equals(b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return Buffer.compare(this, b) === 0;\n};\n\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '';\n};\n\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0;\n\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1;\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}\n\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i];\n } else {\n return buf.readUInt16BE(i * indexSize);\n }\n }\n\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found) return i;\n }\n }\n\n return -1;\n}\n\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\n\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n return i;\n}\n\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\n\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\n\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\n\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n\n if (!encoding) encoding = 'utf8';\n\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\n\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n}\n\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res);\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n}\n\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret;\n}\n\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n}\n\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out;\n}\n\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n}\n\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf;\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val;\n};\n\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val;\n};\n\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n};\n\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\n\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\n\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\n\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\n\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0;\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds');\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');\n if (end < 0) throw new RangeError('sourceEnd out of bounds');\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\n }\n\n return len;\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string');\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding);\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index');\n }\n\n if (end <= start) {\n return this;\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this;\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return '';\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str;\n}\n\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\n\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue;\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else {\n throw new Error('Invalid code point');\n }\n }\n\n return bytes;\n}\n\nfunction asciiToBytes(str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray;\n}\n\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break;\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray;\n}\n\nfunction base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\n\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n return i;\n}\n\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/buffer/index.js?"); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/ol/ol.css": /*!**********************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/ol/ol.css ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \".ol-box {\\n box-sizing: border-box;\\n border-radius: 2px;\\n border: 2px solid blue;\\n}\\n\\n.ol-mouse-position {\\n top: 8px;\\n right: 8px;\\n position: absolute;\\n}\\n\\n.ol-scale-line {\\n background: rgba(0,60,136,0.3);\\n border-radius: 4px;\\n bottom: 8px;\\n left: 8px;\\n padding: 2px;\\n position: absolute;\\n}\\n.ol-scale-line-inner {\\n border: 1px solid #eee;\\n border-top: none;\\n color: #eee;\\n font-size: 10px;\\n text-align: center;\\n margin: 1px;\\n will-change: contents, width;\\n transition: all 0.25s;\\n}\\n.ol-scale-bar {\\n position: absolute;\\n bottom: 8px;\\n left: 8px;\\n}\\n.ol-scale-step-marker {\\n width: 1px;\\n height: 15px;\\n background-color: #000000;\\n float: right;\\n z-Index: 10;\\n}\\n.ol-scale-step-text {\\n position: absolute;\\n bottom: -5px;\\n font-size: 12px;\\n z-Index: 11;\\n color: #000000;\\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\\n}\\n.ol-scale-text {\\n position: absolute;\\n font-size: 14px;\\n text-align: center;\\n bottom: 25px;\\n color: #000000;\\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\\n}\\n.ol-scale-singlebar {\\n position: relative;\\n height: 10px;\\n z-Index: 9;\\n box-sizing: border-box;\\n border: 1px solid black;\\n}\\n\\n.ol-unsupported {\\n display: none;\\n}\\n.ol-viewport, .ol-unselectable {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n -webkit-tap-highlight-color: rgba(0,0,0,0);\\n}\\n.ol-selectable {\\n -webkit-touch-callout: default;\\n -webkit-user-select: text;\\n -moz-user-select: text;\\n -ms-user-select: text;\\n user-select: text;\\n}\\n.ol-grabbing {\\n cursor: -webkit-grabbing;\\n cursor: -moz-grabbing;\\n cursor: grabbing;\\n}\\n.ol-grab {\\n cursor: move;\\n cursor: -webkit-grab;\\n cursor: -moz-grab;\\n cursor: grab;\\n}\\n.ol-control {\\n position: absolute;\\n background-color: rgba(255,255,255,0.4);\\n border-radius: 4px;\\n padding: 2px;\\n}\\n.ol-control:hover {\\n background-color: rgba(255,255,255,0.6);\\n}\\n.ol-zoom {\\n top: .5em;\\n left: .5em;\\n}\\n.ol-rotate {\\n top: .5em;\\n right: .5em;\\n transition: opacity .25s linear, visibility 0s linear;\\n}\\n.ol-rotate.ol-hidden {\\n opacity: 0;\\n visibility: hidden;\\n transition: opacity .25s linear, visibility 0s linear .25s;\\n}\\n.ol-zoom-extent {\\n top: 4.643em;\\n left: .5em;\\n}\\n.ol-full-screen {\\n right: .5em;\\n top: .5em;\\n}\\n\\n.ol-control button {\\n display: block;\\n margin: 1px;\\n padding: 0;\\n color: white;\\n font-size: 1.14em;\\n font-weight: bold;\\n text-decoration: none;\\n text-align: center;\\n height: 1.375em;\\n width: 1.375em;\\n line-height: .4em;\\n background-color: rgba(0,60,136,0.5);\\n border: none;\\n border-radius: 2px;\\n}\\n.ol-control button::-moz-focus-inner {\\n border: none;\\n padding: 0;\\n}\\n.ol-zoom-extent button {\\n line-height: 1.4em;\\n}\\n.ol-compass {\\n display: block;\\n font-weight: normal;\\n font-size: 1.2em;\\n will-change: transform;\\n}\\n.ol-touch .ol-control button {\\n font-size: 1.5em;\\n}\\n.ol-touch .ol-zoom-extent {\\n top: 5.5em;\\n}\\n.ol-control button:hover,\\n.ol-control button:focus {\\n text-decoration: none;\\n background-color: rgba(0,60,136,0.7);\\n}\\n.ol-zoom .ol-zoom-in {\\n border-radius: 2px 2px 0 0;\\n}\\n.ol-zoom .ol-zoom-out {\\n border-radius: 0 0 2px 2px;\\n}\\n\\n\\n.ol-attribution {\\n text-align: right;\\n bottom: .5em;\\n right: .5em;\\n max-width: calc(100% - 1.3em);\\n}\\n\\n.ol-attribution ul {\\n margin: 0;\\n padding: 0 .5em;\\n color: #000;\\n text-shadow: 0 0 2px #fff;\\n}\\n.ol-attribution li {\\n display: inline;\\n list-style: none;\\n}\\n.ol-attribution li:not(:last-child):after {\\n content: \\\" \\\";\\n}\\n.ol-attribution img {\\n max-height: 2em;\\n max-width: inherit;\\n vertical-align: middle;\\n}\\n.ol-attribution ul, .ol-attribution button {\\n display: inline-block;\\n}\\n.ol-attribution.ol-collapsed ul {\\n display: none;\\n}\\n.ol-attribution:not(.ol-collapsed) {\\n background: rgba(255,255,255,0.8);\\n}\\n.ol-attribution.ol-uncollapsible {\\n bottom: 0;\\n right: 0;\\n border-radius: 4px 0 0;\\n}\\n.ol-attribution.ol-uncollapsible img {\\n margin-top: -.2em;\\n max-height: 1.6em;\\n}\\n.ol-attribution.ol-uncollapsible button {\\n display: none;\\n}\\n\\n.ol-zoomslider {\\n top: 4.5em;\\n left: .5em;\\n height: 200px;\\n}\\n.ol-zoomslider button {\\n position: relative;\\n height: 10px;\\n}\\n\\n.ol-touch .ol-zoomslider {\\n top: 5.5em;\\n}\\n\\n.ol-overviewmap {\\n left: 0.5em;\\n bottom: 0.5em;\\n}\\n.ol-overviewmap.ol-uncollapsible {\\n bottom: 0;\\n left: 0;\\n border-radius: 0 4px 0 0;\\n}\\n.ol-overviewmap .ol-overviewmap-map,\\n.ol-overviewmap button {\\n display: inline-block;\\n}\\n.ol-overviewmap .ol-overviewmap-map {\\n border: 1px solid #7b98bc;\\n height: 150px;\\n margin: 2px;\\n width: 150px;\\n}\\n.ol-overviewmap:not(.ol-collapsed) button{\\n bottom: 1px;\\n left: 2px;\\n position: absolute;\\n}\\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\\n.ol-overviewmap.ol-uncollapsible button {\\n display: none;\\n}\\n.ol-overviewmap:not(.ol-collapsed) {\\n background: rgba(255,255,255,0.8);\\n}\\n.ol-overviewmap-box {\\n border: 2px dotted rgba(0,60,136,0.7);\\n}\\n\\n.ol-overviewmap .ol-overviewmap-box:hover {\\n cursor: move;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./node_modules/ol/ol.css?./node_modules/css-loader/dist/cjs.js"); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/index.css": /*!*************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/index.css ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"body {\\r\\n\\tmargin: 0px;\\r\\n\\tborder: 0px solid black;\\r\\n\\tpadding: 0px;\\r\\n}\\r\\n\\r\\n#map {\\r\\n width: 100%;\\r\\n height: 100%;\\r\\n position: fixed;\\r\\n}\\r\\n\\r\\n.ol-popup {\\r\\n position: absolute;\\r\\n background-color: white;\\r\\n box-shadow: 0 1px 4px rgba(0,0,0,0.2);\\r\\n padding: 15px;\\r\\n border-radius: 10px;\\r\\n border: 1px solid #cccccc;\\r\\n bottom: 12px;\\r\\n left: -50px;\\r\\n min-width: 280px;\\r\\n}\\r\\n.ol-popup:after, .ol-popup:before {\\r\\n top: 100%;\\r\\n border: solid transparent;\\r\\n content: \\\" \\\";\\r\\n height: 0;\\r\\n width: 0;\\r\\n position: absolute;\\r\\n pointer-events: none;\\r\\n}\\r\\n.ol-popup:after {\\r\\n border-top-color: white;\\r\\n border-width: 10px;\\r\\n left: 48px;\\r\\n margin-left: -10px;\\r\\n}\\r\\n.ol-popup:before {\\r\\n border-top-color: #cccccc;\\r\\n border-width: 11px;\\r\\n left: 48px;\\r\\n margin-left: -11px;\\r\\n}\\r\\n.ol-popup-closer {\\r\\n text-decoration: none;\\r\\n position: absolute;\\r\\n top: 2px;\\r\\n right: 8px;\\r\\n}\\r\\n.ol-popup-closer:after {\\r\\n content: \\\"✖\\\";\\r\\n}\\r\\n\\r\\n.tests{\\r\\n\\tmargin: 3px;\\r\\n\\tpadding: 3px;\\r\\n\\tborder: 1px solid #aaa;\\r\\n\\tborder-radius: 3px;\\r\\n\\tfont-size: 80%;\\r\\n}\\r\\n\\r\\n.tests.m{\\r\\n\\tbackground-color: #f497a9;\\r\\n}\\r\\n.tests.g{\\r\\n\\tbackground-color: #fff68f;\\r\\n}\\r\\n.tests.p{\\r\\n\\tbackground-color: #6bbce9;\\r\\n}\\r\\n\\r\\n.org_name{\\r\\n\\tmargin: 3px;\\r\\n\\tpadding: 3px;\\r\\n\\tfont-weight: bold;\\r\\n\\tfont-size: 110%;\\r\\n}\\r\\n\\r\\n.org_desk{\\r\\n\\tmargin: 3px;\\r\\n\\tpadding: 3px;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/index.css?./node_modules/css-loader/dist/cjs.js"); /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\n\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}\n\n//# sourceURL=webpack:///./node_modules/css-loader/dist/runtime/api.js?"); /***/ }), /***/ "./node_modules/ieee754/index.js": /*!***************************************!*\ !*** ./node_modules/ieee754/index.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? nBytes - 1 : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE ? 0 : nBytes - 1;\n var d = isLE ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n//# sourceURL=webpack:///./node_modules/ieee754/index.js?"); /***/ }), /***/ "./node_modules/isarray/index.js": /*!***************************************!*\ !*** ./node_modules/isarray/index.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n//# sourceURL=webpack:///./node_modules/isarray/index.js?"); /***/ }), /***/ "./node_modules/mapbox-to-css-font/index.js": /*!**************************************************!*\ !*** ./node_modules/mapbox-to-css-font/index.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nvar fontWeights = {\n thin: 100,\n hairline: 100,\n 'ultra-light': 100,\n 'extra-light': 100,\n light: 200,\n book: 300,\n regular: 400,\n normal: 400,\n plain: 400,\n roman: 400,\n standard: 400,\n medium: 500,\n 'semi-bold': 600,\n 'demi-bold': 600,\n bold: 700,\n heavy: 800,\n black: 800,\n 'extra-bold': 800,\n 'ultra-black': 900,\n 'extra-black': 900,\n 'ultra-bold': 900,\n 'heavy-black': 900,\n fat: 900,\n poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function (fonts, size, lineHeight) {\n var cssData = fontCache[fonts];\n if (!cssData) {\n if (!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n var weight = 400;\n var style = 'normal';\n var fontFamilies = [];\n var haveWeight, haveStyle;\n for (var i = 0, ii = fonts.length; i < ii; ++i) {\n var font = fonts[i];\n var parts = font.split(' ');\n var maybeWeight = parts[parts.length - 1].toLowerCase();\n if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n style = haveStyle ? style : maybeWeight;\n parts.pop();\n maybeWeight = parts[parts.length - 1].toLowerCase();\n } else if (italicRE.test(maybeWeight)) {\n maybeWeight = maybeWeight.replace(italicRE, '');\n style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, '');\n }\n for (var w in fontWeights) {\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp).replace('Klokantech Noto Sans', 'Noto Sans');\n if (fontFamily.indexOf(sp) !== -1) {\n fontFamily = '\"' + fontFamily + '\"';\n }\n fontFamilies.push(fontFamily);\n }\n // CSS font property: font-style font-weight font-size/line-height font-family\n cssData = fontCache[fonts] = [style, weight, fontFamilies];\n }\n return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n\n//# sourceURL=webpack:///./node_modules/mapbox-to-css-font/index.js?"); /***/ }), /***/ "./node_modules/ol-mapbox-style/dist/index.js": /*!****************************************************!*\ !*** ./node_modules/ol-mapbox-style/dist/index.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports._getFonts = exports._finalizeLayer = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /*\n ol-mapbox-style - Use Mapbox Style objects with OpenLayers\n Copyright 2016-present ol-mapbox-style contributors\n License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n */\n\n\nexports.applyStyle = applyStyle;\nexports.applyBackground = applyBackground;\nexports.default = olms;\nexports.apply = apply;\nexports.getLayer = getLayer;\nexports.getLayers = getLayers;\nexports.getSource = getSource;\n\nvar _mapboxToCssFont = __webpack_require__(/*! mapbox-to-css-font */ \"./node_modules/mapbox-to-css-font/index.js\");\n\nvar _mapboxToCssFont2 = _interopRequireDefault(_mapboxToCssFont);\n\nvar _stylefunction = __webpack_require__(/*! ./stylefunction */ \"./node_modules/ol-mapbox-style/dist/stylefunction.js\");\n\nvar _stylefunction2 = _interopRequireDefault(_stylefunction);\n\nvar _google = __webpack_require__(/*! webfont-matcher/lib/fonts/google */ \"./node_modules/webfont-matcher/lib/fonts/google.js\");\n\nvar _google2 = _interopRequireDefault(_google);\n\nvar _proj = __webpack_require__(/*! ol/proj */ \"./node_modules/ol/proj.js\");\n\nvar _tilegrid = __webpack_require__(/*! ol/tilegrid */ \"./node_modules/ol/tilegrid.js\");\n\nvar _TileGrid = __webpack_require__(/*! ol/tilegrid/TileGrid */ \"./node_modules/ol/tilegrid/TileGrid.js\");\n\nvar _TileGrid2 = _interopRequireDefault(_TileGrid);\n\nvar _Map = __webpack_require__(/*! ol/Map */ \"./node_modules/ol/Map.js\");\n\nvar _Map2 = _interopRequireDefault(_Map);\n\nvar _View = __webpack_require__(/*! ol/View */ \"./node_modules/ol/View.js\");\n\nvar _View2 = _interopRequireDefault(_View);\n\nvar _GeoJSON = __webpack_require__(/*! ol/format/GeoJSON */ \"./node_modules/ol/format/GeoJSON.js\");\n\nvar _GeoJSON2 = _interopRequireDefault(_GeoJSON);\n\nvar _MVT = __webpack_require__(/*! ol/format/MVT */ \"./node_modules/ol/format/MVT.js\");\n\nvar _MVT2 = _interopRequireDefault(_MVT);\n\nvar _Observable = __webpack_require__(/*! ol/Observable */ \"./node_modules/ol/Observable.js\");\n\nvar _Tile = __webpack_require__(/*! ol/layer/Tile */ \"./node_modules/ol/layer/Tile.js\");\n\nvar _Tile2 = _interopRequireDefault(_Tile);\n\nvar _Vector = __webpack_require__(/*! ol/layer/Vector */ \"./node_modules/ol/layer/Vector.js\");\n\nvar _Vector2 = _interopRequireDefault(_Vector);\n\nvar _VectorTile = __webpack_require__(/*! ol/layer/VectorTile */ \"./node_modules/ol/layer/VectorTile.js\");\n\nvar _VectorTile2 = _interopRequireDefault(_VectorTile);\n\nvar _TileJSON = __webpack_require__(/*! ol/source/TileJSON */ \"./node_modules/ol/source/TileJSON.js\");\n\nvar _TileJSON2 = _interopRequireDefault(_TileJSON);\n\nvar _Vector3 = __webpack_require__(/*! ol/source/Vector */ \"./node_modules/ol/source/Vector.js\");\n\nvar _Vector4 = _interopRequireDefault(_Vector3);\n\nvar _VectorTile3 = __webpack_require__(/*! ol/source/VectorTile */ \"./node_modules/ol/source/VectorTile.js\");\n\nvar _VectorTile4 = _interopRequireDefault(_VectorTile3);\n\nvar _mapboxGlStyleSpec = __webpack_require__(/*! @mapbox/mapbox-gl-style-spec */ \"./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js\");\n\nvar _util = __webpack_require__(/*! ./util */ \"./node_modules/ol-mapbox-style/dist/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\nvar tilejsonCache = {};\nvar fontFamilyRegEx = /font-family: ?([^;]*);/;\nvar stripQuotesRegEx = /(\"|')/g;\nvar loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n var styleSheets = document.styleSheets;\n for (var i = 0, ii = styleSheets.length; i < ii; ++i) {\n var styleSheet = /** @type {CSSStyleSheet} */styleSheets[i];\n try {\n var cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (var j = 0, jj = cssRules.length; j < jj; ++j) {\n var cssRule = cssRules[j];\n if (cssRule.type == 5) {\n var match = cssRule.cssText.match(fontFamilyRegEx);\n loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n }\n }\n }\n } catch (e) {\n // empty catch block\n }\n }\n }\n return family in loadedFontFamilies;\n}\nvar processedFontFamilies = {};\nvar googleFamilies = _google2.default.getNames();\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n var fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return fonts;\n }\n var googleFontDescriptions = fonts.map(function (font) {\n var parts = (0, _mapboxToCssFont2.default)(font, 1).split(' ');\n return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n });\n for (var i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n var googleFontDescription = googleFontDescriptions[i];\n var family = googleFontDescription[0];\n if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n var fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1];\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n var markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n processedFontFamilies[fontsKey] = true;\n return fonts;\n}\nvar spriteRegEx = /^(.*)(\\?.*)$/;\nfunction withPath(url, path) {\n if (path && url.indexOf('.') === 0) {\n url = path + url;\n }\n return url;\n}\nfunction toSpriteUrl(url, path, extension) {\n url = withPath(url, path);\n var parts = url.match(spriteRegEx);\n return parts ? parts[1] + extension + (parts.length > 2 ? parts[2] : '') : url + extension;\n}\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array} [resolutions=undefined] Resolutions for mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nfunction applyStyle(layer, glStyle, source, path, resolutions) {\n return new Promise(function (resolve, reject) {\n // TODO: figure out where best place to check source type is\n // Note that the source arg is an array of gl layer ids and each must be\n // dereferenced to get source type to validate\n if ((typeof glStyle === 'undefined' ? 'undefined' : _typeof(glStyle)) != 'object') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (!(layer instanceof _Vector2.default || layer instanceof _VectorTile2.default)) {\n return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n }\n var spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n style = (0, _stylefunction2.default)(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n if (!layer.getStyle()) {\n reject(new Error(\"Nothing to show for source [\" + source + \"]\"));\n } else {\n resolve();\n }\n } else if (style) {\n layer.setStyle(style);\n resolve();\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n if (glStyle.sprite) {\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n var sizeFactor_1 = spriteScale == 0.5 ? '@2x' : '';\n var spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.json');\n fetch(spriteUrl_1, { credentials: 'same-origin' }).then(function (response) {\n if (!response.ok && sizeFactor_1 !== '') {\n spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, '.json');\n return fetch(spriteUrl_1, { credentials: 'same-origin' });\n } else {\n return response;\n }\n }).then(function (response) {\n if (response.ok) {\n return response.json();\n } else {\n reject(new Error(\"Problem fetching sprite from \" + spriteUrl_1 + \": \" + response.statusText));\n }\n }).then(function (spritesJson) {\n if (spritesJson === undefined || Object.keys(spritesJson).length === 0) {\n return reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.png');\n onChange();\n }).catch(function (err) {\n reject(new Error(\"Sprites cannot be loaded: \" + spriteUrl_1 + \": \" + err.message));\n });\n } else {\n onChange();\n }\n });\n}\nvar emptyObj = {};\nfunction setBackground(map, layer) {\n var background = {\n type: layer.type\n };\n function updateStyle() {\n var element = map.getTargetElement();\n if (!element) {\n return;\n }\n var layout = layer.layout || {};\n var paint = layer.paint || {};\n background['paint'] = paint;\n background.id = 'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n var zoom = map.getView().getZoom();\n if (paint['background-color'] !== undefined) {\n var bg = (0, _stylefunction.getValue)(background, 'paint', 'background-color', zoom, emptyObj);\n element.style.background = _mapboxGlStyleSpec.Color.parse(bg).toString();\n }\n if (paint['background-opacity'] !== undefined) {\n element.style.opacity = (0, _stylefunction.getValue)(background, 'paint', 'background-opacity', zoom, emptyObj);\n }\n if (layout.visibility == 'none') {\n element.style.backgroundColor = '';\n element.style.opacity = '';\n }\n }\n if (map.getTargetElement()) {\n updateStyle();\n }\n map.on(['change:resolution', 'change:target'], updateStyle);\n}\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nfunction applyBackground(map, glStyle) {\n glStyle.layers.some(function (l) {\n if (l.type == 'background') {\n setBackground(map, l);\n return true;\n }\n });\n}\nfunction getSourceIdByRef(layers, ref) {\n var sourceId;\n layers.some(function (layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\nfunction extentFromTileJSON(tileJSON) {\n var bounds = tileJSON.bounds;\n if (bounds) {\n var ll = (0, _proj.fromLonLat)([bounds[0], bounds[1]]);\n var tr = (0, _proj.fromLonLat)([bounds[2], bounds[3]]);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n}\nfunction setupVectorLayer(glSource, accessToken, url) {\n glSource = (0, _util.assign)({}, glSource);\n var layer = new _VectorTile2.default({\n declutter: true,\n visible: false\n });\n var cacheKey = JSON.stringify(glSource);\n var tilejson = tilejsonCache[cacheKey];\n if (!tilejson) {\n tilejson = tilejsonCache[cacheKey] = new _TileJSON2.default({\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined\n });\n }\n var key = tilejson.on('change', function () {\n var state = tilejson.getState();\n if (state === 'ready') {\n var tileJSONDoc = tilejson.getTileJSON();\n var tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n if (glSource.url) {\n for (var i = 0, ii = tiles.length; i < ii; ++i) {\n var tile = tiles[i];\n if (tile.indexOf('http') != 0) {\n tiles[i] = glSource.url + tile;\n }\n }\n }\n var tileGrid = tilejson.getTileGrid();\n var extent = extentFromTileJSON(tileJSONDoc);\n var minZoom = tileJSONDoc.minzoom || 0;\n var maxZoom = tileJSONDoc.maxzoom || 22;\n var source = tilejson.get('ol-source');\n if (source === undefined) {\n source = new _VectorTile4.default({\n attributions: tilejson.getAttributions(),\n format: new _MVT2.default(),\n tileGrid: new _TileGrid2.default({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: _util.defaultResolutions.slice(0, maxZoom + 1),\n tileSize: 512\n }),\n urls: tiles\n });\n tilejson.set('ol-source', source);\n }\n (0, _Observable.unByKey)(key);\n layer.setSource(source);\n } else if (state === 'error') {\n tilejson.set('ol-source', null);\n (0, _Observable.unByKey)(key);\n layer.setSource(undefined);\n }\n });\n if (tilejson.getState() === 'ready') {\n tilejson.changed();\n }\n return layer;\n}\nfunction setupRasterLayer(glSource, url) {\n var layer = new _Tile2.default();\n var source = new _TileJSON2.default({\n transition: 0,\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined,\n crossOrigin: 'anonymous'\n });\n var key = source.on('change', function () {\n var state = source.getState();\n if (state === 'ready') {\n (0, _Observable.unByKey)(key);\n var tileJSONDoc = /** @type {Object} */source.getTileJSON();\n var extent = extentFromTileJSON(tileJSONDoc);\n var tileGrid = source.getTileGrid();\n var tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n var minZoom = tileJSONDoc.minzoom || 0;\n var maxZoom = tileJSONDoc.maxzoom || 22;\n // Only works when using ES modules\n source.tileGrid = new _TileGrid2.default({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: (0, _tilegrid.createXYZ)({\n maxZoom: maxZoom,\n tileSize: tileSize\n }).getResolutions(),\n tileSize: tileSize\n });\n layer.setSource(source);\n } else if (state === 'error') {\n (0, _Observable.unByKey)(key);\n layer.setSource(undefined);\n }\n });\n source.setTileLoadFunction(function (tile, src) {\n if (src.indexOf('{bbox-epsg-3857}') != -1) {\n var bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n src = src.replace('{bbox-epsg-3857}', bbox.toString());\n }\n var img = /** @type {import(\"ol/ImageTile\").default} */tile.getImage();\n /** @type {HTMLImageElement} */img.src = src;\n });\n return layer;\n}\nvar geoJsonFormat = new _GeoJSON2.default();\nfunction setupGeoJSONLayer(glSource, path) {\n var data = glSource.data;\n var features, geoJsonUrl;\n if (typeof data == 'string') {\n geoJsonUrl = withPath(data, path);\n } else {\n features = geoJsonFormat.readFeatures(data, { featureProjection: 'EPSG:3857' });\n }\n return new _Vector2.default({\n source: new _Vector4.default({\n attributions: glSource.attribution,\n features: features,\n format: geoJsonFormat,\n url: geoJsonUrl\n }),\n visible: false\n });\n}\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n var zoom = view.getZoom();\n var opacity = (0, _stylefunction.getValue)(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n layer.setOpacity(opacity);\n}\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n var promises = [];\n var view = map.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n view = new _View2.default({\n maxResolution: _util.defaultResolutions[0]\n });\n map.setView(view);\n }\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter((0, _proj.fromLonLat)(glStyle.center));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(_util.defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: map.getSize()\n });\n }\n if (glStyle.sprite) {\n if (glStyle.sprite.indexOf('mapbox://') == 0) {\n glStyle.sprite = baseUrl + '/sprite' + accessToken;\n } else if (glStyle.sprite.indexOf('http') != 0) {\n glStyle.sprite = (host ? host + path : '') + glStyle.sprite + accessToken;\n }\n }\n var glLayers = glStyle.layers;\n var layerIds = [];\n var glLayer, glSource, glSourceId, id, layer, url;\n var _loop_1 = function _loop_1(i, ii) {\n glLayer = glLayers[i];\n var type = glLayer.type;\n if (type == 'heatmap' || type == 'fill-extrusion' || type == 'hillshade') {\n //FIXME Unsupported layer type\n } else if (type == 'background') {\n setBackground(map, glLayer);\n } else {\n id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n // this technique assumes gl layers will be in a particular order\n if (id != glSourceId) {\n if (layerIds.length) {\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n layerIds = [];\n }\n glSource = glStyle.sources[id];\n url = glSource.url;\n if (url) {\n url = withPath(url, path);\n if (url.indexOf('mapbox://') == 0) {\n var mapid_1 = url.replace('mapbox://', '');\n glSource.tiles = ['a', 'b', 'c', 'd'].map(function (host) {\n return 'https://' + host + '.tiles.mapbox.com/v4/' + mapid_1 + '/{z}/{x}/{y}.' + (glSource.type == 'vector' ? 'vector.pbf' : 'png') + accessToken;\n });\n }\n }\n if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, accessToken, url);\n } else if (glSource.type == 'raster') {\n layer = setupRasterLayer(glSource, url);\n layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n view.on('change:resolution', updateRasterLayerProperties.bind(this_1, glLayer, layer, view));\n updateRasterLayerProperties(glLayer, layer, view);\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, path);\n }\n glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n }\n layerIds.push(glLayer.id);\n }\n };\n var this_1 = this;\n for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n _loop_1(i, ii);\n }\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n map.set('mapbox-style', glStyle);\n return Promise.all(promises);\n}\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nfunction olms(map, style) {\n var accessToken, baseUrl, host, path, promise;\n accessToken = baseUrl = host = path = '';\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new _Map2.default({\n target: map\n });\n }\n if (typeof style === 'string') {\n var parts = style.match(spriteRegEx);\n if (parts) {\n baseUrl = parts[1];\n accessToken = parts.length > 2 ? parts[2] : '';\n }\n promise = new Promise(function (resolve, reject) {\n fetch(style, {\n credentials: 'same-origin'\n }).then(function (response) {\n return response.json();\n }).then(function (glStyle) {\n var a = /** @type {HTMLAnchorElement} */document.createElement('A');\n a.href = style;\n var href = a.href;\n path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n host = href.substr(0, href.indexOf(path));\n processStyle(glStyle, map, baseUrl, host, path, accessToken).then(function () {\n resolve(map);\n }).catch(reject);\n }).catch(function (err) {\n reject(new Error(\"Could not load \" + style + \": \" + err.message));\n });\n });\n } else {\n promise = new Promise(function (resolve, reject) {\n processStyle(style, map).then(function () {\n resolve(map);\n }).catch(reject);\n });\n }\n return promise;\n}\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nfunction apply(map, style) {\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new _Map2.default({\n target: map\n });\n }\n setTimeout(function () {\n olms(map, style);\n }, 0);\n return map;\n}\n/**\n * @private\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called. If so, the style\n * is applied to the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n */\nfunction finalizeLayer(layer, layerIds, glStyle, path, map) {\n var minZoom = 24;\n var maxZoom = 0;\n var glLayers = glStyle.layers;\n for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n var glLayer = glLayers[i];\n if (layerIds.indexOf(glLayer.id) !== -1) {\n minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n }\n }\n return new Promise(function (resolve, reject) {\n var setStyle = function setStyle() {\n var source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n return;\n }\n if (typeof source.getTileGrid === 'function') {\n var tileGrid = source.getTileGrid();\n if (tileGrid) {\n var sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(Math.min(_util.defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n }\n if (maxZoom < 24) {\n layer.setMinResolution(_util.defaultResolutions[maxZoom] + 1e-9);\n }\n }\n }\n if (source instanceof _Vector4.default || source instanceof _VectorTile4.default) {\n applyStyle( /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */layer, glStyle, layerIds, path).then(function () {\n layer.setVisible(true);\n resolve();\n }, function (e) {\n reject(e);\n });\n } else {\n resolve();\n }\n };\n layer.set('mapbox-layers', layerIds);\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance that contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nfunction getLayer(map, layerId) {\n var layers = map.getLayers().getArray();\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n var mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return (/** @type {Layer} */layers[i]\n );\n }\n }\n}\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array} OpenLayers layer instances.\n */\nfunction getLayers(map, sourceId) {\n var result = [];\n var layers = map.getLayers().getArray();\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n if (layers[i].get('mapbox-source') === sourceId) {\n result.push( /** @type {Layer} */layers[i]);\n }\n }\n return result;\n}\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nfunction getSource(map, sourceId) {\n var layers = map.getLayers().getArray();\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n var source = /** @type {Layer} */layers[i].getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n}\nexports._finalizeLayer = finalizeLayer;\nexports._getFonts = getFonts;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/ol-mapbox-style/dist/index.js?"); /***/ }), /***/ "./node_modules/ol-mapbox-style/dist/stylefunction.js": /*!************************************************************!*\ !*** ./node_modules/ol-mapbox-style/dist/stylefunction.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports._functionCache = exports._getValue = exports._fromTemplate = exports._evaluateFilter = exports._filterCache = exports._colorWithOpacity = undefined;\nexports.getValue = getValue;\n\nexports.default = function (olLayer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts) {\n if (resolutions === void 0) {\n resolutions = _util.defaultResolutions;\n }\n if (typeof glStyle == 'string') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n throw new Error('glStyle version 8 required.');\n }\n var spriteImage, spriteImgSize;\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n var img_1 = new Image();\n img_1.crossOrigin = 'anonymous';\n img_1.onload = function () {\n spriteImage = img_1;\n spriteImgSize = [img_1.width, img_1.height];\n olLayer.changed();\n img_1.onload = null;\n };\n img_1.src = spriteImageUrl;\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {\n //eslint-disable-line\n var worker = /** @type {*} */self;\n // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded'\n worker.postMessage({\n action: 'loadImage',\n src: spriteImageUrl\n });\n worker.addEventListener('message', function handler(event) {\n if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) {\n spriteImage = event.data.image;\n spriteImgSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n var allLayers = (0, _mapboxGlStyleSpec.derefLayers)(glStyle.layers);\n var layersBySourceLayer = {};\n var mapboxLayers = [];\n var mapboxSource;\n for (var i = 0, ii = allLayers.length; i < ii; ++i) {\n var layer = allLayers[i];\n var layerId = layer.id;\n if (typeof source == 'string' && layer.source == source || source.indexOf(layerId) !== -1) {\n var sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n var source_1 = glStyle.sources[mapboxSource];\n if (!source_1) {\n throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not defined\");\n }\n var type = source_1.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not of type \\\"vector\\\" or \\\"geojson\\\", but \\\"\" + type + \"\\\"\");\n }\n }\n var layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = layersBySourceLayer[sourceLayer] = [];\n }\n layers.push({\n layer: layer,\n index: i\n });\n mapboxLayers.push(layerId);\n }\n // TODO revisit when diffing gets added\n delete functionCache[layerId];\n delete filterCache[layerId];\n }\n var textHalo = new _Stroke2.default();\n var textColor = new _Fill2.default();\n var iconImageCache = {};\n var patternCache = {};\n var styles = [];\n var styleFunction = function styleFunction(feature, resolution) {\n var properties = feature.getProperties();\n var layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return;\n }\n var zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = (0, _util.getZoomForResolution)(resolution, resolutions);\n }\n var type = types[feature.getGeometry().getType()];\n var f = {\n properties: properties,\n type: type\n };\n var stylesLength = -1;\n var _loop_1 = function _loop_1(i, ii) {\n var layerData = layers[i];\n var layer = layerData.layer;\n var layerId = layer.id;\n var layout = layer.layout || emptyObj;\n var paint = layer.paint || emptyObj;\n if (layout.visibility === 'none' || 'minzoom' in layer && zoom < layer.minzoom || 'maxzoom' in layer && zoom >= layer.maxzoom) {\n return \"continue\";\n }\n var filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom)) {\n var color = void 0,\n opacity = void 0,\n fill = void 0,\n stroke = void 0,\n strokeColor = void 0,\n style = void 0;\n var index = layerData.index;\n if (type == 3 && layer.type == 'fill') {\n opacity = getValue(layer, 'paint', 'fill-opacity', zoom, f);\n if ('fill-pattern' in paint) {\n var fillIcon = getValue(layer, 'paint', 'fill-pattern', zoom, f);\n if (fillIcon) {\n var icon_1 = typeof fillIcon === 'string' ? fromTemplate(fillIcon, properties) : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon_1]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getFill() || style.getStroke() || style.getText()) {\n style = styles[stylesLength] = new _Style2.default({\n fill: new _Fill2.default()\n });\n }\n fill = style.getFill();\n style.setZIndex(index);\n var icon_cache_key = icon_1 + '.' + opacity;\n var pattern = patternCache[icon_cache_key];\n if (!pattern) {\n var spriteImageData = spriteData[icon_1];\n var canvas = (0, _util.createCanvas)(spriteImageData.width, spriteImageData.height);\n var ctx = /** @type {CanvasRenderingContext2D} */canvas.getContext('2d');\n ctx.globalAlpha = opacity;\n ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(getValue(layer, 'paint', 'fill-color', zoom, f), opacity);\n if (color) {\n if ('fill-outline-color' in paint) {\n strokeColor = colorWithOpacity(getValue(layer, 'paint', 'fill-outline-color', zoom, f), opacity);\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !(style.getFill() && style.getStroke()) || style.getText()) {\n style = styles[stylesLength] = new _Style2.default({\n fill: new _Fill2.default(),\n stroke: new _Stroke2.default()\n });\n }\n fill = style.getFill();\n fill.setColor(color);\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(1);\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color = !('line-pattern' in paint) && 'line-color' in paint ? colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f), getValue(layer, 'paint', 'line-opacity', zoom, f)) : undefined;\n var width_1 = getValue(layer, 'paint', 'line-width', zoom, f);\n if (color && width_1 > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n style = styles[stylesLength] = new _Style2.default({\n stroke: new _Stroke2.default()\n });\n }\n stroke = style.getStroke();\n stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f));\n stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f));\n stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f));\n stroke.setColor(color);\n stroke.setWidth(width_1);\n stroke.setLineDash(paint['line-dasharray'] ? getValue(layer, 'paint', 'line-dasharray', zoom, f).map(function (x) {\n return x * width_1;\n }) : null);\n style.setZIndex(index);\n }\n }\n var hasImage = false;\n var text = null;\n var placementAngle = 0;\n var icon = void 0,\n iconImg = void 0,\n skipLabel = void 0;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n var iconImage = getValue(layer, 'layout', 'icon-image', zoom, f);\n if (iconImage) {\n icon = typeof iconImage === 'string' ? fromTemplate(iconImage, properties) : iconImage.toString();\n var styleGeom = undefined;\n if (spriteImage && spriteData && spriteData[icon]) {\n var iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f);\n if (type == 2) {\n var geom = feature.getGeometry();\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n var extent = geom.getExtent();\n var size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] - extent[1]) / resolution, 2)));\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n var midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new _Feature2.default('Point', renderFeatureCoordinates, [], {}, null);\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n var placement = getValue(layer, 'layout', 'symbol-placement', zoom, f);\n if (placement === 'line' && iconRotationAlignment === 'map') {\n var stride = geom.getStride();\n var coordinates = geom.getFlatCoordinates();\n for (var i_1 = 0, ii_1 = coordinates.length - stride; i_1 < ii_1; i_1 += stride) {\n var x1 = coordinates[i_1];\n var y1 = coordinates[i_1 + 1];\n var x2 = coordinates[i_1 + stride];\n var y2 = coordinates[i_1 + stride + 1];\n var minX = Math.min(x1, x2);\n var minY = Math.min(y1, y2);\n var maxX = Math.max(x1, x2);\n var maxY = Math.max(y1, y2);\n if (midpoint[0] >= minX && midpoint[0] <= maxX && midpoint[1] >= minY && midpoint[1] <= maxY) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new _Style2.default();\n }\n style.setGeometry(styleGeom);\n var iconSize = getValue(layer, 'layout', 'icon-size', zoom, f);\n var iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f) : null;\n var icon_cache_key = icon + '.' + iconSize;\n if (iconColor !== null) {\n icon_cache_key += '.' + iconColor;\n }\n iconImg = iconImageCache[icon_cache_key];\n if (!iconImg) {\n var spriteImageData = spriteData[icon];\n if (iconColor !== null) {\n // cut out the sprite and color it\n var canvas = (0, _util.createCanvas)(spriteImageData.width, spriteImageData.height);\n var ctx = /** @type {CanvasRenderingContext2D} */canvas.getContext('2d');\n ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n var data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n for (var c = 0, cc = data.data.length; c < cc; c += 4) {\n var a = iconColor.a;\n if (a !== 0) {\n data.data[c] = iconColor.r * 255 / a;\n data.data[c + 1] = iconColor.g * 255 / a;\n data.data[c + 2] = iconColor.b * 255 / a;\n }\n data.data[c + 3] = a;\n }\n ctx.putImageData(data, 0, 0);\n iconImg = iconImageCache[icon_cache_key] = new _Icon2.default({\n img: canvas,\n imgSize: [canvas.width, canvas.height],\n scale: iconSize / spriteImageData.pixelRatio\n });\n } else {\n iconImg = iconImageCache[icon_cache_key] = new _Icon2.default({\n img: spriteImage,\n imgSize: spriteImgSize,\n size: [spriteImageData.width, spriteImageData.height],\n offset: [spriteImageData.x, spriteImageData.y],\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio\n });\n }\n }\n iconImg.setRotation(placementAngle + (0, _util.deg2rad)(getValue(layer, 'layout', 'icon-rotate', zoom, f)));\n iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f));\n iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f)]);\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setZIndex(index);\n hasImage = true;\n skipLabel = false;\n } else {\n skipLabel = true;\n }\n }\n }\n }\n if (type == 1 && 'circle-radius' in paint) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new _Style2.default();\n }\n var circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f);\n var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f));\n var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f), getValue(layer, 'paint', 'circle-opacity', zoom, f));\n var circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f);\n var cache_key = circleRadius + '.' + circleStrokeColor + '.' + circleColor + '.' + circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = iconImageCache[cache_key] = new _Circle2.default({\n radius: circleRadius,\n stroke: circleStrokeColor && circleStrokeWidth > 0 ? new _Stroke2.default({\n width: circleStrokeWidth,\n color: circleStrokeColor\n }) : undefined,\n fill: circleColor ? new _Fill2.default({\n color: circleColor\n }) : undefined\n });\n }\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setGeometry(undefined);\n style.setZIndex(index);\n hasImage = true;\n }\n var label = void 0;\n if ('text-field' in layout) {\n var textField = getValue(layer, 'layout', 'text-field', zoom, f).toString();\n label = fromTemplate(textField, properties).trim();\n opacity = getValue(layer, 'paint', 'text-opacity', zoom, f);\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getText() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new _Style2.default();\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(text || new _Text2.default({\n padding: [2, 2, 2, 2]\n }));\n }\n text = style.getText();\n var textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f));\n var fontArray = getValue(layer, 'layout', 'text-font', zoom, f);\n var textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f);\n var font = (0, _mapboxToCssFont2.default)(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight);\n var textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = label.toLowerCase();\n }\n var maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f);\n var letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f);\n var wrappedLabel = type == 2 ? (0, _util.applyLetterSpacing)(label, letterSpacing) : (0, _util.wrapText)(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation((0, _util.deg2rad)(getValue(layer, 'layout', 'text-rotate', zoom, f)));\n var textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f);\n var placement = hasImage || type == 1 ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f);\n text.setPlacement(placement);\n var textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f);\n var textOffset = getValue(layer, 'layout', 'text-offset', zoom, f);\n var textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f);\n // Text offset has to take halo width and line height into account\n var vOffset = 0;\n var hOffset = 0;\n if (placement == 'point') {\n var textAlign = 'center';\n if (textAnchor.indexOf('left') !== -1) {\n textAlign = 'left';\n hOffset = textHaloWidth;\n } else if (textAnchor.indexOf('right') !== -1) {\n textAlign = 'right';\n hOffset = -textHaloWidth;\n }\n text.setTextAlign(textAlign);\n var textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f);\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle((0, _util.deg2rad)(getValue(layer, 'layout', 'text-max-angle', zoom, f)) * label.length / wrappedLabel.length);\n text.setTextAlign();\n text.setRotateWithView(false);\n }\n var textBaseline = 'middle';\n if (textAnchor.indexOf('bottom') == 0) {\n textBaseline = 'bottom';\n vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize;\n } else if (textAnchor.indexOf('top') == 0) {\n textBaseline = 'top';\n vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize;\n }\n text.setTextBaseline(textBaseline);\n text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]);\n text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]);\n textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f), opacity));\n text.setFill(textColor);\n var haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f), opacity);\n if (haloColor) {\n textHalo.setColor(haloColor);\n // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width\n // Halo width must be doubled because it is applied around the center of the text outline\n textHaloWidth *= 2;\n // 1/4 of text size (spec) x 2\n var halfTextSize = 0.5 * textSize;\n textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize);\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n var textPadding = getValue(layer, 'layout', 'text-padding', zoom, f);\n var padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = padding[1] = padding[2] = padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n };\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n _loop_1(i, ii);\n }\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n return styles;\n }\n };\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n return styleFunction;\n};\n\nvar _Style = __webpack_require__(/*! ol/style/Style */ \"./node_modules/ol/style/Style.js\");\n\nvar _Style2 = _interopRequireDefault(_Style);\n\nvar _Fill = __webpack_require__(/*! ol/style/Fill */ \"./node_modules/ol/style/Fill.js\");\n\nvar _Fill2 = _interopRequireDefault(_Fill);\n\nvar _Stroke = __webpack_require__(/*! ol/style/Stroke */ \"./node_modules/ol/style/Stroke.js\");\n\nvar _Stroke2 = _interopRequireDefault(_Stroke);\n\nvar _Icon = __webpack_require__(/*! ol/style/Icon */ \"./node_modules/ol/style/Icon.js\");\n\nvar _Icon2 = _interopRequireDefault(_Icon);\n\nvar _Text = __webpack_require__(/*! ol/style/Text */ \"./node_modules/ol/style/Text.js\");\n\nvar _Text2 = _interopRequireDefault(_Text);\n\nvar _Circle = __webpack_require__(/*! ol/style/Circle */ \"./node_modules/ol/style/Circle.js\");\n\nvar _Circle2 = _interopRequireDefault(_Circle);\n\nvar _Feature = __webpack_require__(/*! ol/render/Feature */ \"./node_modules/ol/render/Feature.js\");\n\nvar _Feature2 = _interopRequireDefault(_Feature);\n\nvar _mapboxGlStyleSpec = __webpack_require__(/*! @mapbox/mapbox-gl-style-spec */ \"./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js\");\n\nvar _mapboxToCssFont = __webpack_require__(/*! mapbox-to-css-font */ \"./node_modules/mapbox-to-css-font/index.js\");\n\nvar _mapboxToCssFont2 = _interopRequireDefault(_mapboxToCssFont);\n\nvar _util = __webpack_require__(/*! ./util */ \"./node_modules/ol-mapbox-style/dist/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\nvar isFunction = _mapboxGlStyleSpec.function.isFunction; /*\n ol-mapbox-style - Use Mapbox Style objects with OpenLayers\n Copyright 2016-present ol-mapbox-style contributors\n License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n */\n\nvar convertFunction = _mapboxGlStyleSpec.function.convertFunction;\nvar isExpression = _mapboxGlStyleSpec.expression.isExpression;\nvar createPropertyExpression = _mapboxGlStyleSpec.expression.createPropertyExpression;\nvar types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3\n};\nvar anchor = {\n 'center': [0.5, 0.5],\n 'left': [0, 0.5],\n 'right': [1, 0.5],\n 'top': [0.5, 0],\n 'bottom': [0.5, 1],\n 'top-left': [0, 0],\n 'top-right': [1, 0],\n 'bottom-left': [0, 1],\n 'bottom-right': [1, 1]\n};\nvar expressionData = function expressionData(rawExpression, propertySpec) {\n var compiledExpression = createPropertyExpression(rawExpression, propertySpec);\n if (compiledExpression.result === 'error') {\n throw new Error(compiledExpression.value.map(function (err) {\n return err.key + \": \" + err.message;\n }).join(', '));\n }\n return compiledExpression.value;\n};\nvar emptyObj = {};\nvar zoomObj = { zoom: 0 };\n/** @private */\nvar functionCache = {};\nvar renderFeatureCoordinates, renderFeature;\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {string} layoutOrPaint 'layout' or 'paint'.\n * @param {string} property Feature property.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @return {?} Value.\n */\nfunction getValue(layer, layoutOrPaint, property, zoom, feature) {\n var layerId = layer.id;\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n var functions = functionCache[layerId];\n if (!functions[property]) {\n var value_1 = (layer[layoutOrPaint] || emptyObj)[property];\n var propertySpec = _mapboxGlStyleSpec.latest[layoutOrPaint + \"_\" + layer.type][property];\n if (value_1 === undefined) {\n value_1 = propertySpec.default;\n }\n var isExpr = isExpression(value_1);\n if (!isExpr && isFunction(value_1)) {\n value_1 = convertFunction(value_1, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n var compiledExpression = expressionData(value_1, propertySpec);\n functions[property] = compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value_1 = _mapboxGlStyleSpec.Color.parse(value_1);\n }\n functions[property] = function () {\n return value_1;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature);\n}\n/** @private */\nvar filterCache = {};\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom) {\n if (!(layerId in filterCache)) {\n filterCache[layerId] = (0, _mapboxGlStyleSpec.featureFilter)(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n/**\n * @private\n * @param {?} color Color.\n * @param {number} opacity Opacity.\n * @return {string} Color.\n */\nfunction colorWithOpacity(color, opacity) {\n if (color) {\n if (color.a === 0 || opacity === 0) {\n return undefined;\n }\n var a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) + ',' + Math.round(color.b * 255 / a) + ',' + a * opacity + ')';\n }\n return color;\n}\nvar templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n var parts;\n do {\n parts = text.match(templateRegEx);\n if (parts) {\n var value = properties[parts[2]] || '';\n text = parts[1] + value + parts[3];\n }\n } while (parts);\n return text;\n}\n/**\n * ```js\n * import stylefunction from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * Two additional properties will be set on the provided layer:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * This function also works in a web worker. In worker mode, the main thread needs\n * to listen to messages from the worker and respond with another message to make\n * sure that sprite image loading works:\n *\n * ```js\n * worker.addEventListener('message', event => {\n * if (event.data.action === 'loadImage') {\n * const image = new Image();\n * image.crossOrigin = 'anonymous';\n * image.addEventListener('load', function() {\n * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => {\n * worker.postMessage({\n * action: 'imageLoaded',\n * image: imageBitmap,\n * src: event.data.src\n * }, [imageBitmap]);\n * });\n * });\n * image.src = event.data.src;\n * }\n * });\n * ```\n *\n * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-layers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array} [resolutions=[78271.51696402048, 39135.75848201024,\n 19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564,\n 1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525,\n 76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032,\n 4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395,\n 0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {function(Array):Array} [getFonts=undefined] Function that\n * receives a font stack as arguments, and returns a (modified) font stack that\n * is available. Font names are the names used in the Mapbox Style object. If\n * not provided, the font stack will be used as-is. This function can also be\n * used for loading web fonts.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexports._colorWithOpacity = colorWithOpacity;\nexports._filterCache = filterCache;\nexports._evaluateFilter = evaluateFilter;\nexports._fromTemplate = fromTemplate;\nexports._getValue = getValue;\nexports._functionCache = functionCache;\n//# sourceMappingURL=stylefunction.js.map\n\n//# sourceURL=webpack:///./node_modules/ol-mapbox-style/dist/stylefunction.js?"); /***/ }), /***/ "./node_modules/ol-mapbox-style/dist/util.js": /*!***************************************************!*\ !*** ./node_modules/ol-mapbox-style/dist/util.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultResolutions = exports.assign = undefined;\nexports.deg2rad = deg2rad;\nexports.createCanvas = createCanvas;\nexports.getZoomForResolution = getZoomForResolution;\nexports.applyLetterSpacing = applyLetterSpacing;\nexports.wrapText = wrapText;\n\nvar _events = __webpack_require__(/*! ol/events */ \"./node_modules/ol/events.js\");\n\nvar _EventType = __webpack_require__(/*! ol/events/EventType */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _canvas = __webpack_require__(/*! ol/render/canvas */ \"./node_modules/ol/render/canvas.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Polyfill for Object.assign(). Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nvar assign = exports.assign = typeof Object.assign === 'function' ? Object.assign : function (target, var_sources) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n var output = Object(target);\n for (var i = 1, ii = arguments.length; i < ii; ++i) {\n var source = arguments[i];\n if (source !== undefined && source !== null) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n};\nfunction deg2rad(degrees) {\n return degrees * Math.PI / 180;\n}\nvar defaultResolutions = exports.defaultResolutions = function () {\n var resolutions = [];\n for (var res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n}();\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nfunction createCanvas(width, height) {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') {\n // eslint-disable-line\n return (/** @type {?} */new OffscreenCanvas(width, height)\n );\n } else {\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\nfunction getZoomForResolution(resolution, resolutions) {\n var i = 0;\n var ii = resolutions.length;\n for (; i < ii; ++i) {\n var candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n var zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\nvar hairSpacePool = Array(256).join('\\u200A');\nfunction applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n var textWithLetterSpacing = '';\n var lines = text.split('\\n');\n var joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n for (var l = 0, ll = lines.length; l < ll; ++l) {\n if (l > 0) {\n textWithLetterSpacing += '\\n';\n }\n textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n }\n return textWithLetterSpacing;\n }\n return text;\n}\nvar measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\nfunction measureText(text, letterSpacing) {\n return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing;\n}\nvar measureCache = {};\nif (_canvas.labelCache) {\n // Only available when using ES modules\n (0, _events.listen)(_canvas.labelCache, _EventType2.default.CLEAR, function () {\n measureCache = {};\n });\n}\nfunction wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n var hardLines = text.split('\\n');\n var lines = [];\n for (var i = 0, ii = hardLines.length; i < ii; ++i) {\n lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n }\n return lines.join('\\n');\n }\n var key = em + ',' + font + ',' + text + ',' + letterSpacing;\n var wrappedText = measureCache[key];\n if (!wrappedText) {\n var words = text.split(' ');\n if (words.length > 1) {\n var ctx = getMeasureContext();\n ctx.font = font;\n var oneEm = ctx.measureText('M').width;\n var maxWidth = oneEm * em;\n var line = '';\n var lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (var i = 0, ii = words.length; i < ii; ++i) {\n var word = words[i];\n var testLine = line + (line ? ' ' : '') + word;\n if (measureText(testLine, letterSpacing) <= maxWidth) {\n line = testLine;\n } else {\n if (line) {\n lines.push(line);\n }\n line = word;\n }\n }\n if (line) {\n lines.push(line);\n }\n // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n for (var i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n var line_1 = lines[i];\n if (measureText(line_1, letterSpacing) < maxWidth * 0.35) {\n var prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n var nextWidth = i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n lines.splice(i, 1);\n ii -= 1;\n if (prevWidth < nextWidth) {\n lines[i - 1] += ' ' + line_1;\n i -= 1;\n } else {\n lines[i] = line_1 + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (var i = 0, ii = lines.length - 1; i < ii; ++i) {\n var line_2 = lines[i];\n var next = lines[i + 1];\n if (measureText(line_2, letterSpacing) > maxWidth * 0.7 && measureText(next, letterSpacing) < maxWidth * 0.6) {\n var lineWords = line_2.split(' ');\n var lastWord = lineWords.pop();\n if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n lines[i] = lineWords.join(' ');\n lines[i + 1] = lastWord + ' ' + next;\n }\n ii -= 1;\n }\n }\n wrappedText = lines.join('\\n');\n } else {\n wrappedText = text;\n }\n wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n measureCache[key] = wrappedText;\n }\n return wrappedText;\n}\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack:///./node_modules/ol-mapbox-style/dist/util.js?"); /***/ }), /***/ "./node_modules/ol/AssertionError.js": /*!*******************************************!*\ !*** ./node_modules/ol/AssertionError.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/AssertionError\n */\n\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /** @class */function (_super) {\n __extends(AssertionError, _super);\n /**\n * @param {number} code Error code.\n */\n function AssertionError(code) {\n var _this = this;\n var path = _util.VERSION === 'latest' ? _util.VERSION : 'v' + _util.VERSION.split('-')[0];\n var message = 'Assertion failed. See https://openlayers.org/en/' + path + '/doc/errors/#' + code + ' for details.';\n _this = _super.call(this, message) || this;\n /**\n * Error code. The meaning of the code can be found on\n * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n * the version found in the OpenLayers script's header comment if a version\n * other than the latest is used).\n * @type {number}\n * @api\n */\n _this.code = code;\n /**\n * @type {string}\n */\n _this.name = 'AssertionError';\n // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n _this.message = message;\n return _this;\n }\n return AssertionError;\n}(Error);\nexports.default = AssertionError;\n//# sourceMappingURL=AssertionError.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/AssertionError.js?"); /***/ }), /***/ "./node_modules/ol/Collection.js": /*!***************************************!*\ !*** ./node_modules/ol/Collection.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CollectionEvent = undefined;\n\nvar _AssertionError = __webpack_require__(/*! ./AssertionError.js */ \"./node_modules/ol/AssertionError.js\");\n\nvar _AssertionError2 = _interopRequireDefault(_AssertionError);\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _CollectionEventType = __webpack_require__(/*! ./CollectionEventType.js */ \"./node_modules/ol/CollectionEventType.js\");\n\nvar _CollectionEventType2 = _interopRequireDefault(_CollectionEventType);\n\nvar _Event = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Collection\n */\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n LENGTH: 'length'\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nvar CollectionEvent = /** @class */function (_super) {\n __extends(CollectionEvent, _super);\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {*=} opt_element Element.\n * @param {number=} opt_index The index of the added or removed element.\n */\n function CollectionEvent(type, opt_element, opt_index) {\n var _this = _super.call(this, type) || this;\n /**\n * The element that is added to or removed from the collection.\n * @type {*}\n * @api\n */\n _this.element = opt_element;\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n _this.index = opt_index;\n return _this;\n }\n return CollectionEvent;\n}(_Event2.default);\nexports.CollectionEvent = CollectionEvent;\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\n\nvar Collection = /** @class */function (_super) {\n __extends(Collection, _super);\n /**\n * @param {Array=} opt_array Array.\n * @param {Options=} opt_options Collection options.\n */\n function Collection(opt_array, opt_options) {\n var _this = _super.call(this) || this;\n var options = opt_options || {};\n /**\n * @private\n * @type {boolean}\n */\n _this.unique_ = !!options.unique;\n /**\n * @private\n * @type {!Array}\n */\n _this.array_ = opt_array ? opt_array : [];\n if (_this.unique_) {\n for (var i = 0, ii = _this.array_.length; i < ii; ++i) {\n _this.assertUnique_(_this.array_[i], i);\n }\n }\n _this.updateLength_();\n return _this;\n }\n /**\n * Remove all elements from the collection.\n * @api\n */\n Collection.prototype.clear = function () {\n while (this.getLength() > 0) {\n this.pop();\n }\n };\n /**\n * Add elements to the collection. This pushes each item in the provided array\n * to the end of the collection.\n * @param {!Array} arr Array.\n * @return {Collection} This collection.\n * @api\n */\n Collection.prototype.extend = function (arr) {\n for (var i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n };\n /**\n * Iterate over each element, calling the provided callback.\n * @param {function(T, number, Array): *} f The function to call\n * for every element. This function takes 3 arguments (the element, the\n * index and the array). The return value is ignored.\n * @api\n */\n Collection.prototype.forEach = function (f) {\n var array = this.array_;\n for (var i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\n };\n /**\n * Get a reference to the underlying Array object. Warning: if the array\n * is mutated, no events will be dispatched by the collection, and the\n * collection's \"length\" property won't be in sync with the actual length\n * of the array.\n * @return {!Array} Array.\n * @api\n */\n Collection.prototype.getArray = function () {\n return this.array_;\n };\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n Collection.prototype.item = function (index) {\n return this.array_[index];\n };\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n Collection.prototype.getLength = function () {\n return this.get(Property.LENGTH);\n };\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n Collection.prototype.insertAt = function (index, elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(new CollectionEvent(_CollectionEventType2.default.ADD, elem, index));\n };\n /**\n * Remove the last element of the collection and return it.\n * Return `undefined` if the collection is empty.\n * @return {T|undefined} Element.\n * @api\n */\n Collection.prototype.pop = function () {\n return this.removeAt(this.getLength() - 1);\n };\n /**\n * Insert the provided element at the end of the collection.\n * @param {T} elem Element.\n * @return {number} New length of the collection.\n * @api\n */\n Collection.prototype.push = function (elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n var n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n };\n /**\n * Remove the first occurrence of an element from the collection.\n * @param {T} elem Element.\n * @return {T|undefined} The removed element or undefined if none found.\n * @api\n */\n Collection.prototype.remove = function (elem) {\n var arr = this.array_;\n for (var i = 0, ii = arr.length; i < ii; ++i) {\n if (arr[i] === elem) {\n return this.removeAt(i);\n }\n }\n return undefined;\n };\n /**\n * Remove the element at the provided index and return it.\n * Return `undefined` if the collection does not contain this index.\n * @param {number} index Index.\n * @return {T|undefined} Value.\n * @api\n */\n Collection.prototype.removeAt = function (index) {\n var prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(new CollectionEvent(_CollectionEventType2.default.REMOVE, prev, index));\n return prev;\n };\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n Collection.prototype.setAt = function (index, elem) {\n var n = this.getLength();\n if (index < n) {\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n var prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(new CollectionEvent(_CollectionEventType2.default.REMOVE, prev, index));\n this.dispatchEvent(new CollectionEvent(_CollectionEventType2.default.ADD, elem, index));\n } else {\n for (var j = n; j < index; ++j) {\n this.insertAt(j, undefined);\n }\n this.insertAt(index, elem);\n }\n };\n /**\n * @private\n */\n Collection.prototype.updateLength_ = function () {\n this.set(Property.LENGTH, this.array_.length);\n };\n /**\n * @private\n * @param {T} elem Element.\n * @param {number=} opt_except Optional index to ignore.\n */\n Collection.prototype.assertUnique_ = function (elem, opt_except) {\n for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== opt_except) {\n throw new _AssertionError2.default(58);\n }\n }\n };\n return Collection;\n}(_Object2.default);\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Collection.js?"); /***/ }), /***/ "./node_modules/ol/CollectionEventType.js": /*!************************************************!*\ !*** ./node_modules/ol/CollectionEventType.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/CollectionEventType\n */\n/**\n * @enum {string}\n */\nexports.default = {\n /**\n * Triggered when an item is added to the collection.\n * @event module:ol/Collection.CollectionEvent#add\n * @api\n */\n ADD: 'add',\n /**\n * Triggered when an item is removed from the collection.\n * @event module:ol/Collection.CollectionEvent#remove\n * @api\n */\n REMOVE: 'remove'\n};\n//# sourceMappingURL=CollectionEventType.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/CollectionEventType.js?"); /***/ }), /***/ "./node_modules/ol/Disposable.js": /*!***************************************!*\ !*** ./node_modules/ol/Disposable.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/Disposable\n */\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = /** @class */function () {\n function Disposable() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n /**\n * Clean up.\n */\n Disposable.prototype.dispose = function () {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n };\n /**\n * Extension point for disposable objects.\n * @protected\n */\n Disposable.prototype.disposeInternal = function () {};\n return Disposable;\n}();\nexports.default = Disposable;\n//# sourceMappingURL=Disposable.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Disposable.js?"); /***/ }), /***/ "./node_modules/ol/Feature.js": /*!************************************!*\ !*** ./node_modules/ol/Feature.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createStyleFunction = createStyleFunction;\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _asserts = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Feature\n */\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nvar Feature = /** @class */function (_super) {\n __extends(Feature, _super);\n /**\n * @param {Geometry|Object=} opt_geometryOrProperties\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n function Feature(opt_geometryOrProperties) {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {number|string|undefined}\n */\n _this.id_ = undefined;\n /**\n * @type {string}\n * @private\n */\n _this.geometryName_ = 'geometry';\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n _this.style_ = null;\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n _this.styleFunction_ = undefined;\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n _this.geometryChangeKey_ = null;\n _this.addEventListener((0, _Object.getChangeEventType)(_this.geometryName_), _this.handleGeometryChanged_);\n if (opt_geometryOrProperties) {\n if (typeof\n /** @type {?} */opt_geometryOrProperties.getSimplifiedGeometry === 'function') {\n var geometry = /** @type {Geometry} */opt_geometryOrProperties;\n _this.setGeometry(geometry);\n } else {\n /** @type {Object} */\n var properties = opt_geometryOrProperties;\n _this.setProperties(properties);\n }\n }\n return _this;\n }\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature} The clone.\n * @api\n */\n Feature.prototype.clone = function () {\n var clone = new Feature(this.hasProperties() ? this.getProperties() : null);\n clone.setGeometryName(this.getGeometryName());\n var geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(geometry.clone());\n }\n var style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n };\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n Feature.prototype.getGeometry = function () {\n return (/** @type {Geometry|undefined} */this.get(this.geometryName_)\n );\n };\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n Feature.prototype.getId = function () {\n return this.id_;\n };\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n Feature.prototype.getGeometryName = function () {\n return this.geometryName_;\n };\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n Feature.prototype.getStyle = function () {\n return this.style_;\n };\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n Feature.prototype.getStyleFunction = function () {\n return this.styleFunction_;\n };\n /**\n * @private\n */\n Feature.prototype.handleGeometryChange_ = function () {\n this.changed();\n };\n /**\n * @private\n */\n Feature.prototype.handleGeometryChanged_ = function () {\n if (this.geometryChangeKey_) {\n (0, _events.unlistenByKey)(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n var geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = (0, _events.listen)(geometry, _EventType2.default.CHANGE, this.handleGeometryChange_, this);\n }\n this.changed();\n };\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n Feature.prototype.setGeometry = function (geometry) {\n this.set(this.geometryName_, geometry);\n };\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike=} opt_style Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n Feature.prototype.setStyle = function (opt_style) {\n this.style_ = opt_style;\n this.styleFunction_ = !opt_style ? undefined : createStyleFunction(opt_style);\n this.changed();\n };\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n Feature.prototype.setId = function (id) {\n this.id_ = id;\n this.changed();\n };\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n Feature.prototype.setGeometryName = function (name) {\n this.removeEventListener((0, _Object.getChangeEventType)(this.geometryName_), this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addEventListener((0, _Object.getChangeEventType)(this.geometryName_), this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n };\n return Feature;\n}(_Object2.default);\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nfunction createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n } else {\n /**\n * @type {Array}\n */\n var styles_1;\n if (Array.isArray(obj)) {\n styles_1 = obj;\n } else {\n (0, _asserts.assert)(typeof /** @type {?} */obj.getZIndex === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n var style = /** @type {import(\"./style/Style.js\").default} */obj;\n styles_1 = [style];\n }\n return function () {\n return styles_1;\n };\n }\n}\nexports.default = Feature;\n//# sourceMappingURL=Feature.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Feature.js?"); /***/ }), /***/ "./node_modules/ol/Geolocation.js": /*!****************************************!*\ !*** ./node_modules/ol/Geolocation.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Event = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _Polygon = __webpack_require__(/*! ./geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n\nvar _proj = __webpack_require__(/*! ./proj.js */ \"./node_modules/ol/proj.js\");\n\nvar _math = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Geolocation\n */\n\n/**\n * @enum {string}\n */\nvar Property = {\n ACCURACY: 'accuracy',\n ACCURACY_GEOMETRY: 'accuracyGeometry',\n ALTITUDE: 'altitude',\n ALTITUDE_ACCURACY: 'altitudeAccuracy',\n HEADING: 'heading',\n POSITION: 'position',\n PROJECTION: 'projection',\n SPEED: 'speed',\n TRACKING: 'tracking',\n TRACKING_OPTIONS: 'trackingOptions'\n};\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nvar GeolocationError = /** @class */function (_super) {\n __extends(GeolocationError, _super);\n /**\n * @param {PositionError} error error object.\n */\n function GeolocationError(error) {\n var _this = _super.call(this, _EventType2.default.ERROR) || this;\n /**\n * @type {number}\n */\n _this.code = error.code;\n /**\n * @type {string}\n */\n _this.message = error.message;\n return _this;\n }\n return GeolocationError;\n}(_Event2.default);\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n * var geolocation = new Geolocation({\n * // take the projection to use from the map's view\n * projection: view.getProjection()\n * });\n * // listen to changes in position\n * geolocation.on('change', function(evt) {\n * window.console.log(geolocation.getPosition());\n * });\n *\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar Geolocation = /** @class */function (_super) {\n __extends(Geolocation, _super);\n /**\n * @param {Options=} opt_options Options.\n */\n function Geolocation(opt_options) {\n var _this = _super.call(this) || this;\n var options = opt_options || {};\n /**\n * The unprojected (EPSG:4326) device position.\n * @private\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n _this.position_ = null;\n /**\n * @private\n * @type {import(\"./proj.js\").TransformFunction}\n */\n _this.transform_ = _proj.identityTransform;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.watchId_ = undefined;\n _this.addEventListener((0, _Object.getChangeEventType)(Property.PROJECTION), _this.handleProjectionChanged_);\n _this.addEventListener((0, _Object.getChangeEventType)(Property.TRACKING), _this.handleTrackingChanged_);\n if (options.projection !== undefined) {\n _this.setProjection(options.projection);\n }\n if (options.trackingOptions !== undefined) {\n _this.setTrackingOptions(options.trackingOptions);\n }\n _this.setTracking(options.tracking !== undefined ? options.tracking : false);\n return _this;\n }\n /**\n * Clean up.\n */\n Geolocation.prototype.disposeInternal = function () {\n this.setTracking(false);\n _super.prototype.disposeInternal.call(this);\n };\n /**\n * @private\n */\n Geolocation.prototype.handleProjectionChanged_ = function () {\n var projection = this.getProjection();\n if (projection) {\n this.transform_ = (0, _proj.getTransformFromProjections)((0, _proj.get)('EPSG:4326'), projection);\n if (this.position_) {\n this.set(Property.POSITION, this.transform_(this.position_));\n }\n }\n };\n /**\n * @private\n */\n Geolocation.prototype.handleTrackingChanged_ = function () {\n if ('geolocation' in navigator) {\n var tracking = this.getTracking();\n if (tracking && this.watchId_ === undefined) {\n this.watchId_ = navigator.geolocation.watchPosition(this.positionChange_.bind(this), this.positionError_.bind(this), this.getTrackingOptions());\n } else if (!tracking && this.watchId_ !== undefined) {\n navigator.geolocation.clearWatch(this.watchId_);\n this.watchId_ = undefined;\n }\n }\n };\n /**\n * @private\n * @param {Position} position position event.\n */\n Geolocation.prototype.positionChange_ = function (position) {\n var coords = position.coords;\n this.set(Property.ACCURACY, coords.accuracy);\n this.set(Property.ALTITUDE, coords.altitude === null ? undefined : coords.altitude);\n this.set(Property.ALTITUDE_ACCURACY, coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy);\n this.set(Property.HEADING, coords.heading === null ? undefined : (0, _math.toRadians)(coords.heading));\n if (!this.position_) {\n this.position_ = [coords.longitude, coords.latitude];\n } else {\n this.position_[0] = coords.longitude;\n this.position_[1] = coords.latitude;\n }\n var projectedPosition = this.transform_(this.position_);\n this.set(Property.POSITION, projectedPosition);\n this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n var geometry = (0, _Polygon.circular)(this.position_, coords.accuracy);\n geometry.applyTransform(this.transform_);\n this.set(Property.ACCURACY_GEOMETRY, geometry);\n this.changed();\n };\n /**\n * @private\n * @param {PositionError} error error object.\n */\n Geolocation.prototype.positionError_ = function (error) {\n this.dispatchEvent(new GeolocationError(error));\n };\n /**\n * Get the accuracy of the position in meters.\n * @return {number|undefined} The accuracy of the position measurement in\n * meters.\n * @observable\n * @api\n */\n Geolocation.prototype.getAccuracy = function () {\n return (/** @type {number|undefined} */this.get(Property.ACCURACY)\n );\n };\n /**\n * Get a geometry of the position accuracy.\n * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n * @observable\n * @api\n */\n Geolocation.prototype.getAccuracyGeometry = function () {\n return (/** @type {?import(\"./geom/Polygon.js\").default} */this.get(Property.ACCURACY_GEOMETRY) || null\n );\n };\n /**\n * Get the altitude associated with the position.\n * @return {number|undefined} The altitude of the position in meters above mean\n * sea level.\n * @observable\n * @api\n */\n Geolocation.prototype.getAltitude = function () {\n return (/** @type {number|undefined} */this.get(Property.ALTITUDE)\n );\n };\n /**\n * Get the altitude accuracy of the position.\n * @return {number|undefined} The accuracy of the altitude measurement in\n * meters.\n * @observable\n * @api\n */\n Geolocation.prototype.getAltitudeAccuracy = function () {\n return (/** @type {number|undefined} */this.get(Property.ALTITUDE_ACCURACY)\n );\n };\n /**\n * Get the heading as radians clockwise from North.\n * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n * is set to `true` in the tracking options.\n * @return {number|undefined} The heading of the device in radians from north.\n * @observable\n * @api\n */\n Geolocation.prototype.getHeading = function () {\n return (/** @type {number|undefined} */this.get(Property.HEADING)\n );\n };\n /**\n * Get the position of the device.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n * in the current projection.\n * @observable\n * @api\n */\n Geolocation.prototype.getPosition = function () {\n return (/** @type {import(\"./coordinate.js\").Coordinate|undefined} */this.get(Property.POSITION)\n );\n };\n /**\n * Get the projection associated with the position.\n * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n * reported in.\n * @observable\n * @api\n */\n Geolocation.prototype.getProjection = function () {\n return (/** @type {import(\"./proj/Projection.js\").default|undefined} */this.get(Property.PROJECTION)\n );\n };\n /**\n * Get the speed in meters per second.\n * @return {number|undefined} The instantaneous speed of the device in meters\n * per second.\n * @observable\n * @api\n */\n Geolocation.prototype.getSpeed = function () {\n return (/** @type {number|undefined} */this.get(Property.SPEED)\n );\n };\n /**\n * Determine if the device location is being tracked.\n * @return {boolean} The device location is being tracked.\n * @observable\n * @api\n */\n Geolocation.prototype.getTracking = function () {\n return (/** @type {boolean} */this.get(Property.TRACKING)\n );\n };\n /**\n * Get the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @return {PositionOptions|undefined} PositionOptions as defined by\n * the [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n Geolocation.prototype.getTrackingOptions = function () {\n return (/** @type {PositionOptions|undefined} */this.get(Property.TRACKING_OPTIONS)\n );\n };\n /**\n * Set the projection to use for transforming the coordinates.\n * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n * reported in.\n * @observable\n * @api\n */\n Geolocation.prototype.setProjection = function (projection) {\n this.set(Property.PROJECTION, (0, _proj.get)(projection));\n };\n /**\n * Enable or disable tracking.\n * @param {boolean} tracking Enable tracking.\n * @observable\n * @api\n */\n Geolocation.prototype.setTracking = function (tracking) {\n this.set(Property.TRACKING, tracking);\n };\n /**\n * Set the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @param {PositionOptions} options PositionOptions as defined by the\n * [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n Geolocation.prototype.setTrackingOptions = function (options) {\n this.set(Property.TRACKING_OPTIONS, options);\n };\n return Geolocation;\n}(_Object2.default);\nexports.default = Geolocation;\n//# sourceMappingURL=Geolocation.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Geolocation.js?"); /***/ }), /***/ "./node_modules/ol/Image.js": /*!**********************************!*\ !*** ./node_modules/ol/Image.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.listenImage = listenImage;\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _ImageBase = __webpack_require__(/*! ./ImageBase.js */ \"./node_modules/ol/ImageBase.js\");\n\nvar _ImageBase2 = _interopRequireDefault(_ImageBase);\n\nvar _ImageState = __webpack_require__(/*! ./ImageState.js */ \"./node_modules/ol/ImageState.js\");\n\nvar _ImageState2 = _interopRequireDefault(_ImageState);\n\nvar _has = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n\nvar _extent = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Image\n */\n\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n * function(image, src) {\n * image.getImage().src = src;\n * }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\nvar ImageWrapper = /** @class */function (_super) {\n __extends(ImageWrapper, _super);\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {LoadFunction} imageLoadFunction Image load function.\n */\n function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {\n var _this = _super.call(this, extent, resolution, pixelRatio, _ImageState2.default.IDLE) || this;\n /**\n * @private\n * @type {string}\n */\n _this.src_ = src;\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n */\n _this.image_ = new Image();\n if (crossOrigin !== null) {\n _this.image_.crossOrigin = crossOrigin;\n }\n /**\n * @private\n * @type {?function():void}\n */\n _this.unlisten_ = null;\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n _this.state = _ImageState2.default.IDLE;\n /**\n * @private\n * @type {LoadFunction}\n */\n _this.imageLoadFunction_ = imageLoadFunction;\n return _this;\n }\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n ImageWrapper.prototype.getImage = function () {\n return this.image_;\n };\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageWrapper.prototype.handleImageError_ = function () {\n this.state = _ImageState2.default.ERROR;\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Tracks successful image load.\n *\n * @private\n */\n ImageWrapper.prototype.handleImageLoad_ = function () {\n if (this.resolution === undefined) {\n this.resolution = (0, _extent.getHeight)(this.extent) / this.image_.height;\n }\n this.state = _ImageState2.default.LOADED;\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @api\n */\n ImageWrapper.prototype.load = function () {\n if (this.state == _ImageState2.default.IDLE || this.state == _ImageState2.default.ERROR) {\n this.state = _ImageState2.default.LOADING;\n this.changed();\n this.imageLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n }\n };\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n ImageWrapper.prototype.setImage = function (image) {\n this.image_ = image;\n };\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageWrapper.prototype.unlistenImage_ = function () {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n };\n return ImageWrapper;\n}(_ImageBase2.default);\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nfunction listenImage(image, loadHandler, errorHandler) {\n var img = /** @type {HTMLImageElement} */image;\n if (img.src && _has.IMAGE_DECODE) {\n var promise = img.decode();\n var listening_1 = true;\n var unlisten = function unlisten() {\n listening_1 = false;\n };\n promise.then(function () {\n if (listening_1) {\n loadHandler();\n }\n }).catch(function (error) {\n if (listening_1) {\n // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n // https://bugs.webkit.org/show_bug.cgi?id=198527\n if (error.name === 'EncodingError' && error.message === 'Invalid image type.') {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n return unlisten;\n }\n var listenerKeys = [(0, _events.listenOnce)(img, _EventType2.default.LOAD, loadHandler), (0, _events.listenOnce)(img, _EventType2.default.ERROR, errorHandler)];\n return function unlisten() {\n listenerKeys.forEach(_events.unlistenByKey);\n };\n}\nexports.default = ImageWrapper;\n//# sourceMappingURL=Image.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Image.js?"); /***/ }), /***/ "./node_modules/ol/ImageBase.js": /*!**************************************!*\ !*** ./node_modules/ol/ImageBase.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Target = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n\nvar _Target2 = _interopRequireDefault(_Target);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/ImageBase\n */\n\n/**\n * @abstract\n */\nvar ImageBase = /** @class */function (_super) {\n __extends(ImageBase, _super);\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./ImageState.js\").default} state State.\n */\n function ImageBase(extent, resolution, pixelRatio, state) {\n var _this = _super.call(this) || this;\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n _this.extent = extent;\n /**\n * @private\n * @type {number}\n */\n _this.pixelRatio_ = pixelRatio;\n /**\n * @protected\n * @type {number|undefined}\n */\n _this.resolution = resolution;\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n _this.state = state;\n return _this;\n }\n /**\n * @protected\n */\n ImageBase.prototype.changed = function () {\n this.dispatchEvent(_EventType2.default.CHANGE);\n };\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n ImageBase.prototype.getExtent = function () {\n return this.extent;\n };\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n ImageBase.prototype.getImage = function () {\n return (0, _util.abstract)();\n };\n /**\n * @return {number} PixelRatio.\n */\n ImageBase.prototype.getPixelRatio = function () {\n return this.pixelRatio_;\n };\n /**\n * @return {number} Resolution.\n */\n ImageBase.prototype.getResolution = function () {\n return (/** @type {number} */this.resolution\n );\n };\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n ImageBase.prototype.getState = function () {\n return this.state;\n };\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n ImageBase.prototype.load = function () {\n (0, _util.abstract)();\n };\n return ImageBase;\n}(_Target2.default);\nexports.default = ImageBase;\n//# sourceMappingURL=ImageBase.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ImageBase.js?"); /***/ }), /***/ "./node_modules/ol/ImageCanvas.js": /*!****************************************!*\ !*** ./node_modules/ol/ImageCanvas.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ImageBase = __webpack_require__(/*! ./ImageBase.js */ \"./node_modules/ol/ImageBase.js\");\n\nvar _ImageBase2 = _interopRequireDefault(_ImageBase);\n\nvar _ImageState = __webpack_require__(/*! ./ImageState.js */ \"./node_modules/ol/ImageState.js\");\n\nvar _ImageState2 = _interopRequireDefault(_ImageState);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/ImageCanvas\n */\n\n/**\n * A function that is called to trigger asynchronous canvas drawing. It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\nvar ImageCanvas = /** @class */function (_super) {\n __extends(ImageCanvas, _super);\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Loader=} opt_loader Optional loader function to\n * support asynchronous canvas drawing.\n */\n function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n var _this = this;\n var state = opt_loader !== undefined ? _ImageState2.default.IDLE : _ImageState2.default.LOADED;\n _this = _super.call(this, extent, resolution, pixelRatio, state) || this;\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n _this.loader_ = opt_loader !== undefined ? opt_loader : null;\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n _this.canvas_ = canvas;\n /**\n * @private\n * @type {?Error}\n */\n _this.error_ = null;\n return _this;\n }\n /**\n * Get any error associated with asynchronous rendering.\n * @return {?Error} Any error that occurred during rendering.\n */\n ImageCanvas.prototype.getError = function () {\n return this.error_;\n };\n /**\n * Handle async drawing complete.\n * @param {Error=} err Any error during drawing.\n * @private\n */\n ImageCanvas.prototype.handleLoad_ = function (err) {\n if (err) {\n this.error_ = err;\n this.state = _ImageState2.default.ERROR;\n } else {\n this.state = _ImageState2.default.LOADED;\n }\n this.changed();\n };\n /**\n * Load not yet loaded URI.\n */\n ImageCanvas.prototype.load = function () {\n if (this.state == _ImageState2.default.IDLE) {\n this.state = _ImageState2.default.LOADING;\n this.changed();\n this.loader_(this.handleLoad_.bind(this));\n }\n };\n /**\n * @return {HTMLCanvasElement} Canvas element.\n */\n ImageCanvas.prototype.getImage = function () {\n return this.canvas_;\n };\n return ImageCanvas;\n}(_ImageBase2.default);\nexports.default = ImageCanvas;\n//# sourceMappingURL=ImageCanvas.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ImageCanvas.js?"); /***/ }), /***/ "./node_modules/ol/ImageState.js": /*!***************************************!*\ !*** ./node_modules/ol/ImageState.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/ImageState\n */\n/**\n * @enum {number}\n */\nexports.default = {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3,\n EMPTY: 4\n};\n//# sourceMappingURL=ImageState.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ImageState.js?"); /***/ }), /***/ "./node_modules/ol/ImageTile.js": /*!**************************************!*\ !*** ./node_modules/ol/ImageTile.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Tile = __webpack_require__(/*! ./Tile.js */ \"./node_modules/ol/Tile.js\");\n\nvar _Tile2 = _interopRequireDefault(_Tile);\n\nvar _TileState = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n\nvar _TileState2 = _interopRequireDefault(_TileState);\n\nvar _dom = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n\nvar _Image = __webpack_require__(/*! ./Image.js */ \"./node_modules/ol/Image.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/ImageTile\n */\n\nvar ImageTile = /** @class */function (_super) {\n __extends(ImageTile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n */\n function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n var _this = _super.call(this, tileCoord, state, opt_options) || this;\n /**\n * @private\n * @type {?string}\n */\n _this.crossOrigin_ = crossOrigin;\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n _this.src_ = src;\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n _this.image_ = new Image();\n if (crossOrigin !== null) {\n _this.image_.crossOrigin = crossOrigin;\n }\n /**\n * @private\n * @type {?function():void}\n */\n _this.unlisten_ = null;\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n _this.tileLoadFunction_ = tileLoadFunction;\n return _this;\n }\n /**\n * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n ImageTile.prototype.getImage = function () {\n return this.image_;\n };\n /**\n * @return {string} Key.\n */\n ImageTile.prototype.getKey = function () {\n return this.src_;\n };\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageTile.prototype.handleImageError_ = function () {\n this.state = _TileState2.default.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n };\n /**\n * Tracks successful image load.\n *\n * @private\n */\n ImageTile.prototype.handleImageLoad_ = function () {\n var image = /** @type {HTMLImageElement} */this.image_;\n if (image.naturalWidth && image.naturalHeight) {\n this.state = _TileState2.default.LOADED;\n } else {\n this.state = _TileState2.default.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Load not yet loaded URI.\n * @api\n */\n ImageTile.prototype.load = function () {\n if (this.state == _TileState2.default.ERROR) {\n this.state = _TileState2.default.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == _TileState2.default.IDLE) {\n this.state = _TileState2.default.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = (0, _Image.listenImage)(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n }\n };\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageTile.prototype.unlistenImage_ = function () {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n };\n return ImageTile;\n}(_Tile2.default);\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n var ctx = (0, _dom.createCanvasContext2D)(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\nexports.default = ImageTile;\n//# sourceMappingURL=ImageTile.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ImageTile.js?"); /***/ }), /***/ "./node_modules/ol/Kinetic.js": /*!************************************!*\ !*** ./node_modules/ol/Kinetic.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/Kinetic\n */\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = /** @class */function () {\n /**\n * @param {number} decay Rate of decay (must be negative).\n * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n * @param {number} delay Delay to consider to calculate the kinetic\n * initial values (milliseconds).\n */\n function Kinetic(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n /**\n * @private\n * @type {Array}\n */\n this.points_ = [];\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n /**\n * FIXME empty description for jsdoc\n */\n Kinetic.prototype.begin = function () {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n Kinetic.prototype.update = function (x, y) {\n this.points_.push(x, y, Date.now());\n };\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n Kinetic.prototype.end = function () {\n if (this.points_.length < 6) {\n // at least 2 points are required (i.e. there must be at least 6 elements\n // in the array)\n return false;\n }\n var delay = Date.now() - this.delay_;\n var lastIndex = this.points_.length - 3;\n if (this.points_[lastIndex + 2] < delay) {\n // the last tracked point is too old, which means that the user stopped\n // panning before releasing the map\n return false;\n }\n // get the first point which still falls into the delay time\n var firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n // we don't want a duration of 0 (divide by zero)\n // we also make sure the user panned for a duration of at least one frame\n // (1/60s) to compute sane displacement values\n if (duration < 1000 / 60) {\n return false;\n }\n var dx = this.points_[lastIndex] - this.points_[firstIndex];\n var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n this.angle_ = Math.atan2(dy, dx);\n this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n return this.initialVelocity_ > this.minVelocity_;\n };\n /**\n * @return {number} Total distance travelled (pixels).\n */\n Kinetic.prototype.getDistance = function () {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n };\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n Kinetic.prototype.getAngle = function () {\n return this.angle_;\n };\n return Kinetic;\n}();\nexports.default = Kinetic;\n//# sourceMappingURL=Kinetic.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Kinetic.js?"); /***/ }), /***/ "./node_modules/ol/Map.js": /*!********************************!*\ !*** ./node_modules/ol/Map.js ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Composite = __webpack_require__(/*! ./renderer/Composite.js */ \"./node_modules/ol/renderer/Composite.js\");\n\nvar _Composite2 = _interopRequireDefault(_Composite);\n\nvar _PluggableMap = __webpack_require__(/*! ./PluggableMap.js */ \"./node_modules/ol/PluggableMap.js\");\n\nvar _PluggableMap2 = _interopRequireDefault(_PluggableMap);\n\nvar _obj = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n\nvar _control = __webpack_require__(/*! ./control.js */ \"./node_modules/ol/control.js\");\n\nvar _interaction = __webpack_require__(/*! ./interaction.js */ \"./node_modules/ol/interaction.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Map\n */\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n * import Map from 'ol/Map';\n * import View from 'ol/View';\n * import TileLayer from 'ol/layer/Tile';\n * import OSM from 'ol/source/OSM';\n *\n * var map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1\n * }),\n * layers: [\n * new TileLayer({\n * source: new OSM()\n * })\n * ],\n * target: 'map'\n * });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @api\n */\nvar Map = /** @class */function (_super) {\n __extends(Map, _super);\n /**\n * @param {import(\"./PluggableMap.js\").MapOptions} options Map options.\n */\n function Map(options) {\n var _this = this;\n options = (0, _obj.assign)({}, options);\n if (!options.controls) {\n options.controls = (0, _control.defaults)();\n }\n if (!options.interactions) {\n options.interactions = (0, _interaction.defaults)({\n onFocusOnly: true\n });\n }\n _this = _super.call(this, options) || this;\n return _this;\n }\n Map.prototype.createRenderer = function () {\n return new _Composite2.default(this);\n };\n return Map;\n}(_PluggableMap2.default);\nexports.default = Map;\n//# sourceMappingURL=Map.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Map.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEvent.js": /*!********************************************!*\ !*** ./node_modules/ol/MapBrowserEvent.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _MapEvent = __webpack_require__(/*! ./MapEvent.js */ \"./node_modules/ol/MapEvent.js\");\n\nvar _MapEvent2 = _interopRequireDefault(_MapEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/MapBrowserEvent\n */\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nvar MapBrowserEvent = /** @class */function (_super) {\n __extends(MapBrowserEvent, _super);\n /**\n * @param {string} type Event type.\n * @param {import(\"./PluggableMap.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean=} opt_dragging Is the map currently being dragged?\n * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n */\n function MapBrowserEvent(type, map, originalEvent, opt_dragging, opt_frameState) {\n var _this = _super.call(this, type, map, opt_frameState) || this;\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n _this.originalEvent = originalEvent;\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {?import(\"./pixel.js\").Pixel}\n */\n _this.pixel_ = null;\n /**\n * The coordinate in the user projection corresponding to the original browser event.\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n _this.coordinate_ = null;\n /**\n * Indicates if the map is currently being dragged. Only set for\n * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n *\n * @type {boolean}\n * @api\n */\n _this.dragging = opt_dragging !== undefined ? opt_dragging : false;\n return _this;\n }\n Object.defineProperty(MapBrowserEvent.prototype, \"pixel\", {\n /**\n * The map pixel relative to the viewport corresponding to the original event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n get: function get() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n },\n set: function set(pixel) {\n this.pixel_ = pixel;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MapBrowserEvent.prototype, \"coordinate\", {\n /**\n * The coordinate corresponding to the original browser event. This will be in the user\n * projection if one is set. Otherwise it will be in the view projection.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n get: function get() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n },\n set: function set(coordinate) {\n this.coordinate_ = coordinate;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @api\n */\n MapBrowserEvent.prototype.preventDefault = function () {\n _super.prototype.preventDefault.call(this);\n this.originalEvent.preventDefault();\n };\n /**\n * Prevents further propagation of the current event.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n * @api\n */\n MapBrowserEvent.prototype.stopPropagation = function () {\n _super.prototype.stopPropagation.call(this);\n this.originalEvent.stopPropagation();\n };\n return MapBrowserEvent;\n}(_MapEvent2.default);\nexports.default = MapBrowserEvent;\n//# sourceMappingURL=MapBrowserEvent.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/MapBrowserEvent.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEventHandler.js": /*!***************************************************!*\ !*** ./node_modules/ol/MapBrowserEventHandler.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Target = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n\nvar _Target2 = _interopRequireDefault(_Target);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _MapBrowserEvent = __webpack_require__(/*! ./MapBrowserEvent.js */ \"./node_modules/ol/MapBrowserEvent.js\");\n\nvar _MapBrowserEvent2 = _interopRequireDefault(_MapBrowserEvent);\n\nvar _MapBrowserEventType = __webpack_require__(/*! ./MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n\nvar _MapBrowserEventType2 = _interopRequireDefault(_MapBrowserEventType);\n\nvar _EventType3 = __webpack_require__(/*! ./pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n\nvar _EventType4 = _interopRequireDefault(_EventType3);\n\nvar _has = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @module ol/MapBrowserEventHandler\n */\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar MapBrowserEventHandler = /** @class */function (_super) {\n __extends(MapBrowserEventHandler, _super);\n /**\n * @param {import(\"./PluggableMap.js\").default} map The map with the viewport to listen to events on.\n * @param {number=} moveTolerance The minimal distance the pointer must travel to trigger a move.\n */\n function MapBrowserEventHandler(map, moveTolerance) {\n var _this = _super.call(this, map) || this;\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./PluggableMap.js\").default}\n * @private\n */\n _this.map_ = map;\n /**\n * @type {any}\n * @private\n */\n _this.clickTimeoutId_;\n /**\n * @type {boolean}\n * @private\n */\n _this.dragging_ = false;\n /**\n * @type {!Array}\n * @private\n */\n _this.dragListenerKeys_ = [];\n /**\n * @type {number}\n * @private\n */\n _this.moveTolerance_ = moveTolerance ? moveTolerance * _has.DEVICE_PIXEL_RATIO : _has.DEVICE_PIXEL_RATIO;\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent}\n * @private\n */\n _this.down_ = null;\n var element = _this.map_.getViewport();\n /**\n * @type {number}\n * @private\n */\n _this.activePointers_ = 0;\n /**\n * @type {!Object}\n * @private\n */\n _this.trackedTouches_ = {};\n _this.element_ = element;\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n _this.pointerdownListenerKey_ = (0, _events.listen)(element, _EventType4.default.POINTERDOWN, _this.handlePointerDown_, _this);\n /**\n * @type {PointerEvent}\n * @private\n */\n _this.originalPointerMoveEvent_;\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n _this.relayedListenerKey_ = (0, _events.listen)(element, _EventType4.default.POINTERMOVE, _this.relayEvent_, _this);\n /**\n * @private\n */\n _this.boundHandleTouchMove_ = _this.handleTouchMove_.bind(_this);\n _this.element_.addEventListener(_EventType2.default.TOUCHMOVE, _this.boundHandleTouchMove_, _has.PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n return _this;\n }\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.emulateClick_ = function (pointerEvent) {\n var newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.CLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.DBLCLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(function () {\n this.clickTimeoutId_ = undefined;\n var newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.SINGLECLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n }.bind(this), 250);\n }\n };\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.updateActivePointers_ = function (pointerEvent) {\n var event = pointerEvent;\n if (event.type == _MapBrowserEventType2.default.POINTERUP || event.type == _MapBrowserEventType2.default.POINTERCANCEL) {\n delete this.trackedTouches_[event.pointerId];\n } else if (event.type == _MapBrowserEventType2.default.POINTERDOWN) {\n this.trackedTouches_[event.pointerId] = true;\n }\n this.activePointers_ = Object.keys(this.trackedTouches_).length;\n };\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerUp_ = function (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.POINTERUP, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n // We emulate click events on left mouse button click, touch contact, and pen\n // contact. isMouseActionButton returns true in these cases (evt.button is set\n // to 0).\n // See http://www.w3.org/TR/pointerevents/#button-states\n // We only fire click, singleclick, and doubleclick if nobody has called\n // event.stopPropagation() or event.preventDefault().\n if (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {\n this.emulateClick_(this.down_);\n }\n if (this.activePointers_ === 0) {\n this.dragListenerKeys_.forEach(_events.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n };\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n MapBrowserEventHandler.prototype.isMouseActionButton_ = function (pointerEvent) {\n return pointerEvent.button === 0;\n };\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerDown_ = function (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.POINTERDOWN, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n this.down_ = pointerEvent;\n if (this.dragListenerKeys_.length === 0) {\n this.dragListenerKeys_.push((0, _events.listen)(document, _MapBrowserEventType2.default.POINTERMOVE, this.handlePointerMove_, this), (0, _events.listen)(document, _MapBrowserEventType2.default.POINTERUP, this.handlePointerUp_, this),\n /* Note that the listener for `pointercancel is set up on\n * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n * the `pointerup` and `pointermove` listeners.\n *\n * The reason for this is the following: `TouchSource.vacuumTouches_()`\n * issues `pointercancel` events, when there was no `touchend` for a\n * `touchstart`. Now, let's say a first `touchstart` is registered on\n * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n * But `documentPointerEventHandler_` doesn't know about the first\n * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n * only registered there.\n */\n (0, _events.listen)(this.element_, _MapBrowserEventType2.default.POINTERCANCEL, this.handlePointerUp_, this));\n if (this.element_.getRootNode && this.element_.getRootNode() !== document) {\n this.dragListenerKeys_.push((0, _events.listen)(this.element_.getRootNode(), _MapBrowserEventType2.default.POINTERUP, this.handlePointerUp_, this));\n }\n }\n };\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerMove_ = function (pointerEvent) {\n // Between pointerdown and pointerup, pointermove events are triggered.\n // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n // moved a significant distance.\n if (this.isMoving_(pointerEvent)) {\n this.dragging_ = true;\n var newEvent = new _MapBrowserEvent2.default(_MapBrowserEventType2.default.POINTERDRAG, this.map_, pointerEvent, this.dragging_);\n this.dispatchEvent(newEvent);\n }\n };\n /**\n * Wrap and relay a pointer event. Note that this requires that the type\n * string for the MapBrowserEvent matches the PointerEvent type.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.relayEvent_ = function (pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(new _MapBrowserEvent2.default(pointerEvent.type, this.map_, pointerEvent, dragging));\n };\n /**\n * Flexible handling of a `touch-action: none` css equivalent: because calling\n * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n * when an interaction (currently `DragPan` handles the event.\n * @param {TouchEvent} event Event.\n * @private\n */\n MapBrowserEventHandler.prototype.handleTouchMove_ = function (event) {\n // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n // may not be initialized yet when we get here on a platform without native pointer events.\n if (!this.originalPointerMoveEvent_ || this.originalPointerMoveEvent_.defaultPrevented) {\n event.preventDefault();\n }\n };\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n MapBrowserEventHandler.prototype.isMoving_ = function (pointerEvent) {\n return this.dragging_ || Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;\n };\n /**\n * Clean up.\n */\n MapBrowserEventHandler.prototype.disposeInternal = function () {\n if (this.relayedListenerKey_) {\n (0, _events.unlistenByKey)(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(_EventType2.default.TOUCHMOVE, this.boundHandleTouchMove_);\n if (this.pointerdownListenerKey_) {\n (0, _events.unlistenByKey)(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n this.dragListenerKeys_.forEach(_events.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.element_ = null;\n _super.prototype.disposeInternal.call(this);\n };\n return MapBrowserEventHandler;\n}(_Target2.default);\nexports.default = MapBrowserEventHandler;\n//# sourceMappingURL=MapBrowserEventHandler.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/MapBrowserEventHandler.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEventType.js": /*!************************************************!*\ !*** ./node_modules/ol/MapBrowserEventType.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexports.default = {\n /**\n * A true single click with no dragging and no double click. Note that this\n * event is delayed by 250 ms to ensure that it is not a double click.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n * @api\n */\n SINGLECLICK: 'singleclick',\n /**\n * A click with no dragging. A double click will fire two of this.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n * @api\n */\n CLICK: _EventType2.default.CLICK,\n /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: _EventType2.default.DBLCLICK,\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n /**\n * Triggered when a pointer is moved. Note that on touch devices this is\n * triggered when the map is panned, so is not the same as mousemove.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n * @api\n */\n POINTERMOVE: 'pointermove',\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel'\n};\n//# sourceMappingURL=MapBrowserEventType.js.map\n/**\n * @module ol/MapBrowserEventType\n */\n\n//# sourceURL=webpack:///./node_modules/ol/MapBrowserEventType.js?"); /***/ }), /***/ "./node_modules/ol/MapEvent.js": /*!*************************************!*\ !*** ./node_modules/ol/MapEvent.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Event = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/MapEvent\n */\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nvar MapEvent = /** @class */function (_super) {\n __extends(MapEvent, _super);\n /**\n * @param {string} type Event type.\n * @param {import(\"./PluggableMap.js\").default} map Map.\n * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n */\n function MapEvent(type, map, opt_frameState) {\n var _this = _super.call(this, type) || this;\n /**\n * The map where the event occurred.\n * @type {import(\"./PluggableMap.js\").default}\n * @api\n */\n _this.map = map;\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./PluggableMap.js\").FrameState}\n * @api\n */\n _this.frameState = opt_frameState !== undefined ? opt_frameState : null;\n return _this;\n }\n return MapEvent;\n}(_Event2.default);\nexports.default = MapEvent;\n//# sourceMappingURL=MapEvent.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/MapEvent.js?"); /***/ }), /***/ "./node_modules/ol/MapEventType.js": /*!*****************************************!*\ !*** ./node_modules/ol/MapEventType.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/MapEventType\n */\n/**\n * @enum {string}\n */\nexports.default = {\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend'\n};\n//# sourceMappingURL=MapEventType.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/MapEventType.js?"); /***/ }), /***/ "./node_modules/ol/MapProperty.js": /*!****************************************!*\ !*** ./node_modules/ol/MapProperty.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/MapProperty\n */\n/**\n * @enum {string}\n */\nexports.default = {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view'\n};\n//# sourceMappingURL=MapProperty.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/MapProperty.js?"); /***/ }), /***/ "./node_modules/ol/Object.js": /*!***********************************!*\ !*** ./node_modules/ol/Object.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ObjectEvent = undefined;\nexports.getChangeEventType = getChangeEventType;\n\nvar _Event = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nvar _ObjectEventType = __webpack_require__(/*! ./ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n\nvar _ObjectEventType2 = _interopRequireDefault(_ObjectEventType);\n\nvar _Observable = __webpack_require__(/*! ./Observable.js */ \"./node_modules/ol/Observable.js\");\n\nvar _Observable2 = _interopRequireDefault(_Observable);\n\nvar _obj = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Object\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nvar ObjectEvent = /** @class */function (_super) {\n __extends(ObjectEvent, _super);\n /**\n * @param {string} type The event type.\n * @param {string} key The property name.\n * @param {*} oldValue The old value for `key`.\n */\n function ObjectEvent(type, key, oldValue) {\n var _this = _super.call(this, type) || this;\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n _this.key = key;\n /**\n * The old value. To get the new value use `e.target.get(e.key)` where\n * `e` is the event object.\n * @type {*}\n * @api\n */\n _this.oldValue = oldValue;\n return _this;\n }\n return ObjectEvent;\n}(_Event2.default);\nexports.ObjectEvent = ObjectEvent;\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\n\nvar BaseObject = /** @class */function (_super) {\n __extends(BaseObject, _super);\n /**\n * @param {Object=} opt_values An object with key-value pairs.\n */\n function BaseObject(opt_values) {\n var _this = _super.call(this) || this;\n // Call {@link module:ol/util~getUid} to ensure that the order of objects' ids is\n // the same as the order in which they were created. This also helps to\n // ensure that object properties are always added in the same order, which\n // helps many JavaScript engines generate faster code.\n (0, _util.getUid)(_this);\n /**\n * @private\n * @type {Object}\n */\n _this.values_ = null;\n if (opt_values !== undefined) {\n _this.setProperties(opt_values);\n }\n return _this;\n }\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n BaseObject.prototype.get = function (key) {\n var value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n };\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n BaseObject.prototype.getKeys = function () {\n return this.values_ && Object.keys(this.values_) || [];\n };\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n BaseObject.prototype.getProperties = function () {\n return this.values_ && (0, _obj.assign)({}, this.values_) || {};\n };\n /**\n * @return {boolean} The object has properties.\n */\n BaseObject.prototype.hasProperties = function () {\n return !!this.values_;\n };\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n BaseObject.prototype.notify = function (key, oldValue) {\n var eventType;\n eventType = getChangeEventType(key);\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n eventType = _ObjectEventType2.default.PROPERTYCHANGE;\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n };\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean=} opt_silent Update without triggering an event.\n * @api\n */\n BaseObject.prototype.set = function (key, value, opt_silent) {\n var values = this.values_ || (this.values_ = {});\n if (opt_silent) {\n values[key] = value;\n } else {\n var oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n };\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object} values Values.\n * @param {boolean=} opt_silent Update without triggering an event.\n * @api\n */\n BaseObject.prototype.setProperties = function (values, opt_silent) {\n for (var key in values) {\n this.set(key, values[key], opt_silent);\n }\n };\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean=} opt_silent Unset without triggering an event.\n * @api\n */\n BaseObject.prototype.unset = function (key, opt_silent) {\n if (this.values_ && key in this.values_) {\n var oldValue = this.values_[key];\n delete this.values_[key];\n if ((0, _obj.isEmpty)(this.values_)) {\n this.values_ = null;\n }\n if (!opt_silent) {\n this.notify(key, oldValue);\n }\n }\n };\n return BaseObject;\n}(_Observable2.default);\n/**\n * @type {Object}\n */\nvar changeEventTypeCache = {};\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nfunction getChangeEventType(key) {\n return changeEventTypeCache.hasOwnProperty(key) ? changeEventTypeCache[key] : changeEventTypeCache[key] = 'change:' + key;\n}\nexports.default = BaseObject;\n//# sourceMappingURL=Object.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Object.js?"); /***/ }), /***/ "./node_modules/ol/ObjectEventType.js": /*!********************************************!*\ !*** ./node_modules/ol/ObjectEventType.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/ObjectEventType\n */\n/**\n * @enum {string}\n */\nexports.default = {\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange'\n};\n//# sourceMappingURL=ObjectEventType.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ObjectEventType.js?"); /***/ }), /***/ "./node_modules/ol/Observable.js": /*!***************************************!*\ !*** ./node_modules/ol/Observable.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.unByKey = unByKey;\n\nvar _Target = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n\nvar _Target2 = _interopRequireDefault(_Target);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Observable\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nvar Observable = /** @class */function (_super) {\n __extends(Observable, _super);\n function Observable() {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {number}\n */\n _this.revision_ = 0;\n return _this;\n }\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n Observable.prototype.changed = function () {\n ++this.revision_;\n this.dispatchEvent(_EventType2.default.CHANGE);\n };\n /**\n * Get the version number for this object. Each time the object is modified,\n * its version number will be incremented.\n * @return {number} Revision.\n * @api\n */\n Observable.prototype.getRevision = function () {\n return this.revision_;\n };\n /**\n * Listen for a certain type of event.\n * @param {string|Array} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\n Observable.prototype.on = function (type, listener) {\n if (Array.isArray(type)) {\n var len = type.length;\n var keys = new Array(len);\n for (var i = 0; i < len; ++i) {\n keys[i] = (0, _events.listen)(this, type[i], listener);\n }\n return keys;\n } else {\n return (0, _events.listen)(this, /** @type {string} */type, listener);\n }\n };\n /**\n * Listen once for a certain type of event.\n * @param {string|Array} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\n Observable.prototype.once = function (type, listener) {\n var key;\n if (Array.isArray(type)) {\n var len = type.length;\n key = new Array(len);\n for (var i = 0; i < len; ++i) {\n key[i] = (0, _events.listenOnce)(this, type[i], listener);\n }\n } else {\n key = (0, _events.listenOnce)(this, /** @type {string} */type, listener);\n }\n /** @type {Object} */listener.ol_key = key;\n return key;\n };\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @api\n */\n Observable.prototype.un = function (type, listener) {\n var key = /** @type {Object} */listener.ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (var i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n } else {\n this.removeEventListener(type, listener);\n }\n };\n return Observable;\n}(_Target2.default);\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nfunction unByKey(key) {\n if (Array.isArray(key)) {\n for (var i = 0, ii = key.length; i < ii; ++i) {\n (0, _events.unlistenByKey)(key[i]);\n }\n } else {\n (0, _events.unlistenByKey)( /** @type {import(\"./events.js\").EventsKey} */key);\n }\n}\nexports.default = Observable;\n//# sourceMappingURL=Observable.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Observable.js?"); /***/ }), /***/ "./node_modules/ol/Overlay.js": /*!************************************!*\ !*** ./node_modules/ol/Overlay.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _MapEventType = __webpack_require__(/*! ./MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n\nvar _MapEventType2 = _interopRequireDefault(_MapEventType);\n\nvar _OverlayPositioning = __webpack_require__(/*! ./OverlayPositioning.js */ \"./node_modules/ol/OverlayPositioning.js\");\n\nvar _OverlayPositioning2 = _interopRequireDefault(_OverlayPositioning);\n\nvar _css = __webpack_require__(/*! ./css.js */ \"./node_modules/ol/css.js\");\n\nvar _extent = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nvar _dom = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Overlay\n */\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @property {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning'\n};\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay';\n *\n * var popup = new Overlay({\n * element: document.getElementById('popup')\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /** @class */function (_super) {\n __extends(Overlay, _super);\n /**\n * @param {Options} options Overlay options.\n */\n function Overlay(options) {\n var _this = _super.call(this) || this;\n /**\n * @protected\n * @type {Options}\n */\n _this.options = options;\n /**\n * @protected\n * @type {number|string|undefined}\n */\n _this.id = options.id;\n /**\n * @protected\n * @type {boolean}\n */\n _this.insertFirst = options.insertFirst !== undefined ? options.insertFirst : true;\n /**\n * @protected\n * @type {boolean}\n */\n _this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n /**\n * @protected\n * @type {HTMLElement}\n */\n _this.element = document.createElement('div');\n _this.element.className = options.className !== undefined ? options.className : 'ol-overlay-container ' + _css.CLASS_SELECTABLE;\n _this.element.style.position = 'absolute';\n _this.element.style.pointerEvents = 'auto';\n var autoPan = options.autoPan;\n if (autoPan && 'object' !== (typeof autoPan === 'undefined' ? 'undefined' : _typeof(autoPan))) {\n autoPan = {\n animation: options.autoPanAnimation,\n margin: options.autoPanMargin\n };\n }\n /**\n * @protected\n * @type {PanIntoViewOptions|false}\n */\n _this.autoPan = /** @type {PanIntoViewOptions} */autoPan || false;\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n _this.rendered = {\n transform_: '',\n visible: true\n };\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n _this.mapPostrenderListenerKey = null;\n _this.addEventListener((0, _Object.getChangeEventType)(Property.ELEMENT), _this.handleElementChanged);\n _this.addEventListener((0, _Object.getChangeEventType)(Property.MAP), _this.handleMapChanged);\n _this.addEventListener((0, _Object.getChangeEventType)(Property.OFFSET), _this.handleOffsetChanged);\n _this.addEventListener((0, _Object.getChangeEventType)(Property.POSITION), _this.handlePositionChanged);\n _this.addEventListener((0, _Object.getChangeEventType)(Property.POSITIONING), _this.handlePositioningChanged);\n if (options.element !== undefined) {\n _this.setElement(options.element);\n }\n _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n _this.setPositioning(options.positioning !== undefined ? /** @type {import(\"./OverlayPositioning.js\").default} */options.positioning : _OverlayPositioning2.default.TOP_LEFT);\n if (options.position !== undefined) {\n _this.setPosition(options.position);\n }\n return _this;\n }\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n Overlay.prototype.getElement = function () {\n return (/** @type {HTMLElement|undefined} */this.get(Property.ELEMENT)\n );\n };\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n Overlay.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n Overlay.prototype.getMap = function () {\n return (/** @type {import(\"./PluggableMap.js\").default|undefined} */this.get(Property.MAP)\n );\n };\n /**\n * Get the offset of this overlay.\n * @return {Array} The offset.\n * @observable\n * @api\n */\n Overlay.prototype.getOffset = function () {\n return (/** @type {Array} */this.get(Property.OFFSET)\n );\n };\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n Overlay.prototype.getPosition = function () {\n return (/** @type {import(\"./coordinate.js\").Coordinate|undefined} */this.get(Property.POSITION)\n );\n };\n /**\n * Get the current positioning of this overlay.\n * @return {import(\"./OverlayPositioning.js\").default} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.getPositioning = function () {\n return (/** @type {import(\"./OverlayPositioning.js\").default} */this.get(Property.POSITIONING)\n );\n };\n /**\n * @protected\n */\n Overlay.prototype.handleElementChanged = function () {\n (0, _dom.removeChildren)(this.element);\n var element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n };\n /**\n * @protected\n */\n Overlay.prototype.handleMapChanged = function () {\n if (this.mapPostrenderListenerKey) {\n (0, _dom.removeNode)(this.element);\n (0, _events.unlistenByKey)(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n var map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = (0, _events.listen)(map, _MapEventType2.default.POSTRENDER, this.render, this);\n this.updatePixelPosition();\n var container = this.stopEvent ? map.getOverlayContainerStopEvent() : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n };\n /**\n * @protected\n */\n Overlay.prototype.render = function () {\n this.updatePixelPosition();\n };\n /**\n * @protected\n */\n Overlay.prototype.handleOffsetChanged = function () {\n this.updatePixelPosition();\n };\n /**\n * @protected\n */\n Overlay.prototype.handlePositionChanged = function () {\n this.updatePixelPosition();\n this.performAutoPan();\n };\n /**\n * @protected\n */\n Overlay.prototype.handlePositioningChanged = function () {\n this.updatePixelPosition();\n };\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n Overlay.prototype.setElement = function (element) {\n this.set(Property.ELEMENT, element);\n };\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n Overlay.prototype.setMap = function (map) {\n this.set(Property.MAP, map);\n };\n /**\n * Set the offset for this overlay.\n * @param {Array} offset Offset.\n * @observable\n * @api\n */\n Overlay.prototype.setOffset = function (offset) {\n this.set(Property.OFFSET, offset);\n };\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n Overlay.prototype.setPosition = function (position) {\n this.set(Property.POSITION, position);\n };\n /**\n * Pan the map so that the overlay is entirely visisble in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n Overlay.prototype.performAutoPan = function () {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n };\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action\n * @api\n */\n Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {\n var map = this.getMap();\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n var element = this.getElement();\n var overlayRect = this.getRect(element, [(0, _dom.outerWidth)(element), (0, _dom.outerHeight)(element)]);\n var panIntoViewOptions = opt_panIntoViewOptions || {};\n var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!(0, _extent.containsExtent)(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n var offsetLeft = overlayRect[0] - mapRect[0];\n var offsetRight = mapRect[2] - overlayRect[2];\n var offsetTop = overlayRect[1] - mapRect[1];\n var offsetBottom = mapRect[3] - overlayRect[3];\n var delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n if (delta[0] !== 0 || delta[1] !== 0) {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */map.getView().getCenterInternal();\n var centerPx = map.getPixelFromCoordinateInternal(center);\n var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n var panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing\n });\n }\n }\n };\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n Overlay.prototype.getRect = function (element, size) {\n var box = element.getBoundingClientRect();\n var offsetX = box.left + window.pageXOffset;\n var offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n };\n /**\n * Set the positioning for this overlay.\n * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.setPositioning = function (positioning) {\n this.set(Property.POSITIONING, positioning);\n };\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n Overlay.prototype.setVisible = function (visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n };\n /**\n * Update pixel position.\n * @protected\n */\n Overlay.prototype.updatePixelPosition = function () {\n var map = this.getMap();\n var position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n var pixel = map.getPixelFromCoordinate(position);\n var mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n };\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) {\n var style = this.element.style;\n var offset = this.getOffset();\n var positioning = this.getPositioning();\n this.setVisible(true);\n var x = Math.round(pixel[0] + offset[0]) + 'px';\n var y = Math.round(pixel[1] + offset[1]) + 'px';\n var posX = '0%';\n var posY = '0%';\n if (positioning == _OverlayPositioning2.default.BOTTOM_RIGHT || positioning == _OverlayPositioning2.default.CENTER_RIGHT || positioning == _OverlayPositioning2.default.TOP_RIGHT) {\n posX = '-100%';\n } else if (positioning == _OverlayPositioning2.default.BOTTOM_CENTER || positioning == _OverlayPositioning2.default.CENTER_CENTER || positioning == _OverlayPositioning2.default.TOP_CENTER) {\n posX = '-50%';\n }\n if (positioning == _OverlayPositioning2.default.BOTTOM_LEFT || positioning == _OverlayPositioning2.default.BOTTOM_CENTER || positioning == _OverlayPositioning2.default.BOTTOM_RIGHT) {\n posY = '-100%';\n } else if (positioning == _OverlayPositioning2.default.CENTER_LEFT || positioning == _OverlayPositioning2.default.CENTER_CENTER || positioning == _OverlayPositioning2.default.CENTER_RIGHT) {\n posY = '-50%';\n }\n var transform = \"translate(\" + posX + \", \" + posY + \") translate(\" + x + \", \" + y + \")\";\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n // @ts-ignore IE9\n style.msTransform = transform;\n }\n };\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n Overlay.prototype.getOptions = function () {\n return this.options;\n };\n return Overlay;\n}(_Object2.default);\nexports.default = Overlay;\n//# sourceMappingURL=Overlay.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Overlay.js?"); /***/ }), /***/ "./node_modules/ol/OverlayPositioning.js": /*!***********************************************!*\ !*** ./node_modules/ol/OverlayPositioning.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/OverlayPositioning\n */\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexports.default = {\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_CENTER: 'bottom-center',\n BOTTOM_RIGHT: 'bottom-right',\n CENTER_LEFT: 'center-left',\n CENTER_CENTER: 'center-center',\n CENTER_RIGHT: 'center-right',\n TOP_LEFT: 'top-left',\n TOP_CENTER: 'top-center',\n TOP_RIGHT: 'top-right'\n};\n//# sourceMappingURL=OverlayPositioning.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/OverlayPositioning.js?"); /***/ }), /***/ "./node_modules/ol/PluggableMap.js": /*!*****************************************!*\ !*** ./node_modules/ol/PluggableMap.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _Collection = __webpack_require__(/*! ./Collection.js */ \"./node_modules/ol/Collection.js\");\n\nvar _Collection2 = _interopRequireDefault(_Collection);\n\nvar _CollectionEventType = __webpack_require__(/*! ./CollectionEventType.js */ \"./node_modules/ol/CollectionEventType.js\");\n\nvar _CollectionEventType2 = _interopRequireDefault(_CollectionEventType);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _Group = __webpack_require__(/*! ./layer/Group.js */ \"./node_modules/ol/layer/Group.js\");\n\nvar _Group2 = _interopRequireDefault(_Group);\n\nvar _MapBrowserEvent = __webpack_require__(/*! ./MapBrowserEvent.js */ \"./node_modules/ol/MapBrowserEvent.js\");\n\nvar _MapBrowserEvent2 = _interopRequireDefault(_MapBrowserEvent);\n\nvar _MapBrowserEventHandler = __webpack_require__(/*! ./MapBrowserEventHandler.js */ \"./node_modules/ol/MapBrowserEventHandler.js\");\n\nvar _MapBrowserEventHandler2 = _interopRequireDefault(_MapBrowserEventHandler);\n\nvar _MapBrowserEventType = __webpack_require__(/*! ./MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n\nvar _MapBrowserEventType2 = _interopRequireDefault(_MapBrowserEventType);\n\nvar _MapEvent = __webpack_require__(/*! ./MapEvent.js */ \"./node_modules/ol/MapEvent.js\");\n\nvar _MapEvent2 = _interopRequireDefault(_MapEvent);\n\nvar _MapEventType = __webpack_require__(/*! ./MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n\nvar _MapEventType2 = _interopRequireDefault(_MapEventType);\n\nvar _MapProperty = __webpack_require__(/*! ./MapProperty.js */ \"./node_modules/ol/MapProperty.js\");\n\nvar _MapProperty2 = _interopRequireDefault(_MapProperty);\n\nvar _ObjectEventType = __webpack_require__(/*! ./ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n\nvar _ObjectEventType2 = _interopRequireDefault(_ObjectEventType);\n\nvar _EventType3 = __webpack_require__(/*! ./pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n\nvar _EventType4 = _interopRequireDefault(_EventType3);\n\nvar _EventType5 = __webpack_require__(/*! ./render/EventType.js */ \"./node_modules/ol/render/EventType.js\");\n\nvar _EventType6 = _interopRequireDefault(_EventType5);\n\nvar _TileQueue = __webpack_require__(/*! ./TileQueue.js */ \"./node_modules/ol/TileQueue.js\");\n\nvar _TileQueue2 = _interopRequireDefault(_TileQueue);\n\nvar _View = __webpack_require__(/*! ./View.js */ \"./node_modules/ol/View.js\");\n\nvar _View2 = _interopRequireDefault(_View);\n\nvar _ViewHint = __webpack_require__(/*! ./ViewHint.js */ \"./node_modules/ol/ViewHint.js\");\n\nvar _ViewHint2 = _interopRequireDefault(_ViewHint);\n\nvar _has = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n\nvar _functions = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n\nvar _transform = __webpack_require__(/*! ./transform.js */ \"./node_modules/ol/transform.js\");\n\nvar _asserts = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n\nvar _extent = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _proj = __webpack_require__(/*! ./proj.js */ \"./node_modules/ol/proj.js\");\n\nvar _size = __webpack_require__(/*! ./size.js */ \"./node_modules/ol/size.js\");\n\nvar _events = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n\nvar _dom = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/PluggableMap\n */\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {Array} declutterItems\n * @property {number} index\n * @property {Array} layerStatesArray\n * @property {number} layerIndex\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {TileQueue} tileQueue\n * @property {!Object>} usedTiles\n * @property {Array} viewHints\n * @property {!Object>} wantedTiles\n */\n/**\n * @typedef {Object} DeclutterItems\n * @property {Array<*>} items Declutter items of an executor.\n * @property {number} opacity Layer opacity.\n */\n/**\n * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction\n */\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection} [controls]\n * @property {Collection} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection} overlays\n * @property {Object} values\n */\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection|Array} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control~defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection|Array} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction~defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array|Collection|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection|Array} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered.\n * @property {View} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nvar PluggableMap = /** @class */function (_super) {\n __extends(PluggableMap, _super);\n /**\n * @param {MapOptions} options Map options.\n */\n function PluggableMap(options) {\n var _this = _super.call(this) || this;\n var optionsInternal = createOptionsInternal(options);\n /** @private */\n _this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);\n /**\n * @type {number}\n * @private\n */\n _this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n /**\n * @private\n * @type {number}\n */\n _this.pixelRatio_ = options.pixelRatio !== undefined ? options.pixelRatio : _has.DEVICE_PIXEL_RATIO;\n /**\n * @private\n * @type {*}\n */\n _this.postRenderTimeoutHandle_;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.animationDelayKey_;\n /**\n * @private\n */\n _this.animationDelay_ = function () {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }.bind(_this);\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n _this.coordinateToPixelTransform_ = (0, _transform.create)();\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n _this.pixelToCoordinateTransform_ = (0, _transform.create)();\n /**\n * @private\n * @type {number}\n */\n _this.frameIndex_ = 0;\n /**\n * @private\n * @type {?FrameState}\n */\n _this.frameState_ = null;\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n _this.previousExtent_ = null;\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n _this.viewPropertyListenerKey_ = null;\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n _this.viewChangeListenerKey_ = null;\n /**\n * @private\n * @type {?Array}\n */\n _this.layerGroupPropertyListenerKeys_ = null;\n /**\n * @private\n * @type {!HTMLElement}\n */\n _this.viewport_ = document.createElement('div');\n _this.viewport_.className = 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n _this.viewport_.style.position = 'relative';\n _this.viewport_.style.overflow = 'hidden';\n _this.viewport_.style.width = '100%';\n _this.viewport_.style.height = '100%';\n /**\n * @private\n * @type {!HTMLElement}\n */\n _this.overlayContainer_ = document.createElement('div');\n _this.overlayContainer_.style.position = 'absolute';\n _this.overlayContainer_.style.zIndex = '0';\n _this.overlayContainer_.style.width = '100%';\n _this.overlayContainer_.style.height = '100%';\n _this.overlayContainer_.style.pointerEvents = 'none';\n _this.overlayContainer_.className = 'ol-overlaycontainer';\n _this.viewport_.appendChild(_this.overlayContainer_);\n /**\n * @private\n * @type {!HTMLElement}\n */\n _this.overlayContainerStopEvent_ = document.createElement('div');\n _this.overlayContainerStopEvent_.style.position = 'absolute';\n _this.overlayContainerStopEvent_.style.zIndex = '0';\n _this.overlayContainerStopEvent_.style.width = '100%';\n _this.overlayContainerStopEvent_.style.height = '100%';\n _this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n _this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n _this.viewport_.appendChild(_this.overlayContainerStopEvent_);\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n _this.mapBrowserEventHandler_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.moveTolerance_ = options.moveTolerance;\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n _this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n /**\n * @private\n * @type {?Array}\n */\n _this.keyHandlerKeys_ = null;\n /**\n * @type {Collection}\n * @protected\n */\n _this.controls = optionsInternal.controls || new _Collection2.default();\n /**\n * @type {Collection}\n * @protected\n */\n _this.interactions = optionsInternal.interactions || new _Collection2.default();\n /**\n * @type {Collection}\n * @private\n */\n _this.overlays_ = optionsInternal.overlays;\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object}\n */\n _this.overlayIdIndex_ = {};\n /**\n * @type {import(\"./renderer/Map.js\").default}\n * @private\n */\n _this.renderer_ = null;\n /**\n * @type {undefined|function(Event): void}\n * @private\n */\n _this.handleResize_;\n /**\n * @private\n * @type {!Array}\n */\n _this.postRenderFunctions_ = [];\n /**\n * @private\n * @type {TileQueue}\n */\n _this.tileQueue_ = new _TileQueue2.default(_this.getTilePriority.bind(_this), _this.handleTileChange_.bind(_this));\n _this.addEventListener((0, _Object.getChangeEventType)(_MapProperty2.default.LAYERGROUP), _this.handleLayerGroupChanged_);\n _this.addEventListener((0, _Object.getChangeEventType)(_MapProperty2.default.VIEW), _this.handleViewChanged_);\n _this.addEventListener((0, _Object.getChangeEventType)(_MapProperty2.default.SIZE), _this.handleSizeChanged_);\n _this.addEventListener((0, _Object.getChangeEventType)(_MapProperty2.default.TARGET), _this.handleTargetChanged_);\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n _this.setProperties(optionsInternal.values);\n _this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n * @this {PluggableMap}\n */\n function (control) {\n control.setMap(this);\n }.bind(_this));\n _this.controls.addEventListener(_CollectionEventType2.default.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(this);\n }.bind(_this));\n _this.controls.addEventListener(_CollectionEventType2.default.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(null);\n }.bind(_this));\n _this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n * @this {PluggableMap}\n */\n function (interaction) {\n interaction.setMap(this);\n }.bind(_this));\n _this.interactions.addEventListener(_CollectionEventType2.default.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(this);\n }.bind(_this));\n _this.interactions.addEventListener(_CollectionEventType2.default.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(null);\n }.bind(_this));\n _this.overlays_.forEach(_this.addOverlayInternal_.bind(_this));\n _this.overlays_.addEventListener(_CollectionEventType2.default.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n this.addOverlayInternal_(\n /** @type {import(\"./Overlay.js\").default} */event.element);\n }.bind(_this));\n _this.overlays_.addEventListener(_CollectionEventType2.default.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n var overlay = /** @type {import(\"./Overlay.js\").default} */event.element;\n var id = overlay.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }.bind(_this));\n return _this;\n }\n /**\n * @abstract\n * @return {import(\"./renderer/Map.js\").default} The map renderer\n */\n PluggableMap.prototype.createRenderer = function () {\n throw new Error('Use a map type that has a createRenderer method');\n };\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n PluggableMap.prototype.addControl = function (control) {\n this.getControls().push(control);\n };\n /**\n * Add the given interaction to the map. If you want to add an interaction\n * at another point of the collection use `getInteraction()` and the methods\n * available on {@link module:ol/Collection~Collection}. This can be used to\n * stop the event propagation from the handleEvent function. The interactions\n * get to handle the events in the reverse order of this collection.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n PluggableMap.prototype.addInteraction = function (interaction) {\n this.getInteractions().push(interaction);\n };\n /**\n * Adds the given layer to the top of this map. If you want to add a layer\n * elsewhere in the stack, use `getLayers()` and the methods available on\n * {@link module:ol/Collection~Collection}.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @api\n */\n PluggableMap.prototype.addLayer = function (layer) {\n var layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n };\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n PluggableMap.prototype.addOverlay = function (overlay) {\n this.getOverlays().push(overlay);\n };\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n PluggableMap.prototype.addOverlayInternal_ = function (overlay) {\n var id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n };\n /**\n *\n * Clean up.\n */\n PluggableMap.prototype.disposeInternal = function () {\n this.setTarget(null);\n _super.prototype.disposeInternal.call(this);\n };\n /**\n * Detect features that intersect a pixel on the viewport, and execute a\n * callback with each intersecting feature. Layers included in the detection can\n * be configured through the `layerFilter` option in `opt_options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(this: S, import(\"./Feature.js\").FeatureLike,\n * import(\"./layer/Layer.js\").default): T} callback Feature callback. The callback will be\n * called with two arguments. The first argument is one\n * {@link module:ol/Feature feature} or\n * {@link module:ol/render/Feature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template S,T\n * @api\n */\n PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var coordinate = this.getCoordinateFromPixelInternal(pixel);\n opt_options = opt_options !== undefined ? opt_options : {};\n var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : _functions.TRUE;\n var checkWrapped = opt_options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null);\n };\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {Array} The detected features or\n * an empty array if none were found.\n * @api\n */\n PluggableMap.prototype.getFeaturesAtPixel = function (pixel, opt_options) {\n var features = [];\n this.forEachFeatureAtPixel(pixel, function (feature) {\n features.push(feature);\n }, opt_options);\n return features;\n };\n /**\n * Detect layers that have a color value at a pixel on the viewport, and\n * execute a callback with each matching layer. Layers included in the\n * detection can be configured through `opt_layerFilter`.\n *\n * Note: this may give false positives unless the map layers have had different `className`\n * properties assigned to them.\n *\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n * Layer callback. This callback will receive two arguments: first is the\n * {@link module:ol/layer/Layer layer}, second argument is an array representing\n * [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n * that do not currently support this argument. To stop detection, callback\n * functions can return a truthy value.\n * @param {AtPixelOptions=} opt_options Configuration options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template S,T\n * @api\n */\n PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var options = opt_options || {};\n var hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = options.layerFilter || _functions.TRUE;\n return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter);\n };\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through `opt_layerFilter`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {\n if (!this.frameState_) {\n return false;\n }\n var coordinate = this.getCoordinateFromPixelInternal(pixel);\n opt_options = opt_options !== undefined ? opt_options : {};\n var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : _functions.TRUE;\n var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var checkWrapped = opt_options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null);\n };\n /**\n * Returns the coordinate in user projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n PluggableMap.prototype.getEventCoordinate = function (event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n };\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n */\n PluggableMap.prototype.getEventCoordinateInternal = function (event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n };\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n PluggableMap.prototype.getEventPixel = function (event) {\n var viewportPosition = this.viewport_.getBoundingClientRect();\n var eventPosition =\n //FIXME Are we really calling this with a TouchEvent anywhere?\n 'changedTouches' in event ? /** @type {TouchEvent} */event.changedTouches[0] : /** @type {MouseEvent} */event;\n return [eventPosition.clientX - viewportPosition.left, eventPosition.clientY - viewportPosition.top];\n };\n /**\n * Get the target in which this map is rendered.\n * Note that this returns what is entered as an option or in setTarget:\n * if that was an element, it returns an element; if a string, it returns that.\n * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n * map is rendered in.\n * @observable\n * @api\n */\n PluggableMap.prototype.getTarget = function () {\n return (/** @type {HTMLElement|string|undefined} */this.get(_MapProperty2.default.TARGET)\n );\n };\n /**\n * Get the DOM element into which this map is rendered. In contrast to\n * `getTarget` this method always return an `Element`, or `null` if the\n * map has no target.\n * @return {HTMLElement} The element that the map is rendered in.\n * @api\n */\n PluggableMap.prototype.getTargetElement = function () {\n var target = this.getTarget();\n if (target !== undefined) {\n return typeof target === 'string' ? document.getElementById(target) : target;\n } else {\n return null;\n }\n };\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * user projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n * @api\n */\n PluggableMap.prototype.getCoordinateFromPixel = function (pixel) {\n return (0, _proj.toUserCoordinate)(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection());\n };\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * map view projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n */\n PluggableMap.prototype.getCoordinateFromPixelInternal = function (pixel) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return (0, _transform.apply)(frameState.pixelToCoordinateTransform, pixel.slice());\n }\n };\n /**\n * Get the map controls. Modifying this collection changes the controls\n * associated with the map.\n * @return {Collection} Controls.\n * @api\n */\n PluggableMap.prototype.getControls = function () {\n return this.controls;\n };\n /**\n * Get the map overlays. Modifying this collection changes the overlays\n * associated with the map.\n * @return {Collection} Overlays.\n * @api\n */\n PluggableMap.prototype.getOverlays = function () {\n return this.overlays_;\n };\n /**\n * Get an overlay by its identifier (the value returned by overlay.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n * @param {string|number} id Overlay identifier.\n * @return {import(\"./Overlay.js\").default} Overlay.\n * @api\n */\n PluggableMap.prototype.getOverlayById = function (id) {\n var overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n };\n /**\n * Get the map interactions. Modifying this collection changes the interactions\n * associated with the map.\n *\n * Interactions are used for e.g. pan, zoom and rotate.\n * @return {Collection} Interactions.\n * @api\n */\n PluggableMap.prototype.getInteractions = function () {\n return this.interactions;\n };\n /**\n * Get the layergroup associated with this map.\n * @return {LayerGroup} A layer group containing the layers in this map.\n * @observable\n * @api\n */\n PluggableMap.prototype.getLayerGroup = function () {\n return (/** @type {LayerGroup} */this.get(_MapProperty2.default.LAYERGROUP)\n );\n };\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection} Layers.\n * @api\n */\n PluggableMap.prototype.getLayers = function () {\n var layers = this.getLayerGroup().getLayers();\n return layers;\n };\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n PluggableMap.prototype.getLoading = function () {\n var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layer = layerStatesArray[i].layer;\n var source = /** @type {import(\"./layer/Layer.js\").default} */layer.getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n };\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the user\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n * @api\n */\n PluggableMap.prototype.getPixelFromCoordinate = function (coordinate) {\n var viewCoordinate = (0, _proj.fromUserCoordinate)(coordinate, this.getView().getProjection());\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n };\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the map view\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n */\n PluggableMap.prototype.getPixelFromCoordinateInternal = function (coordinate) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return (0, _transform.apply)(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n }\n };\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default} Renderer\n */\n PluggableMap.prototype.getRenderer = function () {\n return this.renderer_;\n };\n /**\n * Get the size of this map.\n * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n PluggableMap.prototype.getSize = function () {\n return (/** @type {import(\"./size.js\").Size|undefined} */this.get(_MapProperty2.default.SIZE)\n );\n };\n /**\n * Get the view associated with this map. A view manages properties such as\n * center and resolution.\n * @return {View} The view that controls this map.\n * @observable\n * @api\n */\n PluggableMap.prototype.getView = function () {\n return (/** @type {View} */this.get(_MapProperty2.default.VIEW)\n );\n };\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n PluggableMap.prototype.getViewport = function () {\n return this.viewport_;\n };\n /**\n * Get the element that serves as the container for overlays. Elements added to\n * this container will let mousedown and touchstart events through to the map,\n * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n * events.\n * @return {!HTMLElement} The map's overlay container.\n */\n PluggableMap.prototype.getOverlayContainer = function () {\n return this.overlayContainer_;\n };\n /**\n * Get the element that serves as a container for overlays that don't allow\n * event propagation. Elements added to this container won't let mousedown and\n * touchstart events through to the map, so clicks and gestures on an overlay\n * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n * @return {!HTMLElement} The map's overlay container that stops events.\n */\n PluggableMap.prototype.getOverlayContainerStopEvent = function () {\n return this.overlayContainerStopEvent_;\n };\n /**\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n PluggableMap.prototype.getTilePriority = function (tile, tileSourceKey, tileCenter, tileResolution) {\n return (0, _TileQueue.getTilePriority)(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution);\n };\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string=} opt_type Type.\n */\n PluggableMap.prototype.handleBrowserEvent = function (browserEvent, opt_type) {\n var type = opt_type || browserEvent.type;\n var mapBrowserEvent = new _MapBrowserEvent2.default(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n };\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n PluggableMap.prototype.handleMapBrowserEvent = function (mapBrowserEvent) {\n if (!this.frameState_) {\n // With no view defined, we cannot translate pixels into geographical\n // coordinates so interactions cannot be used.\n return;\n }\n var originalEvent = /** @type {PointerEvent} */mapBrowserEvent.originalEvent;\n var eventType = originalEvent.type;\n if (eventType === _EventType4.default.POINTERDOWN || eventType === _EventType2.default.WHEEL || eventType === _EventType2.default.KEYDOWN) {\n var rootNode = this.viewport_.getRootNode ? this.viewport_.getRootNode() : document;\n var target = rootNode === document ? /** @type {Node} */originalEvent.target : /** @type {ShadowRoot} */rootNode.elementFromPoint(originalEvent.clientX, originalEvent.clientY);\n if (\n // Abort if the target is a child of the container for elements whose events are not meant\n // to be handled by map interactions.\n this.overlayContainerStopEvent_.contains(target) ||\n // Abort if the event target is a child of the container that is no longer in the page.\n // It's possible for the target to no longer be in the page if it has been removed in an\n // event listener, this might happen in a Control that recreates it's content based on\n // user interaction either manually or via a render in something like https://reactjs.org/\n !(rootNode === document ? document.documentElement : rootNode).contains(target)) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n var interactionsArray = this.getInteractions().getArray();\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n for (var i = interactionsArray.length - 1; i >= 0; i--) {\n var interaction = interactionsArray[i];\n if (!interaction.getActive()) {\n continue;\n }\n var cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont) {\n break;\n }\n }\n }\n };\n /**\n * @protected\n */\n PluggableMap.prototype.handlePostRender = function () {\n var frameState = this.frameState_;\n // Manage the tile queue\n // Image loads are expensive and a limited resource, so try to use them\n // efficiently:\n // * When the view is static we allow a large number of parallel tile loads\n // to complete the frame as quickly as possible.\n // * When animating or interacting, image loads can cause janks, so we reduce\n // the maximum number of loads per frame and limit the number of parallel\n // tile loads to remain reactive to view changes and to reduce the chance of\n // loading tiles that will quickly disappear from view.\n var tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n var maxTotalLoading = this.maxTilesLoading_;\n var maxNewLoads = maxTotalLoading;\n if (frameState) {\n var hints = frameState.viewHints;\n if (hints[_ViewHint2.default.ANIMATING] || hints[_ViewHint2.default.INTERACTING]) {\n var lowOnFrameBudget = !_has.IMAGE_DECODE && Date.now() - frameState.time > 8;\n maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n maxNewLoads = lowOnFrameBudget ? 0 : 2;\n }\n }\n if (tileQueue.getTilesLoading() < maxTotalLoading) {\n tileQueue.reprioritize(); // FIXME only call if view has changed\n tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n }\n }\n if (frameState && this.hasListener(_EventType6.default.RENDERCOMPLETE) && !frameState.animate && !this.tileQueue_.getTilesLoading() && !this.getLoading()) {\n this.renderer_.dispatchRenderEvent(_EventType6.default.RENDERCOMPLETE, frameState);\n }\n var postRenderFunctions = this.postRenderFunctions_;\n for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleSizeChanged_ = function () {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n this.render();\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleTargetChanged_ = function () {\n // target may be undefined, null, a string or an Element.\n // If it's a string we convert it to an Element before proceeding.\n // If it's not now an Element we remove the viewport from the DOM.\n // If it's an Element we append the viewport element to it.\n var targetElement;\n if (this.getTarget()) {\n targetElement = this.getTargetElement();\n }\n if (this.mapBrowserEventHandler_) {\n for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n (0, _events.unlistenByKey)(this.keyHandlerKeys_[i]);\n }\n this.keyHandlerKeys_ = null;\n this.viewport_.removeEventListener(_EventType2.default.CONTEXTMENU, this.boundHandleBrowserEvent_);\n this.viewport_.removeEventListener(_EventType2.default.WHEEL, this.boundHandleBrowserEvent_);\n if (this.handleResize_ !== undefined) {\n removeEventListener(_EventType2.default.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n (0, _dom.removeNode)(this.viewport_);\n }\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderFunctions_.length = 0;\n this.renderer_.dispose();\n this.renderer_ = null;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n if (!this.renderer_) {\n this.renderer_ = this.createRenderer();\n }\n this.mapBrowserEventHandler_ = new _MapBrowserEventHandler2.default(this, this.moveTolerance_);\n for (var key in _MapBrowserEventType2.default) {\n this.mapBrowserEventHandler_.addEventListener(_MapBrowserEventType2.default[key], this.handleMapBrowserEvent.bind(this));\n }\n this.viewport_.addEventListener(_EventType2.default.CONTEXTMENU, this.boundHandleBrowserEvent_, false);\n this.viewport_.addEventListener(_EventType2.default.WHEEL, this.boundHandleBrowserEvent_, _has.PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n var keyboardEventTarget = !this.keyboardEventTarget_ ? targetElement : this.keyboardEventTarget_;\n this.keyHandlerKeys_ = [(0, _events.listen)(keyboardEventTarget, _EventType2.default.KEYDOWN, this.handleBrowserEvent, this), (0, _events.listen)(keyboardEventTarget, _EventType2.default.KEYPRESS, this.handleBrowserEvent, this)];\n if (!this.handleResize_) {\n this.handleResize_ = this.updateSize.bind(this);\n window.addEventListener(_EventType2.default.RESIZE, this.handleResize_, false);\n }\n }\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleTileChange_ = function () {\n this.render();\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleViewPropertyChanged_ = function () {\n this.render();\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleViewChanged_ = function () {\n if (this.viewPropertyListenerKey_) {\n (0, _events.unlistenByKey)(this.viewPropertyListenerKey_);\n this.viewPropertyListenerKey_ = null;\n }\n if (this.viewChangeListenerKey_) {\n (0, _events.unlistenByKey)(this.viewChangeListenerKey_);\n this.viewChangeListenerKey_ = null;\n }\n var view = this.getView();\n if (view) {\n this.updateViewportSize_();\n this.viewPropertyListenerKey_ = (0, _events.listen)(view, _ObjectEventType2.default.PROPERTYCHANGE, this.handleViewPropertyChanged_, this);\n this.viewChangeListenerKey_ = (0, _events.listen)(view, _EventType2.default.CHANGE, this.handleViewPropertyChanged_, this);\n view.resolveConstraints(0);\n }\n this.render();\n };\n /**\n * @private\n */\n PluggableMap.prototype.handleLayerGroupChanged_ = function () {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(_events.unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n var layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.layerGroupPropertyListenerKeys_ = [(0, _events.listen)(layerGroup, _ObjectEventType2.default.PROPERTYCHANGE, this.render, this), (0, _events.listen)(layerGroup, _EventType2.default.CHANGE, this.render, this)];\n }\n this.render();\n };\n /**\n * @return {boolean} Is rendered.\n */\n PluggableMap.prototype.isRendered = function () {\n return !!this.frameState_;\n };\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n PluggableMap.prototype.renderSync = function () {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n };\n /**\n * Redraws all text after new fonts have loaded\n */\n PluggableMap.prototype.redrawText = function () {\n var layerStates = this.getLayerGroup().getLayerStatesArray();\n for (var i = 0, ii = layerStates.length; i < ii; ++i) {\n var layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n };\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n PluggableMap.prototype.render = function () {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\n };\n /**\n * Remove the given control from the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n * if the control was not found).\n * @api\n */\n PluggableMap.prototype.removeControl = function (control) {\n return this.getControls().remove(control);\n };\n /**\n * Remove the given interaction from the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n * undefined if the interaction was not found).\n * @api\n */\n PluggableMap.prototype.removeInteraction = function (interaction) {\n return this.getInteractions().remove(interaction);\n };\n /**\n * Removes the given layer from the map.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n * layer was not found).\n * @api\n */\n PluggableMap.prototype.removeLayer = function (layer) {\n var layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n };\n /**\n * Remove the given overlay from the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n * if the overlay was not found).\n * @api\n */\n PluggableMap.prototype.removeOverlay = function (overlay) {\n return this.getOverlays().remove(overlay);\n };\n /**\n * @param {number} time Time.\n * @private\n */\n PluggableMap.prototype.renderFrame_ = function (time) {\n var size = this.getSize();\n var view = this.getView();\n var previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n var frameState = null;\n if (size !== undefined && (0, _size.hasArea)(size) && view && view.isDef()) {\n var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n var viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutterItems: previousFrameState ? previousFrameState.declutterItems : [],\n extent: (0, _extent.getForViewAndSize)(viewState.center, viewState.resolution, viewState.rotation, size),\n index: this.frameIndex_++,\n layerIndex: 0,\n layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {}\n };\n }\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n if (previousFrameState) {\n var moveStart = !this.previousExtent_ || !(0, _extent.isEmpty)(this.previousExtent_) && !(0, _extent.equals)(frameState.extent, this.previousExtent_);\n if (moveStart) {\n this.dispatchEvent(new _MapEvent2.default(_MapEventType2.default.MOVESTART, this, previousFrameState));\n this.previousExtent_ = (0, _extent.createOrUpdateEmpty)(this.previousExtent_);\n }\n }\n var idle = this.previousExtent_ && !frameState.viewHints[_ViewHint2.default.ANIMATING] && !frameState.viewHints[_ViewHint2.default.INTERACTING] && !(0, _extent.equals)(frameState.extent, this.previousExtent_);\n if (idle) {\n this.dispatchEvent(new _MapEvent2.default(_MapEventType2.default.MOVEEND, this, frameState));\n (0, _extent.clone)(frameState.extent, this.previousExtent_);\n }\n }\n this.dispatchEvent(new _MapEvent2.default(_MapEventType2.default.POSTRENDER, this, frameState));\n this.postRenderTimeoutHandle_ = setTimeout(this.handlePostRender.bind(this), 0);\n };\n /**\n * Sets the layergroup of this map.\n * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n * @observable\n * @api\n */\n PluggableMap.prototype.setLayerGroup = function (layerGroup) {\n this.set(_MapProperty2.default.LAYERGROUP, layerGroup);\n };\n /**\n * Set the size of this map.\n * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n PluggableMap.prototype.setSize = function (size) {\n this.set(_MapProperty2.default.SIZE, size);\n };\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string|undefined} target The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n PluggableMap.prototype.setTarget = function (target) {\n this.set(_MapProperty2.default.TARGET, target);\n };\n /**\n * Set the view for this map.\n * @param {View} view The view that controls this map.\n * @observable\n * @api\n */\n PluggableMap.prototype.setView = function (view) {\n this.set(_MapProperty2.default.VIEW, view);\n };\n /**\n * Force a recalculation of the map viewport size. This should be called when\n * third-party code changes the size of the map viewport.\n * @api\n */\n PluggableMap.prototype.updateSize = function () {\n var targetElement = this.getTargetElement();\n if (!targetElement) {\n this.setSize(undefined);\n } else {\n var computedStyle = getComputedStyle(targetElement);\n this.setSize([targetElement.offsetWidth - parseFloat(computedStyle['borderLeftWidth']) - parseFloat(computedStyle['paddingLeft']) - parseFloat(computedStyle['paddingRight']) - parseFloat(computedStyle['borderRightWidth']), targetElement.offsetHeight - parseFloat(computedStyle['borderTopWidth']) - parseFloat(computedStyle['paddingTop']) - parseFloat(computedStyle['paddingBottom']) - parseFloat(computedStyle['borderBottomWidth'])]);\n }\n this.updateViewportSize_();\n };\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @private\n */\n PluggableMap.prototype.updateViewportSize_ = function () {\n var view = this.getView();\n if (view) {\n var size = undefined;\n var computedStyle = getComputedStyle(this.viewport_);\n if (computedStyle.width && computedStyle.height) {\n size = [parseInt(computedStyle.width, 10), parseInt(computedStyle.height, 10)];\n }\n view.setViewportSize(size);\n }\n };\n return PluggableMap;\n}(_Object2.default);\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n var keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ? document.getElementById(options.keyboardEventTarget) : options.keyboardEventTarget;\n }\n /**\n * @type {Object}\n */\n var values = {};\n var layerGroup = options.layers && typeof /** @type {?} */options.layers.getLayers === 'function' ? /** @type {LayerGroup} */options.layers : new _Group2.default({ layers: /** @type {Collection} */options.layers });\n values[_MapProperty2.default.LAYERGROUP] = layerGroup;\n values[_MapProperty2.default.TARGET] = options.target;\n values[_MapProperty2.default.VIEW] = options.view !== undefined ? options.view : new _View2.default();\n var controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new _Collection2.default(options.controls.slice());\n } else {\n (0, _asserts.assert)(typeof /** @type {?} */options.controls.getArray === 'function', 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = /** @type {Collection} */options.controls;\n }\n }\n var interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new _Collection2.default(options.interactions.slice());\n } else {\n (0, _asserts.assert)(typeof /** @type {?} */options.interactions.getArray === 'function', 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = /** @type {Collection} */options.interactions;\n }\n }\n var overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new _Collection2.default(options.overlays.slice());\n } else {\n (0, _asserts.assert)(typeof /** @type {?} */options.overlays.getArray === 'function', 49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n overlays = options.overlays;\n }\n } else {\n overlays = new _Collection2.default();\n }\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values\n };\n}\nexports.default = PluggableMap;\n//# sourceMappingURL=PluggableMap.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/PluggableMap.js?"); /***/ }), /***/ "./node_modules/ol/Tile.js": /*!*********************************!*\ !*** ./node_modules/ol/Tile.js ***! \*********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Target = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n\nvar _Target2 = _interopRequireDefault(_Target);\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _TileState = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n\nvar _TileState2 = _interopRequireDefault(_TileState);\n\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n\nvar _easing = __webpack_require__(/*! ./easing.js */ \"./node_modules/ol/easing.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/Tile\n */\n\n/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * var xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * var data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /** @class */function (_super) {\n __extends(Tile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options=} opt_options Tile options.\n */\n function Tile(tileCoord, state, opt_options) {\n var _this = _super.call(this) || this;\n var options = opt_options ? opt_options : {};\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n _this.tileCoord = tileCoord;\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n _this.state = state;\n /**\n * An \"interim\" tile for this tile. The interim tile may be used while this\n * one is loading, for \"smooth\" transitions when changing params/dimensions\n * on the source.\n * @type {Tile}\n */\n _this.interimTile = null;\n /**\n * The tile is available at the highest possible resolution. Subclasses can\n * set this to `false` initially. Tile load listeners will not be\n * unregistered before this is set to `true` and a `#changed()` is called.\n * @type {boolean}\n */\n _this.hifi = true;\n /**\n * A key assigned to the tile. This is used by the tile source to determine\n * if this tile can effectively be used, or if a new tile should be created\n * and this one be used as an interim tile for this new tile.\n * @type {string}\n */\n _this.key = '';\n /**\n * The duration for the opacity transition.\n * @type {number}\n */\n _this.transition_ = options.transition === undefined ? 250 : options.transition;\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @type {Object}\n */\n _this.transitionStarts_ = {};\n return _this;\n }\n /**\n * @protected\n */\n Tile.prototype.changed = function () {\n this.dispatchEvent(_EventType2.default.CHANGE);\n };\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n Tile.prototype.release = function () {};\n /**\n * @return {string} Key.\n */\n Tile.prototype.getKey = function () {\n return this.key + '/' + this.tileCoord;\n };\n /**\n * Get the interim tile most suitable for rendering using the chain of interim\n * tiles. This corresponds to the most recent tile that has been loaded, if no\n * such tile exists, the original tile is returned.\n * @return {!Tile} Best tile for rendering.\n */\n Tile.prototype.getInterimTile = function () {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n var tile = this.interimTile;\n // find the first loaded tile and return it. Since the chain is sorted in\n // decreasing order of creation time, there is no need to search the remainder\n // of the list (all those tiles correspond to older requests and will be\n // cleaned up by refreshInterimChain)\n do {\n if (tile.getState() == _TileState2.default.LOADED) {\n // Show tile immediately instead of fading it in after loading, because\n // the interim tile is in place already\n this.transition_ = 0;\n return tile;\n }\n tile = tile.interimTile;\n } while (tile);\n // we can not find a better tile\n return this;\n };\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n Tile.prototype.refreshInterimChain = function () {\n if (!this.interimTile) {\n return;\n }\n var tile = this.interimTile;\n var prev = /** @type {Tile} */this;\n do {\n if (tile.getState() == _TileState2.default.LOADED) {\n //we have a loaded tile, we can discard the rest of the list\n //we would could abort any LOADING tile request\n //older than this tile (i.e. any LOADING tile following this entry in the chain)\n tile.interimTile = null;\n break;\n } else if (tile.getState() == _TileState2.default.LOADING) {\n //keep this LOADING tile any loaded tiles later in the chain are\n //older than this tile, so we're still interested in the request\n prev = tile;\n } else if (tile.getState() == _TileState2.default.IDLE) {\n //the head of the list is the most current tile, we don't need\n //to start any other requests for this chain\n prev.interimTile = tile.interimTile;\n } else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n };\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n Tile.prototype.getTileCoord = function () {\n return this.tileCoord;\n };\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n Tile.prototype.getState = function () {\n return this.state;\n };\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n Tile.prototype.setState = function (state) {\n if (this.state !== _TileState2.default.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n };\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n Tile.prototype.load = function () {\n (0, _util.abstract)();\n };\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n Tile.prototype.getAlpha = function (id, time) {\n if (!this.transition_) {\n return 1;\n }\n var start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n var delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return (0, _easing.easeIn)(delta / this.transition_);\n };\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n Tile.prototype.inTransition = function (id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n };\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n Tile.prototype.endTransition = function (id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n };\n return Tile;\n}(_Target2.default);\nexports.default = Tile;\n//# sourceMappingURL=Tile.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/Tile.js?"); /***/ }), /***/ "./node_modules/ol/TileCache.js": /*!**************************************!*\ !*** ./node_modules/ol/TileCache.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _LRUCache = __webpack_require__(/*! ./structs/LRUCache.js */ \"./node_modules/ol/structs/LRUCache.js\");\n\nvar _LRUCache2 = _interopRequireDefault(_LRUCache);\n\nvar _tilecoord = __webpack_require__(/*! ./tilecoord.js */ \"./node_modules/ol/tilecoord.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/TileCache\n */\n\nvar TileCache = /** @class */function (_super) {\n __extends(TileCache, _super);\n function TileCache() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {!Object} usedTiles Used tiles.\n */\n TileCache.prototype.expireCache = function (usedTiles) {\n while (this.canExpireCache()) {\n var tile = this.peekLast();\n if (tile.getKey() in usedTiles) {\n break;\n } else {\n this.pop().release();\n }\n }\n };\n /**\n * Prune all tiles from the cache that don't have the same z as the newest tile.\n */\n TileCache.prototype.pruneExceptNewestZ = function () {\n if (this.getCount() === 0) {\n return;\n }\n var key = this.peekFirstKey();\n var tileCoord = (0, _tilecoord.fromKey)(key);\n var z = tileCoord[0];\n this.forEach(function (tile) {\n if (tile.tileCoord[0] !== z) {\n this.remove((0, _tilecoord.getKey)(tile.tileCoord));\n tile.release();\n }\n }.bind(this));\n };\n return TileCache;\n}(_LRUCache2.default);\nexports.default = TileCache;\n//# sourceMappingURL=TileCache.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/TileCache.js?"); /***/ }), /***/ "./node_modules/ol/TileQueue.js": /*!**************************************!*\ !*** ./node_modules/ol/TileQueue.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTilePriority = getTilePriority;\n\nvar _EventType = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _PriorityQueue = __webpack_require__(/*! ./structs/PriorityQueue.js */ \"./node_modules/ol/structs/PriorityQueue.js\");\n\nvar _PriorityQueue2 = _interopRequireDefault(_PriorityQueue);\n\nvar _TileState = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n\nvar _TileState2 = _interopRequireDefault(_TileState);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/TileQueue\n */\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\nvar TileQueue = /** @class */function (_super) {\n __extends(TileQueue, _super);\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n function TileQueue(tilePriorityFunction, tileChangeCallback) {\n var _this = _super.call(this,\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n function (element) {\n return tilePriorityFunction.apply(null, element);\n },\n /**\n * @param {Array} element Element.\n * @return {string} Key.\n */\n function (element) {\n return (/** @type {import(\"./Tile.js\").default} */element[0].getKey()\n );\n }) || this;\n /** @private */\n _this.boundHandleTileChange_ = _this.handleTileChange.bind(_this);\n /**\n * @private\n * @type {function(): ?}\n */\n _this.tileChangeCallback_ = tileChangeCallback;\n /**\n * @private\n * @type {number}\n */\n _this.tilesLoading_ = 0;\n /**\n * @private\n * @type {!Object}\n */\n _this.tilesLoadingKeys_ = {};\n return _this;\n }\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n */\n TileQueue.prototype.enqueue = function (element) {\n var added = _super.prototype.enqueue.call(this, element);\n if (added) {\n var tile = element[0];\n tile.addEventListener(_EventType2.default.CHANGE, this.boundHandleTileChange_);\n }\n return added;\n };\n /**\n * @return {number} Number of tiles loading.\n */\n TileQueue.prototype.getTilesLoading = function () {\n return this.tilesLoading_;\n };\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n TileQueue.prototype.handleTileChange = function (event) {\n var tile = /** @type {import(\"./Tile.js\").default} */event.target;\n var state = tile.getState();\n if (tile.hifi && state === _TileState2.default.LOADED || state === _TileState2.default.ERROR || state === _TileState2.default.EMPTY) {\n tile.removeEventListener(_EventType2.default.CHANGE, this.boundHandleTileChange_);\n var tileKey = tile.getKey();\n if (tileKey in this.tilesLoadingKeys_) {\n delete this.tilesLoadingKeys_[tileKey];\n --this.tilesLoading_;\n }\n this.tileChangeCallback_();\n }\n };\n /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n TileQueue.prototype.loadMoreTiles = function (maxTotalLoading, maxNewLoads) {\n var newLoads = 0;\n var state, tile, tileKey;\n while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads && this.getCount() > 0) {\n tile = /** @type {import(\"./Tile.js\").default} */this.dequeue()[0];\n tileKey = tile.getKey();\n state = tile.getState();\n if (state === _TileState2.default.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n };\n return TileQueue;\n}(_PriorityQueue2.default);\nexports.default = TileQueue;\n/**\n * @param {import('./PluggableMap.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n\nfunction getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) {\n // Filter out tiles at higher zoom levels than the current zoom level, or that\n // are outside the visible extent.\n if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n return _PriorityQueue.DROP;\n }\n if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n return _PriorityQueue.DROP;\n }\n // Prioritize the highest zoom level tiles closest to the focus.\n // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n // Within a zoom level, tiles are prioritized by the distance in pixels between\n // the center of the tile and the center of the viewport. The factor of 65536\n // means that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n var center = frameState.viewState.center;\n var deltaX = tileCenter[0] - center[0];\n var deltaY = tileCenter[1] - center[1];\n return 65536 * Math.log(tileResolution) + Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n}\n//# sourceMappingURL=TileQueue.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/TileQueue.js?"); /***/ }), /***/ "./node_modules/ol/TileRange.js": /*!**************************************!*\ !*** ./node_modules/ol/TileRange.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createOrUpdate = createOrUpdate;\n/**\n * @module ol/TileRange\n */\n/**\n * A representation of a contiguous block of tiles. A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = /** @class */function () {\n /**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n */\n function TileRange(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n /**\n * @type {number}\n */\n this.maxX = maxX;\n /**\n * @type {number}\n */\n this.minY = minY;\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n TileRange.prototype.contains = function (tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n TileRange.prototype.containsTileRange = function (tileRange) {\n return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX && this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;\n };\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n TileRange.prototype.containsXY = function (x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n TileRange.prototype.equals = function (tileRange) {\n return this.minX == tileRange.minX && this.minY == tileRange.minY && this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;\n };\n /**\n * @param {TileRange} tileRange Tile range.\n */\n TileRange.prototype.extend = function (tileRange) {\n if (tileRange.minX < this.minX) {\n this.minX = tileRange.minX;\n }\n if (tileRange.maxX > this.maxX) {\n this.maxX = tileRange.maxX;\n }\n if (tileRange.minY < this.minY) {\n this.minY = tileRange.minY;\n }\n if (tileRange.maxY > this.maxY) {\n this.maxY = tileRange.maxY;\n }\n };\n /**\n * @return {number} Height.\n */\n TileRange.prototype.getHeight = function () {\n return this.maxY - this.minY + 1;\n };\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n TileRange.prototype.getSize = function () {\n return [this.getWidth(), this.getHeight()];\n };\n /**\n * @return {number} Width.\n */\n TileRange.prototype.getWidth = function () {\n return this.maxX - this.minX + 1;\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n TileRange.prototype.intersects = function (tileRange) {\n return this.minX <= tileRange.maxX && this.maxX >= tileRange.minX && this.minY <= tileRange.maxY && this.maxY >= tileRange.minY;\n };\n return TileRange;\n}();\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange=} tileRange TileRange.\n * @return {TileRange} Tile range.\n */\nfunction createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n if (tileRange !== undefined) {\n tileRange.minX = minX;\n tileRange.maxX = maxX;\n tileRange.minY = minY;\n tileRange.maxY = maxY;\n return tileRange;\n } else {\n return new TileRange(minX, maxX, minY, maxY);\n }\n}\nexports.default = TileRange;\n//# sourceMappingURL=TileRange.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/TileRange.js?"); /***/ }), /***/ "./node_modules/ol/TileState.js": /*!**************************************!*\ !*** ./node_modules/ol/TileState.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/TileState\n */\n/**\n * @enum {number}\n */\nexports.default = {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n /**\n * Indicates that tile loading failed\n * @type {number}\n */\n ERROR: 3,\n EMPTY: 4\n};\n//# sourceMappingURL=TileState.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/TileState.js?"); /***/ }), /***/ "./node_modules/ol/VectorRenderTile.js": /*!*********************************************!*\ !*** ./node_modules/ol/VectorRenderTile.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Tile = __webpack_require__(/*! ./Tile.js */ \"./node_modules/ol/Tile.js\");\n\nvar _Tile2 = _interopRequireDefault(_Tile);\n\nvar _dom = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/VectorRenderTile\n */\n\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder\n * @property {number} renderedTileRevision\n * @property {number} renderedResolution\n * @property {number} renderedRevision\n * @property {number} renderedZ\n * @property {number} renderedTileResolution\n * @property {number} renderedTileZ\n */\n/**\n * @type {Array}\n */\nvar canvasPool = [];\nvar VectorRenderTile = /** @class */function (_super) {\n __extends(VectorRenderTile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n * @param {function(VectorRenderTile):Array} getSourceTiles Function\n * to get source tiles for this tile.\n */\n function VectorRenderTile(tileCoord, state, urlTileCoord, getSourceTiles) {\n var _this = _super.call(this, tileCoord, state, { transition: 0 }) || this;\n /**\n * @private\n * @type {!Object}\n */\n _this.context_ = {};\n /**\n * Executor groups by layer uid. Entries are read/written by the renderer.\n * @type {Object>}\n */\n _this.executorGroups = {};\n /**\n * Number of loading source tiles. Read/written by the source.\n * @type {number}\n */\n _this.loadingSourceTiles = 0;\n /**\n * Tile keys of error source tiles. Read/written by the source.\n * @type {Object}\n */\n _this.errorSourceTileKeys = {};\n /**\n * @type {Object}\n */\n _this.hitDetectionImageData = {};\n /**\n * @private\n * @type {!Object}\n */\n _this.replayState_ = {};\n /**\n * @type {Array}\n */\n _this.sourceTiles = null;\n /**\n * @type {number}\n */\n _this.wantedResolution;\n /**\n * @type {!function():Array}\n */\n _this.getSourceTiles = getSourceTiles.bind(undefined, _this);\n /**\n * z of the source tiles of the last getSourceTiles call.\n * @type {number}\n */\n _this.sourceZ = -1;\n /**\n * True when all tiles for this tile's nominal resolution are available.\n * @type {boolean}\n */\n _this.hifi = false;\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n _this.wrappedTileCoord = urlTileCoord;\n return _this;\n }\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {CanvasRenderingContext2D} The rendering context.\n */\n VectorRenderTile.prototype.getContext = function (layer) {\n var key = (0, _util.getUid)(layer);\n if (!(key in this.context_)) {\n this.context_[key] = (0, _dom.createCanvasContext2D)(1, 1, canvasPool);\n }\n return this.context_[key];\n };\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {boolean} Tile has a rendering context for the given layer.\n */\n VectorRenderTile.prototype.hasContext = function (layer) {\n return (0, _util.getUid)(layer) in this.context_;\n };\n /**\n * Get the Canvas for this tile.\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {HTMLCanvasElement} Canvas.\n */\n VectorRenderTile.prototype.getImage = function (layer) {\n return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n };\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {ReplayState} The replay state.\n */\n VectorRenderTile.prototype.getReplayState = function (layer) {\n var key = (0, _util.getUid)(layer);\n if (!(key in this.replayState_)) {\n this.replayState_[key] = {\n dirty: false,\n renderedRenderOrder: null,\n renderedResolution: NaN,\n renderedRevision: -1,\n renderedTileResolution: NaN,\n renderedTileRevision: -1,\n renderedZ: -1,\n renderedTileZ: -1\n };\n }\n return this.replayState_[key];\n };\n /**\n * Load the tile.\n */\n VectorRenderTile.prototype.load = function () {\n this.getSourceTiles();\n };\n /**\n * Remove from the cache due to expiry\n */\n VectorRenderTile.prototype.release = function () {\n for (var key in this.context_) {\n canvasPool.push(this.context_[key].canvas);\n }\n _super.prototype.release.call(this);\n };\n return VectorRenderTile;\n}(_Tile2.default);\nexports.default = VectorRenderTile;\n//# sourceMappingURL=VectorRenderTile.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/VectorRenderTile.js?"); /***/ }), /***/ "./node_modules/ol/VectorTile.js": /*!***************************************!*\ !*** ./node_modules/ol/VectorTile.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Tile = __webpack_require__(/*! ./Tile.js */ \"./node_modules/ol/Tile.js\");\n\nvar _Tile2 = _interopRequireDefault(_Tile);\n\nvar _TileState = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n\nvar _TileState2 = _interopRequireDefault(_TileState);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/VectorTile\n */\n\nvar VectorTile = /** @class */function (_super) {\n __extends(VectorTile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Data source url.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n */\n function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n var _this = _super.call(this, tileCoord, state, opt_options) || this;\n /**\n * Extent of this tile; set by the source.\n * @type {import(\"./extent.js\").Extent}\n */\n _this.extent = null;\n /**\n * @private\n * @type {import(\"./format/Feature.js\").default}\n */\n _this.format_ = format;\n /**\n * @private\n * @type {Array}\n */\n _this.features_ = null;\n /**\n * @private\n * @type {import(\"./featureloader.js\").FeatureLoader}\n */\n _this.loader_;\n /**\n * Feature projection of this tile; set by the source.\n * @type {import(\"./proj/Projection.js\").default}\n */\n _this.projection = null;\n /**\n * Resolution of this tile; set by the source.\n * @type {number}\n */\n _this.resolution;\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n _this.tileLoadFunction_ = tileLoadFunction;\n /**\n * @private\n * @type {string}\n */\n _this.url_ = src;\n return _this;\n }\n /**\n * Get the feature format assigned for reading this tile's features.\n * @return {import(\"./format/Feature.js\").default} Feature format.\n * @api\n */\n VectorTile.prototype.getFormat = function () {\n return this.format_;\n };\n /**\n * Get the features for this tile. Geometries will be in the view projection.\n * @return {Array} Features.\n * @api\n */\n VectorTile.prototype.getFeatures = function () {\n return this.features_;\n };\n /**\n * @return {string} Key.\n */\n VectorTile.prototype.getKey = function () {\n return this.url_;\n };\n /**\n * Load not yet loaded URI.\n */\n VectorTile.prototype.load = function () {\n if (this.state == _TileState2.default.IDLE) {\n this.setState(_TileState2.default.LOADING);\n this.tileLoadFunction_(this, this.url_);\n if (this.loader_) {\n this.loader_(this.extent, this.resolution, this.projection);\n }\n }\n };\n /**\n * Handler for successful tile load.\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n */\n VectorTile.prototype.onLoad = function (features, dataProjection) {\n this.setFeatures(features);\n };\n /**\n * Handler for tile load errors.\n */\n VectorTile.prototype.onError = function () {\n this.setState(_TileState2.default.ERROR);\n };\n /**\n * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n * Sets the features for the tile.\n * @param {Array} features Features.\n * @api\n */\n VectorTile.prototype.setFeatures = function (features) {\n this.features_ = features;\n this.setState(_TileState2.default.LOADED);\n };\n /**\n * Set the feature loader for reading this tile's features.\n * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n * @api\n */\n VectorTile.prototype.setLoader = function (loader) {\n this.loader_ = loader;\n };\n return VectorTile;\n}(_Tile2.default);\nexports.default = VectorTile;\n//# sourceMappingURL=VectorTile.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/VectorTile.js?"); /***/ }), /***/ "./node_modules/ol/View.js": /*!*********************************!*\ !*** ./node_modules/ol/View.js ***! \*********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createCenterConstraint = createCenterConstraint;\nexports.createResolutionConstraint = createResolutionConstraint;\nexports.createRotationConstraint = createRotationConstraint;\nexports.isNoopAnimation = isNoopAnimation;\n\nvar _Object = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _GeometryType = __webpack_require__(/*! ./geom/GeometryType.js */ \"./node_modules/ol/geom/GeometryType.js\");\n\nvar _GeometryType2 = _interopRequireDefault(_GeometryType);\n\nvar _Units = __webpack_require__(/*! ./proj/Units.js */ \"./node_modules/ol/proj/Units.js\");\n\nvar _Units2 = _interopRequireDefault(_Units);\n\nvar _ViewHint = __webpack_require__(/*! ./ViewHint.js */ \"./node_modules/ol/ViewHint.js\");\n\nvar _ViewHint2 = _interopRequireDefault(_ViewHint);\n\nvar _ViewProperty = __webpack_require__(/*! ./ViewProperty.js */ \"./node_modules/ol/ViewProperty.js\");\n\nvar _ViewProperty2 = _interopRequireDefault(_ViewProperty);\n\nvar _common = __webpack_require__(/*! ./tilegrid/common.js */ \"./node_modules/ol/tilegrid/common.js\");\n\nvar _proj = __webpack_require__(/*! ./proj.js */ \"./node_modules/ol/proj.js\");\n\nvar _functions = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n\nvar _coordinate = __webpack_require__(/*! ./coordinate.js */ \"./node_modules/ol/coordinate.js\");\n\nvar _asserts = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n\nvar _obj = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n\nvar _centerconstraint = __webpack_require__(/*! ./centerconstraint.js */ \"./node_modules/ol/centerconstraint.js\");\n\nvar _math = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n\nvar _resolutionconstraint = __webpack_require__(/*! ./resolutionconstraint.js */ \"./node_modules/ol/resolutionconstraint.js\");\n\nvar _rotationconstraint = __webpack_require__(/*! ./rotationconstraint.js */ \"./node_modules/ol/rotationconstraint.js\");\n\nvar _easing = __webpack_require__(/*! ./easing.js */ \"./node_modules/ol/easing.js\");\n\nvar _extent = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _array = __webpack_require__(/*! ./array.js */ \"./node_modules/ol/array.js\");\n\nvar _Polygon = __webpack_require__(/*! ./geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/View\n */\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean):void} callback\n */\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint. It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`. If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`. Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`. Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge. If `true` the map\n * may show multiple worlds at low zoom levels. Only used if the `projection` is\n * global. Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array} [resolutions] Resolutions to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n */\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation. If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `opt_anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nvar View = /** @class */function (_super) {\n __extends(View, _super);\n /**\n * @param {ViewOptions=} opt_options View options.\n */\n function View(opt_options) {\n var _this = _super.call(this) || this;\n var options = (0, _obj.assign)({}, opt_options);\n /**\n * @private\n * @type {Array}\n */\n _this.hints_ = [0, 0];\n /**\n * @private\n * @type {Array>}\n */\n _this.animations_ = [];\n /**\n * @private\n * @type {number|undefined}\n */\n _this.updateAnimationKey_;\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n _this.projection_ = (0, _proj.createProjection)(options.projection, 'EPSG:3857');\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n _this.viewportSize_ = [100, 100];\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n _this.targetCenter_ = null;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.targetResolution_;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.targetRotation_;\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n _this.cancelAnchor_ = undefined;\n if (options.center) {\n options.center = (0, _proj.fromUserCoordinate)(options.center, _this.projection_);\n }\n if (options.extent) {\n options.extent = (0, _proj.fromUserExtent)(options.extent, _this.projection_);\n }\n _this.applyOptions_(options);\n return _this;\n }\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n View.prototype.applyOptions_ = function (options) {\n /**\n * @type {Object}\n */\n var properties = {};\n var resolutionConstraintInfo = createResolutionConstraint(options);\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n /**\n * @private\n * @type {Array|undefined}\n */\n this.resolutions_ = options.resolutions;\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n var centerConstraint = createCenterConstraint(options);\n var resolutionConstraint = resolutionConstraintInfo.constraint;\n var rotationConstraint = createRotationConstraint(options);\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint\n };\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(options.center !== undefined ? options.center : null);\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n this.setProperties(properties);\n /**\n * @private\n * @type {ViewOptions}\n */\n this.options_ = options;\n };\n /**\n * Get an updated version of the view options used to construct the view. The\n * current resolution (or zoom), center, and rotation are applied to any stored\n * options. The provided options can be used to apply new min/max zoom or\n * resolution limits.\n * @param {ViewOptions} newOptions New options to be applied.\n * @return {ViewOptions} New options updated with the current view state.\n */\n View.prototype.getUpdatedOptions_ = function (newOptions) {\n var options = (0, _obj.assign)({}, this.options_);\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n // preserve center\n options.center = this.getCenterInternal();\n // preserve rotation\n options.rotation = this.getRotation();\n return (0, _obj.assign)({}, options, newOptions);\n };\n /**\n * Animate the view. The view's center, zoom (or resolution), and rotation\n * can be animated for smooth transitions between view states. For example,\n * to animate the view to a new zoom level:\n *\n * view.animate({zoom: view.getZoom() + 1});\n *\n * By default, the animation lasts one second and uses in-and-out easing. You\n * can customize this behavior by including `duration` (in milliseconds) and\n * `easing` options (see {@link module:ol/easing}).\n *\n * To chain together multiple animations, call the method with multiple\n * animation objects. For example, to first zoom and then pan:\n *\n * view.animate({zoom: 10}, {center: [0, 0]});\n *\n * If you provide a function as the last argument to the animate method, it\n * will get called at the end of an animation series. The callback will be\n * called with `true` if the animation series completed on its own or `false`\n * if it was cancelled.\n *\n * Animations are cancelled by user interactions (e.g. dragging the map) or by\n * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n * (or another method that calls one of these).\n *\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n * options. Multiple animations can be run in series by passing multiple\n * options objects. To run multiple animations in parallel, call the method\n * multiple times. An optional callback can be provided as a final\n * argument. The callback will be called with a boolean indicating whether\n * the animation completed without being cancelled.\n * @api\n */\n View.prototype.animate = function (var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n var options = arguments[i];\n if (options.center) {\n options = (0, _obj.assign)({}, options);\n options.center = (0, _proj.fromUserCoordinate)(options.center, this.getProjection());\n }\n if (options.anchor) {\n options = (0, _obj.assign)({}, options);\n options.anchor = (0, _proj.fromUserCoordinate)(options.anchor, this.getProjection());\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n };\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n View.prototype.animateInternal = function (var_args) {\n var animationCount = arguments.length;\n var callback;\n if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n if (!this.isDef()) {\n // if view properties are not yet set, shortcut to the final state\n var state = arguments[animationCount - 1];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n var start = Date.now();\n var center = this.targetCenter_.slice();\n var resolution = this.targetResolution_;\n var rotation = this.targetRotation_;\n var series = [];\n for (var i = 0; i < animationCount; ++i) {\n var options = /** @type {AnimationOptions} */arguments[i];\n var animation = {\n start: start,\n complete: false,\n anchor: options.anchor,\n duration: options.duration !== undefined ? options.duration : 1000,\n easing: options.easing || _easing.inAndOut,\n callback: callback\n };\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.getResolutionForZoom(options.zoom);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n var delta = (0, _math.modulo)(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\n // check if animation is a no-op\n if (isNoopAnimation(animation)) {\n animation.complete = true;\n // we still push it onto the series for callback handling\n } else {\n start += animation.duration;\n }\n series.push(animation);\n }\n this.animations_.push(series);\n this.setHint(_ViewHint2.default.ANIMATING, 1);\n this.updateAnimations_();\n };\n /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n View.prototype.getAnimating = function () {\n return this.hints_[_ViewHint2.default.ANIMATING] > 0;\n };\n /**\n * Determine if the user is interacting with the view, such as panning or zooming.\n * @return {boolean} The view is being interacted with.\n * @api\n */\n View.prototype.getInteracting = function () {\n return this.hints_[_ViewHint2.default.INTERACTING] > 0;\n };\n /**\n * Cancel any ongoing animations.\n * @api\n */\n View.prototype.cancelAnimations = function () {\n this.setHint(_ViewHint2.default.ANIMATING, -this.hints_[_ViewHint2.default.ANIMATING]);\n var anchor;\n for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n var series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (var j = 0, jj = series.length; j < jj; ++j) {\n var animation = series[j];\n if (!animation.complete) {\n anchor = animation.anchor;\n break;\n }\n }\n }\n }\n this.animations_.length = 0;\n this.cancelAnchor_ = anchor;\n };\n /**\n * Update all animations.\n */\n View.prototype.updateAnimations_ = function () {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n var now = Date.now();\n var more = false;\n for (var i = this.animations_.length - 1; i >= 0; --i) {\n var series = this.animations_[i];\n var seriesComplete = true;\n for (var j = 0, jj = series.length; j < jj; ++j) {\n var animation = series[j];\n if (animation.complete) {\n continue;\n }\n var elapsed = now - animation.start;\n var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n var progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n var x0 = animation.sourceCenter[0];\n var y0 = animation.sourceCenter[1];\n var x1 = animation.targetCenter[0];\n var y1 = animation.targetCenter[1];\n var x = x0 + progress * (x1 - x0);\n var y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n var resolution = progress === 1 ? animation.targetResolution : animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n var size = this.getViewportSize_(this.getRotation());\n var constrainedResolution = this.constraints_.resolution(resolution, 0, size, true);\n this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor);\n }\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {\n var rotation = progress === 1 ? (0, _math.modulo)(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n var constrainedRotation = this.constraints_.rotation(rotation, true);\n this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor);\n }\n this.targetRotation_ = rotation;\n }\n this.applyTargetState_(true);\n more = true;\n if (!animation.complete) {\n break;\n }\n }\n if (seriesComplete) {\n this.animations_[i] = null;\n this.setHint(_ViewHint2.default.ANIMATING, -1);\n var callback = series[0].callback;\n if (callback) {\n animationCallback(callback, true);\n }\n }\n }\n // prune completed series\n this.animations_ = this.animations_.filter(Boolean);\n if (more && this.updateAnimationKey_ === undefined) {\n this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this));\n }\n };\n /**\n * @param {number} rotation Target rotation.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n */\n View.prototype.calculateCenterRotate = function (rotation, anchor) {\n var center;\n var currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n (0, _coordinate.rotate)(center, rotation - this.getRotation());\n (0, _coordinate.add)(center, anchor);\n }\n return center;\n };\n /**\n * @param {number} resolution Target resolution.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n */\n View.prototype.calculateCenterZoom = function (resolution, anchor) {\n var center;\n var currentCenter = this.getCenterInternal();\n var currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n var x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution;\n var y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution;\n center = [x, y];\n }\n return center;\n };\n /**\n * Returns the current viewport size.\n * @private\n * @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n View.prototype.getViewportSize_ = function (opt_rotation) {\n var size = this.viewportSize_;\n if (opt_rotation) {\n var w = size[0];\n var h = size[1];\n return [Math.abs(w * Math.cos(opt_rotation)) + Math.abs(h * Math.sin(opt_rotation)), Math.abs(w * Math.sin(opt_rotation)) + Math.abs(h * Math.cos(opt_rotation))];\n } else {\n return size;\n }\n };\n /**\n * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n * to avoid performance hit and layout reflow.\n * This should be done on map size change.\n * Note: the constraints are not resolved during an animation to avoid stopping it\n * @param {import(\"./size.js\").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed\n */\n View.prototype.setViewportSize = function (opt_size) {\n this.viewportSize_ = Array.isArray(opt_size) ? opt_size.slice() : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\n };\n /**\n * Get the view center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n * @observable\n * @api\n */\n View.prototype.getCenter = function () {\n var center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return (0, _proj.toUserCoordinate)(center, this.getProjection());\n };\n /**\n * Get the view center without transforming to user projection.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n */\n View.prototype.getCenterInternal = function () {\n return (/** @type {import(\"./coordinate.js\").Coordinate|undefined} */this.get(_ViewProperty2.default.CENTER)\n );\n };\n /**\n * @return {Constraints} Constraints.\n */\n View.prototype.getConstraints = function () {\n return this.constraints_;\n };\n /**\n * @return {boolean} Resolution constraint is set\n */\n View.prototype.getConstrainResolution = function () {\n return this.options_.constrainResolution;\n };\n /**\n * @param {Array=} opt_hints Destination array.\n * @return {Array} Hint.\n */\n View.prototype.getHints = function (opt_hints) {\n if (opt_hints !== undefined) {\n opt_hints[0] = this.hints_[0];\n opt_hints[1] = this.hints_[1];\n return opt_hints;\n } else {\n return this.hints_.slice();\n }\n };\n /**\n * Calculate the extent for the current view state and the passed size.\n * The size is the pixel dimensions of the box into which the calculated extent\n * should fit. In most cases you want to get the extent of the entire map,\n * that is `map.getSize()`.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size\n * of the map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n View.prototype.calculateExtent = function (opt_size) {\n var extent = this.calculateExtentInternal(opt_size);\n return (0, _proj.toUserExtent)(extent, this.getProjection());\n };\n /**\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size of the\n * first map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n View.prototype.calculateExtentInternal = function (opt_size) {\n var size = opt_size || this.getViewportSize_();\n var center = /** @type {!import(\"./coordinate.js\").Coordinate} */this.getCenterInternal();\n (0, _asserts.assert)(center, 1); // The view center is not defined\n var resolution = /** @type {!number} */this.getResolution();\n (0, _asserts.assert)(resolution !== undefined, 2); // The view resolution is not defined\n var rotation = /** @type {!number} */this.getRotation();\n (0, _asserts.assert)(rotation !== undefined, 3); // The view rotation is not defined\n return (0, _extent.getForViewAndSize)(center, resolution, rotation, size);\n };\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n View.prototype.getMaxResolution = function () {\n return this.maxResolution_;\n };\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n View.prototype.getMinResolution = function () {\n return this.minResolution_;\n };\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n View.prototype.getMaxZoom = function () {\n return (/** @type {number} */this.getZoomForResolution(this.minResolution_)\n );\n };\n /**\n * Set a new maximum zoom level for the view.\n * @param {number} zoom The maximum zoom level.\n * @api\n */\n View.prototype.setMaxZoom = function (zoom) {\n this.applyOptions_(this.getUpdatedOptions_({ maxZoom: zoom }));\n };\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n View.prototype.getMinZoom = function () {\n return (/** @type {number} */this.getZoomForResolution(this.maxResolution_)\n );\n };\n /**\n * Set a new minimum zoom level for the view.\n * @param {number} zoom The minimum zoom level.\n * @api\n */\n View.prototype.setMinZoom = function (zoom) {\n this.applyOptions_(this.getUpdatedOptions_({ minZoom: zoom }));\n };\n /**\n * Set whether the view shoud allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n View.prototype.setConstrainResolution = function (enabled) {\n this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: enabled }));\n };\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n View.prototype.getProjection = function () {\n return this.projection_;\n };\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n View.prototype.getResolution = function () {\n return (/** @type {number|undefined} */this.get(_ViewProperty2.default.RESOLUTION)\n );\n };\n /**\n * Get the resolutions for the view. This returns the array of resolutions\n * passed to the constructor of the View, or undefined if none were given.\n * @return {Array|undefined} The resolutions of the view.\n * @api\n */\n View.prototype.getResolutions = function () {\n return this.resolutions_;\n };\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n * @api\n */\n View.prototype.getResolutionForExtent = function (extent, opt_size) {\n return this.getResolutionForExtentInternal((0, _proj.fromUserExtent)(extent, this.getProjection()), opt_size);\n };\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n View.prototype.getResolutionForExtentInternal = function (extent, opt_size) {\n var size = opt_size || this.getViewportSize_();\n var xResolution = (0, _extent.getWidth)(extent) / size[0];\n var yResolution = (0, _extent.getHeight)(extent) / size[1];\n return Math.max(xResolution, yResolution);\n };\n /**\n * Return a function that returns a value between 0 and 1 for a\n * resolution. Exponential scaling is assumed.\n * @param {number=} opt_power Power.\n * @return {function(number): number} Resolution for value function.\n */\n View.prototype.getResolutionForValueFunction = function (opt_power) {\n var power = opt_power || 2;\n var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n var minResolution = this.minResolution_;\n var max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} value Value.\n * @return {number} Resolution.\n */\n function (value) {\n var resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\n );\n };\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n View.prototype.getRotation = function () {\n return (/** @type {number} */this.get(_ViewProperty2.default.ROTATION)\n );\n };\n /**\n * Return a function that returns a resolution for a value between\n * 0 and 1. Exponential scaling is assumed.\n * @param {number=} opt_power Power.\n * @return {function(number): number} Value for resolution function.\n */\n View.prototype.getValueForResolutionFunction = function (opt_power) {\n var logPower = Math.log(opt_power || 2);\n var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n var minResolution = this.minResolution_;\n var max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n var value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n };\n /**\n * @return {State} View state.\n */\n View.prototype.getState = function () {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */this.getCenterInternal();\n var projection = this.getProjection();\n var resolution = /** @type {number} */this.getResolution();\n var rotation = this.getRotation();\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n rotation: rotation,\n zoom: this.getZoom()\n };\n };\n /**\n * Get the current zoom level. This method may return non-integer zoom levels\n * if the view does not constrain the resolution, or if an interaction or\n * animation is underway.\n * @return {number|undefined} Zoom.\n * @api\n */\n View.prototype.getZoom = function () {\n var zoom;\n var resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n };\n /**\n * Get the zoom level for a resolution.\n * @param {number} resolution The resolution.\n * @return {number|undefined} The zoom level for the provided resolution.\n * @api\n */\n View.prototype.getZoomForResolution = function (resolution) {\n var offset = this.minZoom_ || 0;\n var max, zoomFactor;\n if (this.resolutions_) {\n var nearest = (0, _array.linearFindNearest)(this.resolutions_, resolution, 1);\n offset = nearest;\n max = this.resolutions_[nearest];\n if (nearest == this.resolutions_.length - 1) {\n zoomFactor = 2;\n } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\n }\n } else {\n max = this.maxResolution_;\n zoomFactor = this.zoomFactor_;\n }\n return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n };\n /**\n * Get the resolution for a zoom level.\n * @param {number} zoom Zoom level.\n * @return {number} The view resolution for the provided zoom level.\n * @api\n */\n View.prototype.getResolutionForZoom = function (zoom) {\n if (this.resolutions_) {\n if (this.resolutions_.length <= 1) {\n return 0;\n }\n var baseLevel = (0, _math.clamp)(Math.floor(zoom), 0, this.resolutions_.length - 2);\n var zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return this.resolutions_[baseLevel] / Math.pow(zoomFactor, (0, _math.clamp)(zoom - baseLevel, 0, 1));\n } else {\n return this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_);\n }\n };\n /**\n * Fit the given geometry or extent based on the given map size and border.\n * The size is pixel dimensions of the box to fit the extent into.\n * In most cases you will want to use the map size, that is `map.getSize()`.\n * Takes care of the map angle.\n * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n * extent to fit the view to.\n * @param {FitOptions=} opt_options Options.\n * @api\n */\n View.prototype.fit = function (geometryOrExtent, opt_options) {\n var options = (0, _obj.assign)({ size: this.getViewportSize_() }, opt_options || {});\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n var geometry;\n (0, _asserts.assert)(Array.isArray(geometryOrExtent) || typeof /** @type {?} */geometryOrExtent.getSimplifiedGeometry === 'function', 24); // Invalid extent or geometry provided as `geometry`\n if (Array.isArray(geometryOrExtent)) {\n (0, _asserts.assert)(!(0, _extent.isEmpty)(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n var extent = (0, _proj.fromUserExtent)(geometryOrExtent, this.getProjection());\n geometry = (0, _Polygon.fromExtent)(extent);\n } else if (geometryOrExtent.getType() === _GeometryType2.default.CIRCLE) {\n var extent = (0, _proj.fromUserExtent)(geometryOrExtent.getExtent(), this.getProjection());\n geometry = (0, _Polygon.fromExtent)(extent);\n geometry.rotate(this.getRotation(), (0, _extent.getCenter)(extent));\n } else {\n var userProjection = (0, _proj.getUserProjection)();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */geometryOrExtent.clone().transform(userProjection, this.getProjection());\n } else {\n geometry = geometryOrExtent;\n }\n }\n this.fitInternal(geometry, options);\n };\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions=} opt_options Options.\n */\n View.prototype.fitInternal = function (geometry, opt_options) {\n var options = opt_options || {};\n var size = options.size;\n if (!size) {\n size = this.getViewportSize_();\n }\n var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n var nearest = options.nearest !== undefined ? options.nearest : false;\n var minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.getResolutionForZoom(options.maxZoom);\n } else {\n minResolution = 0;\n }\n var coords = geometry.getFlatCoordinates();\n // calculate rotated extent\n var rotation = this.getRotation();\n var cosAngle = Math.cos(-rotation);\n var sinAngle = Math.sin(-rotation);\n var minRotX = +Infinity;\n var minRotY = +Infinity;\n var maxRotX = -Infinity;\n var maxRotY = -Infinity;\n var stride = geometry.getStride();\n for (var i = 0, ii = coords.length; i < ii; i += stride) {\n var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n minRotX = Math.min(minRotX, rotX);\n minRotY = Math.min(minRotY, rotY);\n maxRotX = Math.max(maxRotX, rotX);\n maxRotY = Math.max(maxRotY, rotY);\n }\n // calculate resolution\n var resolution = this.getResolutionForExtentInternal([minRotX, minRotY, maxRotX, maxRotY], [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n resolution = isNaN(resolution) ? minResolution : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n // calculate center\n sinAngle = -sinAngle; // go back to original rotation\n var centerRotX = (minRotX + maxRotX) / 2;\n var centerRotY = (minRotY + maxRotY) / 2;\n centerRotX += (padding[1] - padding[3]) / 2 * resolution;\n centerRotY += (padding[0] - padding[2]) / 2 * resolution;\n var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n var center = [centerX, centerY];\n var callback = options.callback ? options.callback : _functions.VOID;\n if (options.duration !== undefined) {\n this.animateInternal({\n resolution: resolution,\n center: this.getConstrainedCenter(center, resolution),\n duration: options.duration,\n easing: options.easing\n }, callback);\n } else {\n this.targetResolution_ = resolution;\n this.targetCenter_ = center;\n this.applyTargetState_(false, true);\n animationCallback(callback, true);\n }\n };\n /**\n * Center on coordinate and view position.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @api\n */\n View.prototype.centerOn = function (coordinate, size, position) {\n this.centerOnInternal((0, _proj.fromUserCoordinate)(coordinate, this.getProjection()), size, position);\n };\n /**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n */\n View.prototype.centerOnInternal = function (coordinate, size, position) {\n // calculate rotated position\n var rotation = this.getRotation();\n var cosAngle = Math.cos(-rotation);\n var sinAngle = Math.sin(-rotation);\n var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n var resolution = this.getResolution();\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n var centerX = rotX * cosAngle - rotY * sinAngle;\n var centerY = rotY * cosAngle + rotX * sinAngle;\n this.setCenterInternal([centerX, centerY]);\n };\n /**\n * @return {boolean} Is defined.\n */\n View.prototype.isDef = function () {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\n };\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n * @api\n */\n View.prototype.adjustCenter = function (deltaCoordinates) {\n var center = (0, _proj.toUserCoordinate)(this.targetCenter_, this.getProjection());\n this.setCenter([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]);\n };\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n */\n View.prototype.adjustCenterInternal = function (deltaCoordinates) {\n var center = this.targetCenter_;\n this.setCenterInternal([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]);\n };\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n View.prototype.adjustResolution = function (ratio, opt_anchor) {\n var anchor = opt_anchor && (0, _proj.fromUserCoordinate)(opt_anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\n };\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n View.prototype.adjustResolutionInternal = function (ratio, opt_anchor) {\n var isMoving = this.getAnimating() || this.getInteracting();\n var size = this.getViewportSize_(this.getRotation());\n var newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving);\n if (opt_anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor);\n }\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n };\n /**\n * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom level.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n View.prototype.adjustZoom = function (delta, opt_anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor);\n };\n /**\n * Adds a value to the view rotation, optionally using an anchor. Any rotation\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n * @api\n */\n View.prototype.adjustRotation = function (delta, opt_anchor) {\n if (opt_anchor) {\n opt_anchor = (0, _proj.fromUserCoordinate)(opt_anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, opt_anchor);\n };\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n */\n View.prototype.adjustRotationInternal = function (delta, opt_anchor) {\n var isMoving = this.getAnimating() || this.getInteracting();\n var newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving);\n if (opt_anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n };\n /**\n * Set the center of the current view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n View.prototype.setCenter = function (center) {\n this.setCenterInternal((0, _proj.fromUserCoordinate)(center, this.getProjection()));\n };\n /**\n * Set the center using the view projection (not the user projection).\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n */\n View.prototype.setCenterInternal = function (center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n };\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n View.prototype.setHint = function (hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n };\n /**\n * Set the resolution for this view. Any resolution constraint will apply.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n View.prototype.setResolution = function (resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n };\n /**\n * Set the rotation for this view. Any rotation constraint will apply.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n View.prototype.setRotation = function (rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n };\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n View.prototype.setZoom = function (zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n };\n /**\n * Recompute rotation/resolution/center based on target values.\n * Note: we have to compute rotation first, then resolution and center considering that\n * parameters can influence one another in case a view extent constraint is present.\n * @param {boolean=} opt_doNotCancelAnims Do not cancel animations.\n * @param {boolean=} opt_forceMoving Apply constraints as if the view is moving.\n * @private\n */\n View.prototype.applyTargetState_ = function (opt_doNotCancelAnims, opt_forceMoving) {\n var isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving;\n // compute rotation\n var newRotation = this.constraints_.rotation(this.targetRotation_, isMoving);\n var size = this.getViewportSize_(newRotation);\n var newResolution = this.constraints_.resolution(this.targetResolution_, 0, size, isMoving);\n var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving);\n if (this.get(_ViewProperty2.default.ROTATION) !== newRotation) {\n this.set(_ViewProperty2.default.ROTATION, newRotation);\n }\n if (this.get(_ViewProperty2.default.RESOLUTION) !== newResolution) {\n this.set(_ViewProperty2.default.RESOLUTION, newResolution);\n }\n if (!this.get(_ViewProperty2.default.CENTER) || !(0, _coordinate.equals)(this.get(_ViewProperty2.default.CENTER), newCenter)) {\n this.set(_ViewProperty2.default.CENTER, newCenter);\n }\n if (this.getAnimating() && !opt_doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n };\n /**\n * If any constraints need to be applied, an animation will be triggered.\n * This is typically done on interaction end.\n * Note: calling this with a duration of 0 will apply the constrained values straight away,\n * without animation.\n * @param {number=} opt_duration The animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n View.prototype.resolveConstraints = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n var duration = opt_duration !== undefined ? opt_duration : 200;\n var direction = opt_resolutionDirection || 0;\n var newRotation = this.constraints_.rotation(this.targetRotation_);\n var size = this.getViewportSize_(newRotation);\n var newResolution = this.constraints_.resolution(this.targetResolution_, direction, size);\n var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size);\n if (duration === 0 && !this.cancelAnchor_) {\n this.targetResolution_ = newResolution;\n this.targetRotation_ = newRotation;\n this.targetCenter_ = newCenter;\n this.applyTargetState_();\n return;\n }\n var anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n if (this.getResolution() !== newResolution || this.getRotation() !== newRotation || !this.getCenterInternal() || !(0, _coordinate.equals)(this.getCenterInternal(), newCenter)) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n this.animateInternal({\n rotation: newRotation,\n center: newCenter,\n resolution: newResolution,\n duration: duration,\n easing: _easing.easeOut,\n anchor: anchor\n });\n }\n };\n /**\n * Notify the View that an interaction has started.\n * The view state will be resolved to a stable one if needed\n * (depending on its constraints).\n * @api\n */\n View.prototype.beginInteraction = function () {\n this.resolveConstraints(0);\n this.setHint(_ViewHint2.default.INTERACTING, 1);\n };\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number=} opt_duration Animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n View.prototype.endInteraction = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n var anchor = opt_anchor && (0, _proj.fromUserCoordinate)(opt_anchor, this.getProjection());\n this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);\n };\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number=} opt_duration Animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n View.prototype.endInteractionInternal = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n this.setHint(_ViewHint2.default.INTERACTING, -1);\n this.resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor);\n };\n /**\n * Get a valid position for the view center according to the current constraints.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n * @param {number=} opt_targetResolution Target resolution. If not supplied, the current one will be used.\n * This is useful to guess a valid center position at a different zoom level.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n */\n View.prototype.getConstrainedCenter = function (targetCenter, opt_targetResolution) {\n var size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size);\n };\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number=} [opt_direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid zoom level.\n */\n View.prototype.getConstrainedZoom = function (targetZoom, opt_direction) {\n var targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction));\n };\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number=} [opt_direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid resolution.\n */\n View.prototype.getConstrainedResolution = function (targetResolution, opt_direction) {\n var direction = opt_direction || 0;\n var size = this.getViewportSize_(this.getRotation());\n return this.constraints_.resolution(targetResolution, direction, size);\n };\n return View;\n}(_Object2.default);\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n setTimeout(function () {\n callback(returnValue);\n }, 0);\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nfunction createCenterConstraint(options) {\n if (options.extent !== undefined) {\n var smooth = options.smoothExtentConstraint !== undefined ? options.smoothExtentConstraint : true;\n return (0, _centerconstraint.createExtent)(options.extent, options.constrainOnlyCenter, smooth);\n }\n var projection = (0, _proj.createProjection)(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n var extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return (0, _centerconstraint.createExtent)(extent, false, false);\n }\n return _centerconstraint.none;\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n * minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nfunction createResolutionConstraint(options) {\n var resolutionConstraint;\n var maxResolution;\n var minResolution;\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n var defaultMaxZoom = 28;\n var defaultZoomFactor = 2;\n var minZoom = options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n var maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n var zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n var multiWorld = options.multiWorld !== undefined ? options.multiWorld : false;\n var smooth = options.smoothResolutionConstraint !== undefined ? options.smoothResolutionConstraint : true;\n var showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false;\n var projection = (0, _proj.createProjection)(options.projection, 'EPSG:3857');\n var projExtent = projection.getExtent();\n var constrainOnlyCenter = options.constrainOnlyCenter;\n var extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n if (options.resolutions !== undefined) {\n var resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution = resolutions[maxZoom] !== undefined ? resolutions[maxZoom] : resolutions[resolutions.length - 1];\n if (options.constrainResolution) {\n resolutionConstraint = (0, _resolutionconstraint.createSnapToResolutions)(resolutions, smooth, !constrainOnlyCenter && extent, showFullExtent);\n } else {\n resolutionConstraint = (0, _resolutionconstraint.createMinMaxResolution)(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n }\n } else {\n // calculate the default min and max resolution\n var size = !projExtent ? // use an extent that can fit the whole world if need be\n 360 * _proj.METERS_PER_UNIT[_Units2.default.DEGREES] / projection.getMetersPerUnit() : Math.max((0, _extent.getWidth)(projExtent), (0, _extent.getHeight)(projExtent));\n var defaultMaxResolution = size / _common.DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n var defaultMinResolution = defaultMaxResolution / Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\n // user provided minResolution takes precedence\n minResolution = options.minResolution;\n if (minResolution === undefined) {\n if (options.maxZoom !== undefined) {\n if (options.maxResolution !== undefined) {\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom = minZoom + Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n if (options.constrainResolution) {\n resolutionConstraint = (0, _resolutionconstraint.createSnapToPower)(zoomFactor, maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n } else {\n resolutionConstraint = (0, _resolutionconstraint.createMinMaxResolution)(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor\n };\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nfunction createRotationConstraint(options) {\n var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n var constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return (0, _rotationconstraint.createSnapToZero)();\n } else if (constrainRotation === false) {\n return _rotationconstraint.none;\n } else if (typeof constrainRotation === 'number') {\n return (0, _rotationconstraint.createSnapToN)(constrainRotation);\n } else {\n return _rotationconstraint.none;\n }\n } else {\n return _rotationconstraint.disable;\n }\n}\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nfunction isNoopAnimation(animation) {\n if (animation.sourceCenter && animation.targetCenter) {\n if (!(0, _coordinate.equals)(animation.sourceCenter, animation.targetCenter)) {\n return false;\n }\n }\n if (animation.sourceResolution !== animation.targetResolution) {\n return false;\n }\n if (animation.sourceRotation !== animation.targetRotation) {\n return false;\n }\n return true;\n}\nexports.default = View;\n//# sourceMappingURL=View.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/View.js?"); /***/ }), /***/ "./node_modules/ol/ViewHint.js": /*!*************************************!*\ !*** ./node_modules/ol/ViewHint.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/ViewHint\n */\n/**\n * @enum {number}\n */\nexports.default = {\n ANIMATING: 0,\n INTERACTING: 1\n};\n//# sourceMappingURL=ViewHint.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ViewHint.js?"); /***/ }), /***/ "./node_modules/ol/ViewProperty.js": /*!*****************************************!*\ !*** ./node_modules/ol/ViewProperty.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/ViewProperty\n */\n/**\n * @enum {string}\n */\nexports.default = {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation'\n};\n//# sourceMappingURL=ViewProperty.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/ViewProperty.js?"); /***/ }), /***/ "./node_modules/ol/array.js": /*!**********************************!*\ !*** ./node_modules/ol/array.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.binarySearch = binarySearch;\nexports.numberSafeCompareFunction = numberSafeCompareFunction;\nexports.includes = includes;\nexports.linearFindNearest = linearFindNearest;\nexports.reverseSubArray = reverseSubArray;\nexports.extend = extend;\nexports.remove = remove;\nexports.find = find;\nexports.equals = equals;\nexports.stableSort = stableSort;\nexports.findIndex = findIndex;\nexports.isSorted = isSorted;\n/**\n * @module ol/array\n */\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function=} opt_comparator Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nfunction binarySearch(haystack, needle, opt_comparator) {\n var mid, cmp;\n var comparator = opt_comparator || numberSafeCompareFunction;\n var low = 0;\n var high = haystack.length;\n var found = false;\n while (low < high) {\n /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n * to double (which gives the wrong results). */\n mid = low + (high - low >> 1);\n cmp = +comparator(haystack[mid], needle);\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n } else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n /* Key not found. */\n return found ? low : ~low;\n}\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is less than, equal to, or greater than the second.\n */\nfunction numberSafeCompareFunction(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nfunction includes(arr, obj) {\n return arr.indexOf(obj) >= 0;\n}\n/**\n * @param {Array} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n * means return the largest nearest, < 0 means return the\n * smallest nearest.\n * @return {number} Index.\n */\nfunction linearFindNearest(arr, target, direction) {\n var n = arr.length;\n if (arr[0] <= target) {\n return 0;\n } else if (target <= arr[n - 1]) {\n return n - 1;\n } else {\n var i = void 0;\n if (direction > 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n } else if (direction < 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n } else {\n for (i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n } else if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n } else {\n return i;\n }\n }\n }\n }\n return n - 1;\n }\n}\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nfunction reverseSubArray(arr, begin, end) {\n while (begin < end) {\n var tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nfunction extend(arr, data) {\n var extension = Array.isArray(data) ? data : [data];\n var length = extension.length;\n for (var i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n/**\n * @param {Array} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nfunction remove(arr, obj) {\n var i = arr.indexOf(obj);\n var found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n/**\n * @param {Array} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nfunction find(arr, func) {\n var length = arr.length >>> 0;\n var value;\n for (var i = 0; i < length; i++) {\n value = arr[i];\n if (func(value, i, arr)) {\n return value;\n }\n }\n return null;\n}\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nfunction equals(arr1, arr2) {\n var len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (var i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nfunction stableSort(arr, compareFnc) {\n var length = arr.length;\n var tmp = Array(arr.length);\n var i;\n for (i = 0; i < length; i++) {\n tmp[i] = { index: i, value: arr[i] };\n }\n tmp.sort(function (a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nfunction findIndex(arr, func) {\n var index;\n var found = !arr.every(function (el, idx) {\n index = idx;\n return !func(el, idx, arr);\n });\n return found ? index : -1;\n}\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nfunction isSorted(arr, opt_func, opt_strict) {\n var compare = opt_func || numberSafeCompareFunction;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n var res = compare(arr[index - 1], currentVal);\n return !(res > 0 || opt_strict && res === 0);\n });\n}\n//# sourceMappingURL=array.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/array.js?"); /***/ }), /***/ "./node_modules/ol/asserts.js": /*!************************************!*\ !*** ./node_modules/ol/asserts.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.assert = assert;\n\nvar _AssertionError = __webpack_require__(/*! ./AssertionError.js */ \"./node_modules/ol/AssertionError.js\");\n\nvar _AssertionError2 = _interopRequireDefault(_AssertionError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nfunction assert(assertion, errorCode) {\n if (!assertion) {\n throw new _AssertionError2.default(errorCode);\n }\n}\n//# sourceMappingURL=asserts.js.map\n/**\n * @module ol/asserts\n */\n\n//# sourceURL=webpack:///./node_modules/ol/asserts.js?"); /***/ }), /***/ "./node_modules/ol/centerconstraint.js": /*!*********************************************!*\ !*** ./node_modules/ol/centerconstraint.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createExtent = createExtent;\nexports.none = none;\n\nvar _math = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nfunction createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, opt_isMoving) {\n if (center) {\n var viewWidth = onlyCenter ? 0 : size[0] * resolution;\n var viewHeight = onlyCenter ? 0 : size[1] * resolution;\n var minX = extent[0] + viewWidth / 2;\n var maxX = extent[2] - viewWidth / 2;\n var minY = extent[1] + viewHeight / 2;\n var maxY = extent[3] - viewHeight / 2;\n // note: when zooming out of bounds, min and max values for x and y may\n // end up inverted (min > max); this has to be accounted for\n if (minX > maxX) {\n minX = (maxX + minX) / 2;\n maxX = minX;\n }\n if (minY > maxY) {\n minY = (maxY + minY) / 2;\n maxY = minY;\n }\n var x = (0, _math.clamp)(center[0], minX, maxX);\n var y = (0, _math.clamp)(center[1], minY, maxY);\n var ratio = 30 * resolution;\n // during an interaction, allow some overscroll\n if (opt_isMoving && smooth) {\n x += -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) + ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y += -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) + ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n return [x, y];\n } else {\n return undefined;\n }\n }\n );\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n/**\n * @module ol/centerconstraint\n */\nfunction none(center) {\n return center;\n}\n//# sourceMappingURL=centerconstraint.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/centerconstraint.js?"); /***/ }), /***/ "./node_modules/ol/color.js": /*!**********************************!*\ !*** ./node_modules/ol/color.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fromString = undefined;\nexports.asString = asString;\nexports.asArray = asArray;\nexports.normalize = normalize;\nexports.toString = toString;\nexports.isStringColor = isStringColor;\n\nvar _asserts = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n\nvar _math = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array} Color\n * @api\n */\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\n/**\n * @module ol/color\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nfunction asString(color) {\n if (typeof color === 'string') {\n return color;\n } else {\n return toString(color);\n }\n}\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n var el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n var rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n } else {\n return '';\n }\n}\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nvar fromString = exports.fromString = function () {\n // We maintain a small cache of parsed strings. To provide cheap LRU-like\n // semantics, whenever the cache grows too large we simply delete an\n // arbitrary 25% of the entries.\n /**\n * @const\n * @type {number}\n */\n var MAX_CACHE_SIZE = 1024;\n /**\n * @type {Object}\n */\n var cache = {};\n /**\n * @type {number}\n */\n var cacheSize = 0;\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function (s) {\n var color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n var i = 0;\n for (var key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n color = fromStringInternal_(s);\n cache[s] = color;\n ++cacheSize;\n }\n return color;\n }\n );\n}();\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nfunction asArray(color) {\n if (Array.isArray(color)) {\n return color;\n } else {\n return fromString(color);\n }\n}\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n var r, g, b, a, color;\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n if (HEX_COLOR_RE_.exec(s)) {\n // hex\n var n = s.length - 1; // number of hex digits\n var d = // number of digits per channel\n void 0; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n var hasAlpha = n === 4 || n === 8;\n r = parseInt(s.substr(1 + 0 * d, d), 16);\n g = parseInt(s.substr(1 + 1 * d, d), 16);\n b = parseInt(s.substr(1 + 2 * d, d), 16);\n if (hasAlpha) {\n a = parseInt(s.substr(1 + 3 * d, d), 16);\n } else {\n a = 255;\n }\n if (d == 1) {\n r = (r << 4) + r;\n g = (g << 4) + g;\n b = (b << 4) + b;\n if (hasAlpha) {\n a = (a << 4) + a;\n }\n }\n color = [r, g, b, a / 255];\n } else if (s.indexOf('rgba(') == 0) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.indexOf('rgb(') == 0) {\n // rgb()\n color = s.slice(4, -1).split(',').map(Number);\n color.push(1);\n normalize(color);\n } else {\n (0, _asserts.assert)(false, 14); // Invalid color\n }\n return color;\n}\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nfunction normalize(color) {\n color[0] = (0, _math.clamp)(color[0] + 0.5 | 0, 0, 255);\n color[1] = (0, _math.clamp)(color[1] + 0.5 | 0, 0, 255);\n color[2] = (0, _math.clamp)(color[2] + 0.5 | 0, 0, 255);\n color[3] = (0, _math.clamp)(color[3], 0, 1);\n return color;\n}\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nfunction toString(color) {\n var r = color[0];\n if (r != (r | 0)) {\n r = r + 0.5 | 0;\n }\n var g = color[1];\n if (g != (g | 0)) {\n g = g + 0.5 | 0;\n }\n var b = color[2];\n if (b != (b | 0)) {\n b = b + 0.5 | 0;\n }\n var a = color[3] === undefined ? 1 : color[3];\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nfunction isStringColor(s) {\n if (NAMED_COLOR_RE_.test(s)) {\n s = fromNamed(s);\n }\n return HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0;\n}\n//# sourceMappingURL=color.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/color.js?"); /***/ }), /***/ "./node_modules/ol/colorlike.js": /*!**************************************!*\ !*** ./node_modules/ol/colorlike.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.asColorLike = asColorLike;\n\nvar _color = __webpack_require__(/*! ./color.js */ \"./node_modules/ol/color.js\");\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nfunction asColorLike(color) {\n if (Array.isArray(color)) {\n return (0, _color.toString)(color);\n } else {\n return color;\n }\n}\n//# sourceMappingURL=colorlike.js.map\n/**\n * @module ol/colorlike\n */\n\n//# sourceURL=webpack:///./node_modules/ol/colorlike.js?"); /***/ }), /***/ "./node_modules/ol/control.js": /*!************************************!*\ !*** ./node_modules/ol/control.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ZoomToExtent = exports.ZoomSlider = exports.Zoom = exports.ScaleLine = exports.Rotate = exports.OverviewMap = exports.MousePosition = exports.FullScreen = exports.Control = exports.Attribution = undefined;\n\nvar _Attribution = __webpack_require__(/*! ./control/Attribution.js */ \"./node_modules/ol/control/Attribution.js\");\n\nObject.defineProperty(exports, 'Attribution', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Attribution).default;\n }\n});\n\nvar _Control = __webpack_require__(/*! ./control/Control.js */ \"./node_modules/ol/control/Control.js\");\n\nObject.defineProperty(exports, 'Control', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Control).default;\n }\n});\n\nvar _FullScreen = __webpack_require__(/*! ./control/FullScreen.js */ \"./node_modules/ol/control/FullScreen.js\");\n\nObject.defineProperty(exports, 'FullScreen', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_FullScreen).default;\n }\n});\n\nvar _MousePosition = __webpack_require__(/*! ./control/MousePosition.js */ \"./node_modules/ol/control/MousePosition.js\");\n\nObject.defineProperty(exports, 'MousePosition', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_MousePosition).default;\n }\n});\n\nvar _OverviewMap = __webpack_require__(/*! ./control/OverviewMap.js */ \"./node_modules/ol/control/OverviewMap.js\");\n\nObject.defineProperty(exports, 'OverviewMap', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_OverviewMap).default;\n }\n});\n\nvar _Rotate = __webpack_require__(/*! ./control/Rotate.js */ \"./node_modules/ol/control/Rotate.js\");\n\nObject.defineProperty(exports, 'Rotate', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Rotate).default;\n }\n});\n\nvar _ScaleLine = __webpack_require__(/*! ./control/ScaleLine.js */ \"./node_modules/ol/control/ScaleLine.js\");\n\nObject.defineProperty(exports, 'ScaleLine', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ScaleLine).default;\n }\n});\n\nvar _Zoom = __webpack_require__(/*! ./control/Zoom.js */ \"./node_modules/ol/control/Zoom.js\");\n\nObject.defineProperty(exports, 'Zoom', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Zoom).default;\n }\n});\n\nvar _ZoomSlider = __webpack_require__(/*! ./control/ZoomSlider.js */ \"./node_modules/ol/control/ZoomSlider.js\");\n\nObject.defineProperty(exports, 'ZoomSlider', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ZoomSlider).default;\n }\n});\n\nvar _ZoomToExtent = __webpack_require__(/*! ./control/ZoomToExtent.js */ \"./node_modules/ol/control/ZoomToExtent.js\");\n\nObject.defineProperty(exports, 'ZoomToExtent', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ZoomToExtent).default;\n }\n});\nexports.defaults = defaults;\n\nvar _Attribution2 = _interopRequireDefault(_Attribution);\n\nvar _Collection = __webpack_require__(/*! ./Collection.js */ \"./node_modules/ol/Collection.js\");\n\nvar _Collection2 = _interopRequireDefault(_Collection);\n\nvar _Rotate2 = _interopRequireDefault(_Rotate);\n\nvar _Zoom2 = _interopRequireDefault(_Zoom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./control/Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./control/Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./control/Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions=} opt_options\n * Defaults options.\n * @return {Collection}\n * Controls.\n * @api\n */\nfunction defaults(opt_options) {\n var options = opt_options ? opt_options : {};\n var controls = new _Collection2.default();\n var zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new _Zoom2.default(options.zoomOptions));\n }\n var rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new _Rotate2.default(options.rotateOptions));\n }\n var attributionControl = options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new _Attribution2.default(options.attributionOptions));\n }\n return controls;\n}\n//# sourceMappingURL=control.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control.js?"); /***/ }), /***/ "./node_modules/ol/control/Attribution.js": /*!************************************************!*\ !*** ./node_modules/ol/control/Attribution.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _array = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n\nvar _Layer = __webpack_require__(/*! ../layer/Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n\nvar _dom = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/Attribution\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /** @class */function (_super) {\n __extends(Attribution, _super);\n /**\n * @param {Options=} opt_options Attribution options.\n */\n function Attribution(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target\n }) || this;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.ulElement_ = document.createElement('ul');\n /**\n * @private\n * @type {boolean}\n */\n _this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n /**\n * @private\n * @type {boolean}\n */\n _this.overrideCollapsible_ = options.collapsible !== undefined;\n /**\n * @private\n * @type {boolean}\n */\n _this.collapsible_ = options.collapsible !== undefined ? options.collapsible : true;\n if (!_this.collapsible_) {\n _this.collapsed_ = false;\n }\n var className = options.className !== undefined ? options.className : 'ol-attribution';\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\xBB';\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.collapseLabel_ = document.createElement('span');\n _this.collapseLabel_.textContent = collapseLabel;\n } else {\n _this.collapseLabel_ = collapseLabel;\n }\n var label = options.label !== undefined ? options.label : 'i';\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.label_ = document.createElement('span');\n _this.label_.textContent = label;\n } else {\n _this.label_ = label;\n }\n var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n var button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n button.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this), false);\n var cssClasses = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL + (_this.collapsed_ && _this.collapsible_ ? ' ' + _css.CLASS_COLLAPSED : '') + (_this.collapsible_ ? '' : ' ol-uncollapsible');\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(_this.ulElement_);\n element.appendChild(button);\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n _this.renderedAttributions_ = [];\n /**\n * @private\n * @type {boolean}\n */\n _this.renderedVisible_ = true;\n return _this;\n }\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n Attribution.prototype.collectSourceAttributions_ = function (frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object}\n */\n var lookup = {};\n /**\n * A list of visible attributions.\n * @type {Array}\n */\n var visibleAttributions = [];\n var layerStatesArray = frameState.layerStatesArray;\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n if (!(0, _Layer.inView)(layerState, frameState.viewState)) {\n continue;\n }\n var source = /** @type {import(\"../layer/Layer.js\").default} */layerState.layer.getSource();\n if (!source) {\n continue;\n }\n var attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n var attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n if (!this.overrideCollapsible_ && source.getAttributionsCollapsible() === false) {\n this.setCollapsible(false);\n }\n if (Array.isArray(attributions)) {\n for (var j = 0, jj = attributions.length; j < jj; ++j) {\n if (!(attributions[j] in lookup)) {\n visibleAttributions.push(attributions[j]);\n lookup[attributions[j]] = true;\n }\n }\n } else {\n if (!(attributions in lookup)) {\n visibleAttributions.push(attributions);\n lookup[attributions] = true;\n }\n }\n }\n return visibleAttributions;\n };\n /**\n * @private\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n Attribution.prototype.updateElement_ = function (frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n var attributions = this.collectSourceAttributions_(frameState);\n var visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n if ((0, _array.equals)(attributions, this.renderedAttributions_)) {\n return;\n }\n (0, _dom.removeChildren)(this.ulElement_);\n // append the attributions\n for (var i = 0, ii = attributions.length; i < ii; ++i) {\n var element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n this.renderedAttributions_ = attributions;\n };\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Attribution.prototype.handleClick_ = function (event) {\n event.preventDefault();\n this.handleToggle_();\n };\n /**\n * @private\n */\n Attribution.prototype.handleToggle_ = function () {\n this.element.classList.toggle(_css.CLASS_COLLAPSED);\n if (this.collapsed_) {\n (0, _dom.replaceNode)(this.collapseLabel_, this.label_);\n } else {\n (0, _dom.replaceNode)(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n };\n /**\n * Return `true` if the attribution is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n Attribution.prototype.getCollapsible = function () {\n return this.collapsible_;\n };\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n Attribution.prototype.setCollapsible = function (collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n };\n /**\n * Collapse or expand the attribution according to the passed parameter. Will\n * not do anything if the attribution isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n Attribution.prototype.setCollapsed = function (collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n };\n /**\n * Return `true` when the attribution is currently collapsed or `false`\n * otherwise.\n * @return {boolean} True if the widget is collapsed.\n * @api\n */\n Attribution.prototype.getCollapsed = function () {\n return this.collapsed_;\n };\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n Attribution.prototype.render = function (mapEvent) {\n this.updateElement_(mapEvent.frameState);\n };\n return Attribution;\n}(_Control2.default);\nexports.default = Attribution;\n//# sourceMappingURL=Attribution.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/Attribution.js?"); /***/ }), /***/ "./node_modules/ol/control/Control.js": /*!********************************************!*\ !*** ./node_modules/ol/control/Control.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Object = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _Object2 = _interopRequireDefault(_Object);\n\nvar _MapEventType = __webpack_require__(/*! ../MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n\nvar _MapEventType2 = _interopRequireDefault(_MapEventType);\n\nvar _functions = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n\nvar _events = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n\nvar _dom = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/Control\n */\n\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /** @class */function (_super) {\n __extends(Control, _super);\n /**\n * @param {Options} options Control options.\n */\n function Control(options) {\n var _this = _super.call(this) || this;\n var element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n /**\n * @protected\n * @type {HTMLElement}\n */\n _this.element = element ? element : null;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.target_ = null;\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n _this.map_ = null;\n /**\n * @protected\n * @type {!Array}\n */\n _this.listenerKeys = [];\n if (options.render) {\n _this.render = options.render;\n }\n if (options.target) {\n _this.setTarget(options.target);\n }\n return _this;\n }\n /**\n * Clean up.\n */\n Control.prototype.disposeInternal = function () {\n (0, _dom.removeNode)(this.element);\n _super.prototype.disposeInternal.call(this);\n };\n /**\n * Get the map associated with this control.\n * @return {import(\"../PluggableMap.js\").default} Map.\n * @api\n */\n Control.prototype.getMap = function () {\n return this.map_;\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n Control.prototype.setMap = function (map) {\n if (this.map_) {\n (0, _dom.removeNode)(this.element);\n }\n for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n (0, _events.unlistenByKey)(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (this.map_) {\n var target = this.target_ ? this.target_ : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== _functions.VOID) {\n this.listenerKeys.push((0, _events.listen)(map, _MapEventType2.default.POSTRENDER, this.render, this));\n }\n map.render();\n }\n };\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n Control.prototype.render = function (mapEvent) {};\n /**\n * This function is used to set a target element for the control. It has no\n * effect if it is called after the control has been added to the map (i.e.\n * after `setMap` is called on the control). If no `target` is set in the\n * options passed to the control constructor and if `setTarget` is not called\n * then the control is added to the map's overlay container.\n * @param {HTMLElement|string} target Target.\n * @api\n */\n Control.prototype.setTarget = function (target) {\n this.target_ = typeof target === 'string' ? document.getElementById(target) : target;\n };\n return Control;\n}(_Object2.default);\nexports.default = Control;\n//# sourceMappingURL=Control.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/Control.js?"); /***/ }), /***/ "./node_modules/ol/control/FullScreen.js": /*!***********************************************!*\ !*** ./node_modules/ol/control/FullScreen.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _events = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n\nvar _dom = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/FullScreen\n */\n\nvar events = ['fullscreenchange', 'webkitfullscreenchange', 'MSFullscreenChange'];\n/**\n * @enum {string}\n */\nvar FullScreenEventType = {\n /**\n * Triggered after the map entered fullscreen.\n * @event FullScreenEventType#enterfullscreen\n * @api\n */\n ENTERFULLSCREEN: 'enterfullscreen',\n /**\n * Triggered after the map leave fullscreen.\n * @event FullScreenEventType#leavefullscreen\n * @api\n */\n LEAVEFULLSCREEN: 'leavefullscreen'\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nvar FullScreen = /** @class */function (_super) {\n __extends(FullScreen, _super);\n /**\n * @param {Options=} opt_options Options.\n */\n function FullScreen(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n target: options.target\n }) || this;\n /**\n * @private\n * @type {string}\n */\n _this.cssClassName_ = options.className !== undefined ? options.className : 'ol-full-screen';\n var label = options.label !== undefined ? options.label : '\\u2922';\n /**\n * @private\n * @type {Text}\n */\n _this.labelNode_ = typeof label === 'string' ? document.createTextNode(label) : label;\n var labelActive = options.labelActive !== undefined ? options.labelActive : '\\xD7';\n /**\n * @private\n * @type {Text}\n */\n _this.labelActiveNode_ = typeof labelActive === 'string' ? document.createTextNode(labelActive) : labelActive;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.button_ = document.createElement('button');\n var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n _this.setClassName_(_this.button_, isFullScreen());\n _this.button_.setAttribute('type', 'button');\n _this.button_.title = tipLabel;\n _this.button_.appendChild(_this.labelNode_);\n _this.button_.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this), false);\n var cssClasses = _this.cssClassName_ + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL + ' ' + (!isFullScreenSupported() ? _css.CLASS_UNSUPPORTED : '');\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(_this.button_);\n /**\n * @private\n * @type {boolean}\n */\n _this.keys_ = options.keys !== undefined ? options.keys : false;\n /**\n * @private\n * @type {HTMLElement|string|undefined}\n */\n _this.source_ = options.source;\n return _this;\n }\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n FullScreen.prototype.handleClick_ = function (event) {\n event.preventDefault();\n this.handleFullScreen_();\n };\n /**\n * @private\n */\n FullScreen.prototype.handleFullScreen_ = function () {\n if (!isFullScreenSupported()) {\n return;\n }\n var map = this.getMap();\n if (!map) {\n return;\n }\n if (isFullScreen()) {\n exitFullScreen();\n } else {\n var element = void 0;\n if (this.source_) {\n element = typeof this.source_ === 'string' ? document.getElementById(this.source_) : this.source_;\n } else {\n element = map.getTargetElement();\n }\n if (this.keys_) {\n requestFullScreenWithKeys(element);\n } else {\n requestFullScreen(element);\n }\n }\n };\n /**\n * @private\n */\n FullScreen.prototype.handleFullScreenChange_ = function () {\n var map = this.getMap();\n if (isFullScreen()) {\n this.setClassName_(this.button_, true);\n (0, _dom.replaceNode)(this.labelActiveNode_, this.labelNode_);\n this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n } else {\n this.setClassName_(this.button_, false);\n (0, _dom.replaceNode)(this.labelNode_, this.labelActiveNode_);\n this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n }\n if (map) {\n map.updateSize();\n }\n };\n /**\n * @param {HTMLElement} element Target element\n * @param {boolean} fullscreen True if fullscreen class name should be active\n * @private\n */\n FullScreen.prototype.setClassName_ = function (element, fullscreen) {\n var activeClassName = this.cssClassName_ + '-true';\n var inactiveClassName = this.cssClassName_ + '-false';\n var nextClassName = fullscreen ? activeClassName : inactiveClassName;\n element.classList.remove(activeClassName);\n element.classList.remove(inactiveClassName);\n element.classList.add(nextClassName);\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n FullScreen.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n if (map) {\n for (var i = 0, ii = events.length; i < ii; ++i) {\n this.listenerKeys.push((0, _events.listen)(document, events[i], this.handleFullScreenChange_, this));\n }\n }\n };\n return FullScreen;\n}(_Control2.default);\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n var body = document.body;\n return !!(body['webkitRequestFullscreen'] || body['msRequestFullscreen'] && document['msFullscreenEnabled'] || body.requestFullscreen && document.fullscreenEnabled);\n}\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n return !!(document['webkitIsFullScreen'] || document['msFullscreenElement'] || document.fullscreenElement);\n}\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element['msRequestFullscreen']) {\n element['msRequestFullscreen']();\n } else if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n }\n}\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n } else {\n requestFullScreen(element);\n }\n}\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document['msExitFullscreen']) {\n document['msExitFullscreen']();\n } else if (document['webkitExitFullscreen']) {\n document['webkitExitFullscreen']();\n }\n}\nexports.default = FullScreen;\n//# sourceMappingURL=FullScreen.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/FullScreen.js?"); /***/ }), /***/ "./node_modules/ol/control/MousePosition.js": /*!**************************************************!*\ !*** ./node_modules/ol/control/MousePosition.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _Object = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _proj = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n\nvar _events = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @module ol/control/MousePosition\n */\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [undefinedHTML=' '] Markup to show when coordinates are not\n * available (e.g. when the pointer leaves the map viewport). By default, the last position\n * will be replaced with `' '` (` `) when the pointer leaves the viewport. To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */function (_super) {\n __extends(MousePosition, _super);\n /**\n * @param {Options=} opt_options Mouse position options.\n */\n function MousePosition(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var element = document.createElement('div');\n element.className = options.className !== undefined ? options.className : 'ol-mouse-position';\n _this = _super.call(this, {\n element: element,\n render: options.render,\n target: options.target\n }) || this;\n _this.addEventListener((0, _Object.getChangeEventType)(PROJECTION), _this.handleProjectionChanged_);\n if (options.coordinateFormat) {\n _this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n _this.setProjection(options.projection);\n }\n /**\n * @private\n * @type {string}\n */\n _this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : ' ';\n /**\n * @private\n * @type {boolean}\n */\n _this.renderOnMouseOut_ = !!_this.undefinedHTML_;\n /**\n * @private\n * @type {string}\n */\n _this.renderedHTML_ = element.innerHTML;\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n _this.mapProjection_ = null;\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n _this.transform_ = null;\n return _this;\n }\n /**\n * @private\n */\n MousePosition.prototype.handleProjectionChanged_ = function () {\n this.transform_ = null;\n };\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getCoordinateFormat = function () {\n return (/** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */this.get(COORDINATE_FORMAT)\n );\n };\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getProjection = function () {\n return (/** @type {import(\"../proj/Projection.js\").default|undefined} */this.get(PROJECTION)\n );\n };\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseMove = function (event) {\n var map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n };\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseOut = function (event) {\n this.updateHTML_(null);\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n MousePosition.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n if (map) {\n var viewport = map.getViewport();\n this.listenerKeys.push((0, _events.listen)(viewport, _EventType2.default.POINTERMOVE, this.handleMouseMove, this));\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push((0, _events.listen)(viewport, _EventType2.default.POINTEROUT, this.handleMouseOut, this));\n }\n }\n };\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setCoordinateFormat = function (format) {\n this.set(COORDINATE_FORMAT, format);\n };\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setProjection = function (projection) {\n this.set(PROJECTION, (0, _proj.get)(projection));\n };\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n MousePosition.prototype.updateHTML_ = function (pixel) {\n var html = this.undefinedHTML_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n var projection = this.getProjection();\n if (projection) {\n this.transform_ = (0, _proj.getTransformFromProjections)(this.mapProjection_, projection);\n } else {\n this.transform_ = _proj.identityTransform;\n }\n }\n var map = this.getMap();\n var coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n var userProjection = (0, _proj.getUserProjection)();\n if (userProjection) {\n this.transform_ = (0, _proj.getTransformFromProjections)(this.mapProjection_, userProjection);\n }\n this.transform_(coordinate, coordinate);\n var coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n } else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n };\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n MousePosition.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n };\n return MousePosition;\n}(_Control2.default);\nexports.default = MousePosition;\n//# sourceMappingURL=MousePosition.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/MousePosition.js?"); /***/ }), /***/ "./node_modules/ol/control/OverviewMap.js": /*!************************************************!*\ !*** ./node_modules/ol/control/OverviewMap.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Composite = __webpack_require__(/*! ../renderer/Composite.js */ \"./node_modules/ol/renderer/Composite.js\");\n\nvar _Composite2 = _interopRequireDefault(_Composite);\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _MapEventType = __webpack_require__(/*! ../MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n\nvar _MapEventType2 = _interopRequireDefault(_MapEventType);\n\nvar _MapProperty = __webpack_require__(/*! ../MapProperty.js */ \"./node_modules/ol/MapProperty.js\");\n\nvar _MapProperty2 = _interopRequireDefault(_MapProperty);\n\nvar _ObjectEventType = __webpack_require__(/*! ../ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n\nvar _ObjectEventType2 = _interopRequireDefault(_ObjectEventType);\n\nvar _Overlay = __webpack_require__(/*! ../Overlay.js */ \"./node_modules/ol/Overlay.js\");\n\nvar _Overlay2 = _interopRequireDefault(_Overlay);\n\nvar _OverlayPositioning = __webpack_require__(/*! ../OverlayPositioning.js */ \"./node_modules/ol/OverlayPositioning.js\");\n\nvar _OverlayPositioning2 = _interopRequireDefault(_OverlayPositioning);\n\nvar _PluggableMap = __webpack_require__(/*! ../PluggableMap.js */ \"./node_modules/ol/PluggableMap.js\");\n\nvar _PluggableMap2 = _interopRequireDefault(_PluggableMap);\n\nvar _View = __webpack_require__(/*! ../View.js */ \"./node_modules/ol/View.js\");\n\nvar _View2 = _interopRequireDefault(_View);\n\nvar _ViewProperty = __webpack_require__(/*! ../ViewProperty.js */ \"./node_modules/ol/ViewProperty.js\");\n\nvar _ViewProperty2 = _interopRequireDefault(_ViewProperty);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _extent = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _Object = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n\nvar _events = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n\nvar _Polygon = __webpack_require__(/*! ../geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n\nvar _dom = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/OverviewMap\n */\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nvar MAX_RATIO = 0.75;\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nvar MIN_RATIO = 0.1;\nvar ControlledMap = /** @class */function (_super) {\n __extends(ControlledMap, _super);\n function ControlledMap() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ControlledMap.prototype.createRenderer = function () {\n return new _Composite2.default(this);\n };\n return ControlledMap;\n}(_PluggableMap2.default);\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array|import(\"../Collection.js\").default} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nvar OverviewMap = /** @class */function (_super) {\n __extends(OverviewMap, _super);\n /**\n * @param {Options=} opt_options OverviewMap options.\n */\n function OverviewMap(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target\n }) || this;\n /**\n * @private\n */\n _this.boundHandleRotationChanged_ = _this.handleRotationChanged_.bind(_this);\n /**\n * @type {boolean}\n * @private\n */\n _this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n /**\n * @private\n * @type {boolean}\n */\n _this.collapsible_ = options.collapsible !== undefined ? options.collapsible : true;\n if (!_this.collapsible_) {\n _this.collapsed_ = false;\n }\n /**\n * @private\n * @type {boolean}\n */\n _this.rotateWithView_ = options.rotateWithView !== undefined ? options.rotateWithView : false;\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n _this.viewExtent_ = undefined;\n var className = options.className !== undefined ? options.className : 'ol-overviewmap';\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\xAB';\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.collapseLabel_ = document.createElement('span');\n _this.collapseLabel_.textContent = collapseLabel;\n } else {\n _this.collapseLabel_ = collapseLabel;\n }\n var label = options.label !== undefined ? options.label : '\\xBB';\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.label_ = document.createElement('span');\n _this.label_.textContent = label;\n } else {\n _this.label_ = label;\n }\n var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n var button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n button.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this), false);\n /**\n * @type {HTMLElement}\n * @private\n */\n _this.ovmapDiv_ = document.createElement('div');\n _this.ovmapDiv_.className = 'ol-overviewmap-map';\n /**\n * Explicitly given view to be used instead of a view derived from the main map.\n * @type {View}\n * @private\n */\n _this.view_ = options.view;\n /**\n * @type {ControlledMap}\n * @private\n */\n _this.ovmap_ = new ControlledMap({\n view: options.view\n });\n var ovmap = _this.ovmap_;\n if (options.layers) {\n options.layers.forEach(function (layer) {\n ovmap.addLayer(layer);\n });\n }\n var box = document.createElement('div');\n box.className = 'ol-overviewmap-box';\n box.style.boxSizing = 'border-box';\n /**\n * @type {import(\"../Overlay.js\").default}\n * @private\n */\n _this.boxOverlay_ = new _Overlay2.default({\n position: [0, 0],\n positioning: _OverlayPositioning2.default.CENTER_CENTER,\n element: box\n });\n _this.ovmap_.addOverlay(_this.boxOverlay_);\n var cssClasses = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL + (_this.collapsed_ && _this.collapsible_ ? ' ' + _css.CLASS_COLLAPSED : '') + (_this.collapsible_ ? '' : ' ol-uncollapsible');\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(_this.ovmapDiv_);\n element.appendChild(button);\n /* Interactive map */\n var scope = _this;\n var overlay = _this.boxOverlay_;\n var overlayBox = _this.boxOverlay_.getElement();\n /* Functions definition */\n var computeDesiredMousePosition = function computeDesiredMousePosition(mousePosition) {\n return {\n clientX: mousePosition.clientX,\n clientY: mousePosition.clientY\n };\n };\n var move = function move(event) {\n var position = /** @type {?} */computeDesiredMousePosition(event);\n var coordinates = ovmap.getEventCoordinateInternal(\n /** @type {MouseEvent} */position);\n overlay.setPosition(coordinates);\n };\n var endMoving = function endMoving(event) {\n var coordinates = ovmap.getEventCoordinateInternal(event);\n scope.getMap().getView().setCenterInternal(coordinates);\n window.removeEventListener('mousemove', move);\n window.removeEventListener('mouseup', endMoving);\n };\n /* Binding */\n overlayBox.addEventListener('mousedown', function () {\n window.addEventListener('mousemove', move);\n window.addEventListener('mouseup', endMoving);\n });\n return _this;\n }\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n OverviewMap.prototype.setMap = function (map) {\n var oldMap = this.getMap();\n if (map === oldMap) {\n return;\n }\n if (oldMap) {\n var oldView = oldMap.getView();\n if (oldView) {\n this.unbindView_(oldView);\n }\n this.ovmap_.setTarget(null);\n }\n _super.prototype.setMap.call(this, map);\n if (map) {\n this.ovmap_.setTarget(this.ovmapDiv_);\n this.listenerKeys.push((0, _events.listen)(map, _ObjectEventType2.default.PROPERTYCHANGE, this.handleMapPropertyChange_, this));\n var view = map.getView();\n if (view) {\n this.bindView_(view);\n if (view.isDef()) {\n this.ovmap_.updateSize();\n this.resetExtent_();\n }\n }\n }\n };\n /**\n * Handle map property changes. This only deals with changes to the map's view.\n * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n * @private\n */\n OverviewMap.prototype.handleMapPropertyChange_ = function (event) {\n if (event.key === _MapProperty2.default.VIEW) {\n var oldView = /** @type {import(\"../View.js\").default} */event.oldValue;\n if (oldView) {\n this.unbindView_(oldView);\n }\n var newView = this.getMap().getView();\n this.bindView_(newView);\n }\n };\n /**\n * Register listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n OverviewMap.prototype.bindView_ = function (view) {\n if (!this.view_) {\n // Unless an explicit view definition was given, derive default from whatever main map uses.\n var newView = new _View2.default({\n projection: view.getProjection()\n });\n this.ovmap_.setView(newView);\n }\n view.addEventListener((0, _Object.getChangeEventType)(_ViewProperty2.default.ROTATION), this.boundHandleRotationChanged_);\n // Sync once with the new view\n this.handleRotationChanged_();\n };\n /**\n * Unregister listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n OverviewMap.prototype.unbindView_ = function (view) {\n view.removeEventListener((0, _Object.getChangeEventType)(_ViewProperty2.default.ROTATION), this.boundHandleRotationChanged_);\n };\n /**\n * Handle rotation changes to the main map.\n * @private\n */\n OverviewMap.prototype.handleRotationChanged_ = function () {\n if (this.rotateWithView_) {\n this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n }\n };\n /**\n * Reset the overview map extent if the box size (width or\n * height) is less than the size of the overview map size times minRatio\n * or is greater than the size of the overview size times maxRatio.\n *\n * If the map extent was not reset, the box size can fits in the defined\n * ratio sizes. This method then checks if is contained inside the overview\n * map current extent. If not, recenter the overview map to the current\n * main map center location.\n * @private\n */\n OverviewMap.prototype.validateExtent_ = function () {\n var map = this.getMap();\n var ovmap = this.ovmap_;\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n var mapSize = /** @type {import(\"../size.js\").Size} */map.getSize();\n var view = map.getView();\n var extent = view.calculateExtentInternal(mapSize);\n if (this.viewExtent_ && (0, _extent.equals)(extent, this.viewExtent_)) {\n // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n return;\n }\n this.viewExtent_ = extent;\n var ovmapSize = /** @type {import(\"../size.js\").Size} */ovmap.getSize();\n var ovview = ovmap.getView();\n var ovextent = ovview.calculateExtentInternal(ovmapSize);\n var topLeftPixel = ovmap.getPixelFromCoordinateInternal((0, _extent.getTopLeft)(extent));\n var bottomRightPixel = ovmap.getPixelFromCoordinateInternal((0, _extent.getBottomRight)(extent));\n var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n var ovmapWidth = ovmapSize[0];\n var ovmapHeight = ovmapSize[1];\n if (boxWidth < ovmapWidth * MIN_RATIO || boxHeight < ovmapHeight * MIN_RATIO || boxWidth > ovmapWidth * MAX_RATIO || boxHeight > ovmapHeight * MAX_RATIO) {\n this.resetExtent_();\n } else if (!(0, _extent.containsExtent)(ovextent, extent)) {\n this.recenter_();\n }\n };\n /**\n * Reset the overview map extent to half calculated min and max ratio times\n * the extent of the main map.\n * @private\n */\n OverviewMap.prototype.resetExtent_ = function () {\n if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n return;\n }\n var map = this.getMap();\n var ovmap = this.ovmap_;\n var mapSize = /** @type {import(\"../size.js\").Size} */map.getSize();\n var view = map.getView();\n var extent = view.calculateExtentInternal(mapSize);\n var ovview = ovmap.getView();\n // get how many times the current map overview could hold different\n // box sizes using the min and max ratio, pick the step in the middle used\n // to calculate the extent from the main map to set it to the overview map,\n var steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n var ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n (0, _extent.scaleFromCenter)(extent, ratio);\n ovview.fitInternal((0, _Polygon.fromExtent)(extent));\n };\n /**\n * Set the center of the overview map to the map center without changing its\n * resolution.\n * @private\n */\n OverviewMap.prototype.recenter_ = function () {\n var map = this.getMap();\n var ovmap = this.ovmap_;\n var view = map.getView();\n var ovview = ovmap.getView();\n ovview.setCenterInternal(view.getCenterInternal());\n };\n /**\n * Update the box using the main map extent\n * @private\n */\n OverviewMap.prototype.updateBox_ = function () {\n var map = this.getMap();\n var ovmap = this.ovmap_;\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n var mapSize = /** @type {import(\"../size.js\").Size} */map.getSize();\n var view = map.getView();\n var ovview = ovmap.getView();\n var rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n var overlay = this.boxOverlay_;\n var box = this.boxOverlay_.getElement();\n var center = view.getCenterInternal();\n var resolution = view.getResolution();\n var ovresolution = ovview.getResolution();\n var width = mapSize[0] * resolution / ovresolution;\n var height = mapSize[1] * resolution / ovresolution;\n // set position using center coordinates\n overlay.setPosition(center);\n // set box size calculated from map extent size and overview map resolution\n if (box) {\n box.style.width = width + 'px';\n box.style.height = height + 'px';\n var transform = 'rotate(' + rotation + 'rad)';\n box.style.transform = transform;\n }\n };\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n OverviewMap.prototype.handleClick_ = function (event) {\n event.preventDefault();\n this.handleToggle_();\n };\n /**\n * @private\n */\n OverviewMap.prototype.handleToggle_ = function () {\n this.element.classList.toggle(_css.CLASS_COLLAPSED);\n if (this.collapsed_) {\n (0, _dom.replaceNode)(this.collapseLabel_, this.label_);\n } else {\n (0, _dom.replaceNode)(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n // manage overview map if it had not been rendered before and control\n // is expanded\n var ovmap = this.ovmap_;\n if (!this.collapsed_) {\n if (ovmap.isRendered()) {\n this.viewExtent_ = undefined;\n ovmap.render();\n return;\n }\n ovmap.updateSize();\n this.resetExtent_();\n (0, _events.listenOnce)(ovmap, _MapEventType2.default.POSTRENDER, function (event) {\n this.updateBox_();\n }, this);\n }\n };\n /**\n * Return `true` if the overview map is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n OverviewMap.prototype.getCollapsible = function () {\n return this.collapsible_;\n };\n /**\n * Set whether the overview map should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n OverviewMap.prototype.setCollapsible = function (collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n };\n /**\n * Collapse or expand the overview map according to the passed parameter. Will\n * not do anything if the overview map isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n OverviewMap.prototype.setCollapsed = function (collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n };\n /**\n * Determine if the overview map is collapsed.\n * @return {boolean} The overview map is collapsed.\n * @api\n */\n OverviewMap.prototype.getCollapsed = function () {\n return this.collapsed_;\n };\n /**\n * Return `true` if the overview map view can rotate, `false` otherwise.\n * @return {boolean} True if the control view can rotate.\n * @api\n */\n OverviewMap.prototype.getRotateWithView = function () {\n return this.rotateWithView_;\n };\n /**\n * Set whether the overview map view should rotate with the main map view.\n * @param {boolean} rotateWithView True if the control view should rotate.\n * @api\n */\n OverviewMap.prototype.setRotateWithView = function (rotateWithView) {\n if (this.rotateWithView_ === rotateWithView) {\n return;\n }\n this.rotateWithView_ = rotateWithView;\n if (this.getMap().getView().getRotation() !== 0) {\n if (this.rotateWithView_) {\n this.handleRotationChanged_();\n } else {\n this.ovmap_.getView().setRotation(0);\n }\n this.viewExtent_ = undefined;\n this.validateExtent_();\n this.updateBox_();\n }\n };\n /**\n * Return the overview map.\n * @return {import(\"../PluggableMap.js\").default} Overview map.\n * @api\n */\n OverviewMap.prototype.getOverviewMap = function () {\n return this.ovmap_;\n };\n /**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n OverviewMap.prototype.render = function (mapEvent) {\n this.validateExtent_();\n this.updateBox_();\n };\n return OverviewMap;\n}(_Control2.default);\nexports.default = OverviewMap;\n//# sourceMappingURL=OverviewMap.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/OverviewMap.js?"); /***/ }), /***/ "./node_modules/ol/control/Rotate.js": /*!*******************************************!*\ !*** ./node_modules/ol/control/Rotate.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _easing = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/Rotate\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nvar Rotate = /** @class */function (_super) {\n __extends(Rotate, _super);\n /**\n * @param {Options=} opt_options Rotate options.\n */\n function Rotate(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target\n }) || this;\n var className = options.className !== undefined ? options.className : 'ol-rotate';\n var label = options.label !== undefined ? options.label : '\\u21E7';\n /**\n * @type {HTMLElement}\n * @private\n */\n _this.label_ = null;\n if (typeof label === 'string') {\n _this.label_ = document.createElement('span');\n _this.label_.className = 'ol-compass';\n _this.label_.textContent = label;\n } else {\n _this.label_ = label;\n _this.label_.classList.add('ol-compass');\n }\n var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n var button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(_this.label_);\n button.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this), false);\n var cssClasses = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL;\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(button);\n _this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n /**\n * @type {number}\n * @private\n */\n _this.duration_ = options.duration !== undefined ? options.duration : 250;\n /**\n * @type {boolean}\n * @private\n */\n _this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.rotation_ = undefined;\n if (_this.autoHide_) {\n _this.element.classList.add(_css.CLASS_HIDDEN);\n }\n return _this;\n }\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Rotate.prototype.handleClick_ = function (event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n };\n /**\n * @private\n */\n Rotate.prototype.resetNorth_ = function () {\n var map = this.getMap();\n var view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n var rotation = view.getRotation();\n if (rotation !== undefined) {\n if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n view.animate({\n rotation: 0,\n duration: this.duration_,\n easing: _easing.easeOut\n });\n } else {\n view.setRotation(0);\n }\n }\n };\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n Rotate.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n var rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n var transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n var contains = this.element.classList.contains(_css.CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(_css.CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(_css.CLASS_HIDDEN);\n }\n }\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n };\n return Rotate;\n}(_Control2.default);\nexports.default = Rotate;\n//# sourceMappingURL=Rotate.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/Rotate.js?"); /***/ }), /***/ "./node_modules/ol/control/ScaleLine.js": /*!**********************************************!*\ !*** ./node_modules/ol/control/ScaleLine.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Units = undefined;\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _Units = __webpack_require__(/*! ../proj/Units.js */ \"./node_modules/ol/proj/Units.js\");\n\nvar _Units2 = _interopRequireDefault(_Units);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _proj = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n\nvar _asserts = __webpack_require__(/*! ../asserts.js */ \"./node_modules/ol/asserts.js\");\n\nvar _Object = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/ScaleLine\n */\n\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nvar Units = exports.Units = {\n DEGREES: 'degrees',\n IMPERIAL: 'imperial',\n NAUTICAL: 'nautical',\n METRIC: 'metric',\n US: 'us'\n};\n/**\n * @const\n * @type {Array}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n/**\n * @const\n * @type {number}\n */\nvar DEFAULT_DPI = 25.4 / 0.28;\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nvar ScaleLine = /** @class */function (_super) {\n __extends(ScaleLine, _super);\n /**\n * @param {Options=} opt_options Scale line options.\n */\n function ScaleLine(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var className = options.className !== undefined ? options.className : options.bar ? 'ol-scale-bar' : 'ol-scale-line';\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target\n }) || this;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.innerElement_ = document.createElement('div');\n _this.innerElement_.className = className + '-inner';\n _this.element.className = className + ' ' + _css.CLASS_UNSELECTABLE;\n _this.element.appendChild(_this.innerElement_);\n /**\n * @private\n * @type {?import(\"../View.js\").State}\n */\n _this.viewState_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n /**\n * @private\n * @type {boolean}\n */\n _this.renderedVisible_ = false;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.renderedWidth_ = undefined;\n /**\n * @private\n * @type {string}\n */\n _this.renderedHTML_ = '';\n _this.addEventListener((0, _Object.getChangeEventType)(UNITS_PROP), _this.handleUnitsChanged_);\n _this.setUnits(options.units || Units.METRIC);\n /**\n * @private\n * @type {boolean}\n */\n _this.scaleBar_ = options.bar || false;\n /**\n * @private\n * @type {number}\n */\n _this.scaleBarSteps_ = options.steps || 4;\n /**\n * @private\n * @type {boolean}\n */\n _this.scaleBarText_ = options.text || false;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.dpi_ = options.dpi || undefined;\n return _this;\n }\n /**\n * Return the units to use in the scale line.\n * @return {import(\"./ScaleLine.js\").Units} The units\n * to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.getUnits = function () {\n return this.get(UNITS_PROP);\n };\n /**\n * @private\n */\n ScaleLine.prototype.handleUnitsChanged_ = function () {\n this.updateElement_();\n };\n /**\n * Set the units to use in the scale line.\n * @param {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.setUnits = function (units) {\n this.set(UNITS_PROP, units);\n };\n /**\n * Specify the dpi of output device such as printer.\n * @param {number|undefined} dpi The dpi of output device.\n * @api\n */\n ScaleLine.prototype.setDpi = function (dpi) {\n this.dpi_ = dpi;\n };\n /**\n * @private\n */\n ScaleLine.prototype.updateElement_ = function () {\n var viewState = this.viewState_;\n if (!viewState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n var center = viewState.center;\n var projection = viewState.projection;\n var units = this.getUnits();\n var pointResolutionUnits = units == Units.DEGREES ? _Units2.default.DEGREES : _Units2.default.METERS;\n var pointResolution = (0, _proj.getPointResolution)(projection, viewState.resolution, center, pointResolutionUnits);\n var minWidth = this.minWidth_ * (this.dpi_ || DEFAULT_DPI) / DEFAULT_DPI;\n var nominalCount = minWidth * pointResolution;\n var suffix = '';\n if (units == Units.DEGREES) {\n var metersPerDegree = _proj.METERS_PER_UNIT[_Units2.default.DEGREES];\n nominalCount *= metersPerDegree;\n if (nominalCount < metersPerDegree / 60) {\n suffix = '\\u2033'; // seconds\n pointResolution *= 3600;\n } else if (nominalCount < metersPerDegree) {\n suffix = '\\u2032'; // minutes\n pointResolution *= 60;\n } else {\n suffix = '\\xB0'; // degrees\n }\n } else if (units == Units.IMPERIAL) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution /= 0.0254;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.3048;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.344;\n }\n } else if (units == Units.NAUTICAL) {\n pointResolution /= 1852;\n suffix = 'nm';\n } else if (units == Units.METRIC) {\n if (nominalCount < 0.001) {\n suffix = 'μm';\n pointResolution *= 1000000;\n } else if (nominalCount < 1) {\n suffix = 'mm';\n pointResolution *= 1000;\n } else if (nominalCount < 1000) {\n suffix = 'm';\n } else {\n suffix = 'km';\n pointResolution /= 1000;\n }\n } else if (units == Units.US) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution *= 39.37;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.30480061;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.3472;\n }\n } else {\n (0, _asserts.assert)(false, 33); // Invalid units\n }\n var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n var count, width, decimalCount;\n while (true) {\n decimalCount = Math.floor(i / 3);\n var decimal = Math.pow(10, decimalCount);\n count = LEADING_DIGITS[(i % 3 + 3) % 3] * decimal;\n width = Math.round(count / pointResolution);\n if (isNaN(width)) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n return;\n } else if (width >= minWidth) {\n break;\n }\n ++i;\n }\n var html;\n if (this.scaleBar_) {\n html = this.createScaleBar(width, count, suffix);\n } else {\n html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n }\n if (this.renderedHTML_ != html) {\n this.innerElement_.innerHTML = html;\n this.renderedHTML_ = html;\n }\n if (this.renderedWidth_ != width) {\n this.innerElement_.style.width = width + 'px';\n this.renderedWidth_ = width;\n }\n if (!this.renderedVisible_) {\n this.element.style.display = '';\n this.renderedVisible_ = true;\n }\n };\n /**\n * @private\n * @param {number} width The current width of the scalebar.\n * @param {number} scale The current scale.\n * @param {string} suffix The suffix to append to the scale text.\n * @returns {string} The stringified HTML of the scalebar.\n */\n ScaleLine.prototype.createScaleBar = function (width, scale, suffix) {\n var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n var scaleSteps = [];\n var stepWidth = width / this.scaleBarSteps_;\n var backgroundColor = '#ffffff';\n for (var i = 0; i < this.scaleBarSteps_; i++) {\n if (i === 0) {\n // create the first marker at position 0\n scaleSteps.push(this.createMarker('absolute', i));\n }\n scaleSteps.push('
' + '
' + '
' + this.createMarker('relative', i) + (\n /*render text every second step, except when only 2 steps */\n i % 2 === 0 || this.scaleBarSteps_ === 2 ? this.createStepText(i, width, false, scale, suffix) : '') + '
');\n if (i === this.scaleBarSteps_ - 1) {\n {\n /*render text at the end */\n }\n scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n }\n // switch colors of steps between black and white\n if (backgroundColor === '#ffffff') {\n backgroundColor = '#000000';\n } else {\n backgroundColor = '#ffffff';\n }\n }\n var scaleBarText;\n if (this.scaleBarText_) {\n scaleBarText = '
' + mapScale + '
';\n } else {\n scaleBarText = '';\n }\n var container = '
' + scaleBarText + scaleSteps.join('') + '
';\n return container;\n };\n /**\n * Creates a marker at given position\n * @param {string} position - The position, absolute or relative\n * @param {number} i - The iterator\n * @returns {string} The stringified div containing the marker\n */\n ScaleLine.prototype.createMarker = function (position, i) {\n var top = position === 'absolute' ? 3 : -10;\n return '
';\n };\n /**\n * Creates the label for a marker marker at given position\n * @param {number} i - The iterator\n * @param {number} width - The width the scalebar will currently use\n * @param {boolean} isLast - Flag indicating if we add the last step text\n * @param {number} scale - The current scale for the whole scalebar\n * @param {string} suffix - The suffix for the scale\n * @returns {string} The stringified div containing the step text\n */\n ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) {\n var length = i === 0 ? 0 : Math.round(scale / this.scaleBarSteps_ * i * 100) / 100;\n var lengthString = length + (i === 0 ? '' : ' ' + suffix);\n var margin = i === 0 ? -3 : width / this.scaleBarSteps_ * -1;\n var minWidth = i === 0 ? 0 : width / this.scaleBarSteps_ * 2;\n return '
' + lengthString + '
';\n };\n /**\n * Returns the appropriate scale for the given resolution and units.\n * @return {number} The appropriate scale.\n */\n ScaleLine.prototype.getScaleForResolution = function () {\n var resolution = (0, _proj.getPointResolution)(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center);\n var dpi = this.dpi_ || DEFAULT_DPI;\n var mpu = this.viewState_.projection.getMetersPerUnit();\n var inchesPerMeter = 39.37;\n return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;\n };\n /**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n ScaleLine.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n this.viewState_ = null;\n } else {\n this.viewState_ = frameState.viewState;\n }\n this.updateElement_();\n };\n return ScaleLine;\n}(_Control2.default);\nexports.default = ScaleLine;\n//# sourceMappingURL=ScaleLine.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/ScaleLine.js?"); /***/ }), /***/ "./node_modules/ol/control/Zoom.js": /*!*****************************************!*\ !*** ./node_modules/ol/control/Zoom.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _easing = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/Zoom\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='-'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /** @class */function (_super) {\n __extends(Zoom, _super);\n /**\n * @param {Options=} opt_options Zoom options.\n */\n function Zoom(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n target: options.target\n }) || this;\n var className = options.className !== undefined ? options.className : 'ol-zoom';\n var delta = options.delta !== undefined ? options.delta : 1;\n var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ? options.zoomOutTipLabel : 'Zoom out';\n var inElement = document.createElement('button');\n inElement.className = className + '-in';\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel);\n inElement.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this, delta), false);\n var outElement = document.createElement('button');\n outElement.className = className + '-out';\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel);\n outElement.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this, -delta), false);\n var cssClasses = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL;\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n /**\n * @type {number}\n * @private\n */\n _this.duration_ = options.duration !== undefined ? options.duration : 250;\n return _this;\n }\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Zoom.prototype.handleClick_ = function (delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n };\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n Zoom.prototype.zoomByDelta_ = function (delta) {\n var map = this.getMap();\n var view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n var currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n var newZoom = view.getConstrainedZoom(currentZoom + delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n zoom: newZoom,\n duration: this.duration_,\n easing: _easing.easeOut\n });\n } else {\n view.setZoom(newZoom);\n }\n }\n };\n return Zoom;\n}(_Control2.default);\nexports.default = Zoom;\n//# sourceMappingURL=Zoom.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/Zoom.js?"); /***/ }), /***/ "./node_modules/ol/control/ZoomSlider.js": /*!***********************************************!*\ !*** ./node_modules/ol/control/ZoomSlider.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _EventType3 = __webpack_require__(/*! ../pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n\nvar _EventType4 = _interopRequireDefault(_EventType3);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _math = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n\nvar _easing = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n\nvar _events = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n\nvar _Event = __webpack_require__(/*! ../events/Event.js */ \"./node_modules/ol/events/Event.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @module ol/control/ZoomSlider\n */\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nvar Direction = {\n VERTICAL: 0,\n HORIZONTAL: 1\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n * map.addControl(new ZoomSlider());\n *\n * @api\n */\nvar ZoomSlider = /** @class */function (_super) {\n __extends(ZoomSlider, _super);\n /**\n * @param {Options=} opt_options Zoom slider options.\n */\n function ZoomSlider(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render\n }) || this;\n /**\n * @type {!Array.}\n * @private\n */\n _this.dragListenerKeys_ = [];\n /**\n * Will hold the current resolution of the view.\n *\n * @type {number|undefined}\n * @private\n */\n _this.currentResolution_ = undefined;\n /**\n * The direction of the slider. Will be determined from actual display of the\n * container and defaults to Direction.VERTICAL.\n *\n * @type {Direction}\n * @private\n */\n _this.direction_ = Direction.VERTICAL;\n /**\n * @type {boolean}\n * @private\n */\n _this.dragging_;\n /**\n * @type {number}\n * @private\n */\n _this.heightLimit_ = 0;\n /**\n * @type {number}\n * @private\n */\n _this.widthLimit_ = 0;\n /**\n * @type {number|undefined}\n * @private\n */\n _this.startX_;\n /**\n * @type {number|undefined}\n * @private\n */\n _this.startY_;\n /**\n * The calculated thumb size (border box plus margins). Set when initSlider_\n * is called.\n * @type {import(\"../size.js\").Size}\n * @private\n */\n _this.thumbSize_ = null;\n /**\n * Whether the slider is initialized.\n * @type {boolean}\n * @private\n */\n _this.sliderInitialized_ = false;\n /**\n * @type {number}\n * @private\n */\n _this.duration_ = options.duration !== undefined ? options.duration : 200;\n var className = options.className !== undefined ? options.className : 'ol-zoomslider';\n var thumbElement = document.createElement('button');\n thumbElement.setAttribute('type', 'button');\n thumbElement.className = className + '-thumb ' + _css.CLASS_UNSELECTABLE;\n var containerElement = _this.element;\n containerElement.className = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL;\n containerElement.appendChild(thumbElement);\n containerElement.addEventListener(_EventType4.default.POINTERDOWN, _this.handleDraggerStart_.bind(_this), false);\n containerElement.addEventListener(_EventType4.default.POINTERMOVE, _this.handleDraggerDrag_.bind(_this), false);\n containerElement.addEventListener(_EventType4.default.POINTERUP, _this.handleDraggerEnd_.bind(_this), false);\n containerElement.addEventListener(_EventType2.default.CLICK, _this.handleContainerClick_.bind(_this), false);\n thumbElement.addEventListener(_EventType2.default.CLICK, _Event.stopPropagation, false);\n return _this;\n }\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n ZoomSlider.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n if (map) {\n map.render();\n }\n };\n /**\n * Initializes the slider element. This will determine and set this controls\n * direction_ and also constrain the dragging of the thumb to always be within\n * the bounds of the container.\n *\n * @return {boolean} Initialization successful\n * @private\n */\n ZoomSlider.prototype.initSlider_ = function () {\n var container = this.element;\n var containerWidth = container.offsetWidth;\n var containerHeight = container.offsetHeight;\n if (containerWidth === 0 && containerHeight === 0) {\n return this.sliderInitialized_ = false;\n }\n var thumb = /** @type {HTMLElement} */container.firstElementChild;\n var computedStyle = getComputedStyle(thumb);\n var thumbWidth = thumb.offsetWidth + parseFloat(computedStyle['marginRight']) + parseFloat(computedStyle['marginLeft']);\n var thumbHeight = thumb.offsetHeight + parseFloat(computedStyle['marginTop']) + parseFloat(computedStyle['marginBottom']);\n this.thumbSize_ = [thumbWidth, thumbHeight];\n if (containerWidth > containerHeight) {\n this.direction_ = Direction.HORIZONTAL;\n this.widthLimit_ = containerWidth - thumbWidth;\n } else {\n this.direction_ = Direction.VERTICAL;\n this.heightLimit_ = containerHeight - thumbHeight;\n }\n return this.sliderInitialized_ = true;\n };\n /**\n * @param {PointerEvent} event The browser event to handle.\n * @private\n */\n ZoomSlider.prototype.handleContainerClick_ = function (event) {\n var view = this.getMap().getView();\n var relativePosition = this.getRelativePosition_(event.offsetX - this.thumbSize_[0] / 2, event.offsetY - this.thumbSize_[1] / 2);\n var resolution = this.getResolutionForPosition_(relativePosition);\n var zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));\n view.animateInternal({\n zoom: zoom,\n duration: this.duration_,\n easing: _easing.easeOut\n });\n };\n /**\n * Handle dragger start events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n ZoomSlider.prototype.handleDraggerStart_ = function (event) {\n if (!this.dragging_ && event.target === this.element.firstElementChild) {\n var element = /** @type {HTMLElement} */this.element.firstElementChild;\n this.getMap().getView().beginInteraction();\n this.startX_ = event.clientX - parseFloat(element.style.left);\n this.startY_ = event.clientY - parseFloat(element.style.top);\n this.dragging_ = true;\n if (this.dragListenerKeys_.length === 0) {\n var drag = this.handleDraggerDrag_;\n var end = this.handleDraggerEnd_;\n this.dragListenerKeys_.push((0, _events.listen)(document, _EventType4.default.POINTERMOVE, drag, this), (0, _events.listen)(document, _EventType4.default.POINTERUP, end, this));\n }\n }\n };\n /**\n * Handle dragger drag events.\n *\n * @param {PointerEvent} event The drag event.\n * @private\n */\n ZoomSlider.prototype.handleDraggerDrag_ = function (event) {\n if (this.dragging_) {\n var deltaX = event.clientX - this.startX_;\n var deltaY = event.clientY - this.startY_;\n var relativePosition = this.getRelativePosition_(deltaX, deltaY);\n this.currentResolution_ = this.getResolutionForPosition_(relativePosition);\n this.getMap().getView().setResolution(this.currentResolution_);\n }\n };\n /**\n * Handle dragger end events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n ZoomSlider.prototype.handleDraggerEnd_ = function (event) {\n if (this.dragging_) {\n var view = this.getMap().getView();\n view.endInteraction();\n this.dragging_ = false;\n this.startX_ = undefined;\n this.startY_ = undefined;\n this.dragListenerKeys_.forEach(_events.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n }\n };\n /**\n * Positions the thumb inside its container according to the given resolution.\n *\n * @param {number} res The res.\n * @private\n */\n ZoomSlider.prototype.setThumbPosition_ = function (res) {\n var position = this.getPositionForResolution_(res);\n var thumb = /** @type {HTMLElement} */this.element.firstElementChild;\n if (this.direction_ == Direction.HORIZONTAL) {\n thumb.style.left = this.widthLimit_ * position + 'px';\n } else {\n thumb.style.top = this.heightLimit_ * position + 'px';\n }\n };\n /**\n * Calculates the relative position of the thumb given x and y offsets. The\n * relative position scales from 0 to 1. The x and y offsets are assumed to be\n * in pixel units within the dragger limits.\n *\n * @param {number} x Pixel position relative to the left of the slider.\n * @param {number} y Pixel position relative to the top of the slider.\n * @return {number} The relative position of the thumb.\n * @private\n */\n ZoomSlider.prototype.getRelativePosition_ = function (x, y) {\n var amount;\n if (this.direction_ === Direction.HORIZONTAL) {\n amount = x / this.widthLimit_;\n } else {\n amount = y / this.heightLimit_;\n }\n return (0, _math.clamp)(amount, 0, 1);\n };\n /**\n * Calculates the corresponding resolution of the thumb given its relative\n * position (where 0 is the minimum and 1 is the maximum).\n *\n * @param {number} position The relative position of the thumb.\n * @return {number} The corresponding resolution.\n * @private\n */\n ZoomSlider.prototype.getResolutionForPosition_ = function (position) {\n var fn = this.getMap().getView().getResolutionForValueFunction();\n return fn(1 - position);\n };\n /**\n * Determines the relative position of the slider for the given resolution. A\n * relative position of 0 corresponds to the minimum view resolution. A\n * relative position of 1 corresponds to the maximum view resolution.\n *\n * @param {number} res The resolution.\n * @return {number} The relative position value (between 0 and 1).\n * @private\n */\n ZoomSlider.prototype.getPositionForResolution_ = function (res) {\n var fn = this.getMap().getView().getValueForResolutionFunction();\n return (0, _math.clamp)(1 - fn(res), 0, 1);\n };\n /**\n * Update the zoomslider element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n ZoomSlider.prototype.render = function (mapEvent) {\n if (!mapEvent.frameState) {\n return;\n }\n if (!this.sliderInitialized_ && !this.initSlider_()) {\n return;\n }\n var res = mapEvent.frameState.viewState.resolution;\n this.currentResolution_ = res;\n this.setThumbPosition_(res);\n };\n return ZoomSlider;\n}(_Control2.default);\nexports.default = ZoomSlider;\n//# sourceMappingURL=ZoomSlider.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/ZoomSlider.js?"); /***/ }), /***/ "./node_modules/ol/control/ZoomToExtent.js": /*!*************************************************!*\ !*** ./node_modules/ol/control/ZoomToExtent.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Control = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n\nvar _Control2 = _interopRequireDefault(_Control);\n\nvar _EventType = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n\nvar _EventType2 = _interopRequireDefault(_EventType);\n\nvar _css = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n\nvar _Polygon = __webpack_require__(/*! ../geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/control/ZoomToExtent\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nvar ZoomToExtent = /** @class */function (_super) {\n __extends(ZoomToExtent, _super);\n /**\n * @param {Options=} opt_options Options.\n */\n function ZoomToExtent(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n target: options.target\n }) || this;\n /**\n * @type {?import(\"../extent.js\").Extent}\n * @protected\n */\n _this.extent = options.extent ? options.extent : null;\n var className = options.className !== undefined ? options.className : 'ol-zoom-extent';\n var label = options.label !== undefined ? options.label : 'E';\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n var button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(typeof label === 'string' ? document.createTextNode(label) : label);\n button.addEventListener(_EventType2.default.CLICK, _this.handleClick_.bind(_this), false);\n var cssClasses = className + ' ' + _css.CLASS_UNSELECTABLE + ' ' + _css.CLASS_CONTROL;\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(button);\n return _this;\n }\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n ZoomToExtent.prototype.handleClick_ = function (event) {\n event.preventDefault();\n this.handleZoomToExtent();\n };\n /**\n * @protected\n */\n ZoomToExtent.prototype.handleZoomToExtent = function () {\n var map = this.getMap();\n var view = map.getView();\n var extent = !this.extent ? view.getProjection().getExtent() : this.extent;\n view.fitInternal((0, _Polygon.fromExtent)(extent));\n };\n return ZoomToExtent;\n}(_Control2.default);\nexports.default = ZoomToExtent;\n//# sourceMappingURL=ZoomToExtent.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/control/ZoomToExtent.js?"); /***/ }), /***/ "./node_modules/ol/coordinate.js": /*!***************************************!*\ !*** ./node_modules/ol/coordinate.js ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.add = add;\nexports.closestOnCircle = closestOnCircle;\nexports.closestOnSegment = closestOnSegment;\nexports.createStringXY = createStringXY;\nexports.degreesToStringHDMS = degreesToStringHDMS;\nexports.format = format;\nexports.equals = equals;\nexports.rotate = rotate;\nexports.scale = scale;\nexports.squaredDistance = squaredDistance;\nexports.distance = distance;\nexports.squaredDistanceToSegment = squaredDistanceToSegment;\nexports.toStringHDMS = toStringHDMS;\nexports.toStringXY = toStringXY;\nexports.wrapX = wrapX;\nexports.getWorldsAway = getWorldsAway;\n\nvar _extent = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n\nvar _math = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n\nvar _string = __webpack_require__(/*! ./string.js */ \"./node_modules/ol/string.js\");\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array} Coordinate\n * @api\n */\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {add} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * add(coord, [-2, 4]);\n * // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nfunction add(coordinate, delta) {\n coordinate[0] += +delta[0];\n coordinate[1] += +delta[1];\n return coordinate;\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\n/**\n * @module ol/coordinate\n */\nfunction closestOnCircle(coordinate, circle) {\n var r = circle.getRadius();\n var center = circle.getCenter();\n var x0 = center[0];\n var y0 = center[1];\n var x1 = coordinate[0];\n var y1 = coordinate[1];\n var dx = x1 - x0;\n var dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n var d = Math.sqrt(dx * dx + dy * dy);\n var x = x0 + r * dx / d;\n var y = y0 + r * dy / d;\n return [x, y];\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nfunction closestOnSegment(coordinate, segment) {\n var x0 = coordinate[0];\n var y0 = coordinate[1];\n var start = segment[0];\n var end = segment[1];\n var x1 = start[0];\n var y1 = start[1];\n var x2 = end[0];\n var y2 = end[1];\n var dx = x2 - x1;\n var dy = y2 - y1;\n var along = dx === 0 && dy === 0 ? 0 : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n var x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n } else if (along >= 1) {\n x = x2;\n y = y2;\n } else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var stringifyFunc = createStringXY();\n * var out = stringifyFunc(coord);\n * // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var stringifyFunc = createStringXY(2);\n * var out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nfunction createStringXY(opt_fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, opt_fractionDigits);\n }\n );\n}\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nfunction degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n var normalizedDegrees = (0, _math.modulo)(degrees + 180, 360) - 180;\n var x = Math.abs(3600 * normalizedDegrees);\n var dflPrecision = opt_fractionDigits || 0;\n var precision = Math.pow(10, dflPrecision);\n var deg = Math.floor(x / 3600);\n var min = Math.floor((x - deg * 3600) / 60);\n var sec = x - deg * 3600 - min * 60;\n sec = Math.ceil(sec * precision) / precision;\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n return deg + '\\xB0 ' + (0, _string.padNumber)(min, 2) + '\\u2032 ' + (0, _string.padNumber)(sec, 2, dflPrecision) + '\\u2033' + (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0));\n}\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var template = 'Coordinate is ({x}|{y}).';\n * var out = format(coord, template);\n * // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var template = 'Coordinate is ({x}|{y}).';\n * var out = format(coord, template, 2);\n * // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n * that will be replaced by first and second coordinate values.\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nfunction format(coordinate, template, opt_fractionDigits) {\n if (coordinate) {\n return template.replace('{x}', coordinate[0].toFixed(opt_fractionDigits)).replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n } else {\n return '';\n }\n}\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nfunction equals(coordinate1, coordinate2) {\n var equals = true;\n for (var i = coordinate1.length - 1; i >= 0; --i) {\n if (coordinate1[i] != coordinate2[i]) {\n equals = false;\n break;\n }\n }\n return equals;\n}\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n * import {rotate} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var rotateRadians = Math.PI / 2; // 90 degrees\n * rotate(coord, rotateRadians);\n * // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nfunction rotate(coordinate, angle) {\n var cosAngle = Math.cos(angle);\n var sinAngle = Math.sin(angle);\n var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var scale = 1.2;\n * scaleCoordinate(coord, scale);\n * // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nfunction scale(coordinate, scale) {\n coordinate[0] *= scale;\n coordinate[1] *= scale;\n return coordinate;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nfunction squaredDistance(coord1, coord2) {\n var dx = coord1[0] - coord2[0];\n var dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nfunction distance(coord1, coord2) {\n return Math.sqrt(squaredDistance(coord1, coord2));\n}\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nfunction squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringHDMS} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringHDMS(coord);\n * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringHDMS} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringHDMS(coord, 1);\n * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nfunction toStringHDMS(coordinate, opt_fractionDigits) {\n if (coordinate) {\n return degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' + degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);\n } else {\n return '';\n }\n}\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nfunction toStringXY(coordinate, opt_fractionDigits) {\n return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nfunction wrapX(coordinate, projection) {\n if (projection.canWrapX()) {\n var worldWidth = (0, _extent.getWidth)(projection.getExtent());\n var worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n if (worldsAway) {\n coordinate[0] -= worldsAway * worldWidth;\n }\n }\n return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number=} opt_sourceExtentWidth Width of the source extent.\n * @return {number} Offset in world widths.\n */\nfunction getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n var projectionExtent = projection.getExtent();\n var worldsAway = 0;\n if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n var sourceExtentWidth = opt_sourceExtentWidth || (0, _extent.getWidth)(projectionExtent);\n worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n }\n return worldsAway;\n}\n//# sourceMappingURL=coordinate.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/coordinate.js?"); /***/ }), /***/ "./node_modules/ol/css.js": /*!********************************!*\ !*** ./node_modules/ol/css.js ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/css\n */\n/**\n * @typedef {Object} FontParameters\n * @property {string} style\n * @property {string} variant\n * @property {string} weight\n * @property {string} size\n * @property {string} lineHeight\n * @property {string} family\n * @property {Array} families\n */\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nvar CLASS_HIDDEN = exports.CLASS_HIDDEN = 'ol-hidden';\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nvar CLASS_SELECTABLE = exports.CLASS_SELECTABLE = 'ol-selectable';\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nvar CLASS_UNSELECTABLE = exports.CLASS_UNSELECTABLE = 'ol-unselectable';\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nvar CLASS_UNSUPPORTED = exports.CLASS_UNSUPPORTED = 'ol-unsupported';\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nvar CLASS_CONTROL = exports.CLASS_CONTROL = 'ol-control';\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nvar CLASS_COLLAPSED = exports.CLASS_COLLAPSED = 'ol-collapsed';\n/**\n * From http://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nvar fontRegEx = new RegExp(['^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)', '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)', '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)', '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?', '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))', '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))', '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$'].join(''), 'i');\nvar fontRegExMatchIndex = ['style', 'variant', 'weight', 'size', 'lineHeight', 'family'];\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nvar getFontParameters = exports.getFontParameters = function getFontParameters(fontSpec) {\n var match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n var style = /** @type {FontParameters} */{\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal'\n };\n for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n var value = match[i + 1];\n if (value !== undefined) {\n style[fontRegExMatchIndex[i]] = value;\n }\n }\n style.families = style.family.split(/,\\s?/);\n return style;\n};\n//# sourceMappingURL=css.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/css.js?"); /***/ }), /***/ "./node_modules/ol/dom.js": /*!********************************!*\ !*** ./node_modules/ol/dom.js ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createCanvasContext2D = createCanvasContext2D;\nexports.outerWidth = outerWidth;\nexports.outerHeight = outerHeight;\nexports.replaceNode = replaceNode;\nexports.removeNode = removeNode;\nexports.removeChildren = removeChildren;\nexports.replaceChildren = replaceChildren;\n\nvar _has = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n\n/**\n * @module ol/dom\n */\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canvas width.\n * @param {number=} opt_height Canvas height.\n * @param {Array=} opt_canvasPool Canvas pool to take existing canvas from.\n * @return {CanvasRenderingContext2D} The context.\n */\nfunction createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {\n var canvas = opt_canvasPool && opt_canvasPool.length ? opt_canvasPool.shift() : _has.WORKER_OFFSCREEN_CANVAS ? new OffscreenCanvas(opt_width || 300, opt_height || 300) : document.createElement('canvas');\n if (opt_width) {\n canvas.width = opt_width;\n }\n if (opt_height) {\n canvas.height = opt_height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return (/** @type {CanvasRenderingContext2D} */canvas.getContext('2d')\n );\n}\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nfunction outerWidth(element) {\n var width = element.offsetWidth;\n var style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n return width;\n}\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nfunction outerHeight(element) {\n var height = element.offsetHeight;\n var style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n return height;\n}\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nfunction replaceNode(newNode, oldNode) {\n var parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nfunction removeNode(node) {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n/**\n * @param {Node} node The node to remove the children from.\n */\nfunction removeChildren(node) {\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n}\n/**\n * Transform the children of a parent node so they match the\n * provided list of children. This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array} children The desired children.\n */\nfunction replaceChildren(node, children) {\n var oldChildren = node.childNodes;\n for (var i = 0; true; ++i) {\n var oldChild = oldChildren[i];\n var newChild = children[i];\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n//# sourceMappingURL=dom.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/dom.js?"); /***/ }), /***/ "./node_modules/ol/easing.js": /*!***********************************!*\ !*** ./node_modules/ol/easing.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.easeIn = easeIn;\nexports.easeOut = easeOut;\nexports.inAndOut = inAndOut;\nexports.linear = linear;\nexports.upAndDown = upAndDown;\n/**\n * @module ol/easing\n */\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction easeIn(t) {\n return Math.pow(t, 3);\n}\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction easeOut(t) {\n return 1 - easeIn(1 - t);\n}\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction linear(t) {\n return t;\n}\n/**\n * Start slow, speed up, and at the very end slow down again. This has the\n * same general behavior as {@link module:ol/easing~inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n } else {\n return 1 - inAndOut(2 * (t - 0.5));\n }\n}\n//# sourceMappingURL=easing.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/easing.js?"); /***/ }), /***/ "./node_modules/ol/events.js": /*!***********************************!*\ !*** ./node_modules/ol/events.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.listen = undefined;\nexports.listenOnce = listenOnce;\nexports.unlistenByKey = unlistenByKey;\n\nvar _obj = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent\n */\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events~unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean=} opt_once If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nfunction listen(target, type, _listener, opt_this, opt_once) {\n if (opt_this && opt_this !== target) {\n _listener = _listener.bind(opt_this);\n }\n if (opt_once) {\n var originalListener_1 = _listener;\n _listener = function listener() {\n target.removeEventListener(type, _listener);\n originalListener_1.apply(this, arguments);\n };\n }\n var eventsKey = {\n target: target,\n type: type,\n listener: _listener\n };\n target.addEventListener(type, _listener);\n return eventsKey;\n}\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events~unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events~listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\n/**\n * @module ol/events\n */\nexports.listen = listen;\nfunction listenOnce(target, type, listener, opt_this) {\n return listen(target, type, listener, opt_this, true);\n}\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events~listen} or {@link module:ol/events~listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nfunction unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n (0, _obj.clear)(key);\n }\n}\n//# sourceMappingURL=events.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/events.js?"); /***/ }), /***/ "./node_modules/ol/events/Event.js": /*!*****************************************!*\ !*** ./node_modules/ol/events/Event.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.stopPropagation = stopPropagation;\nexports.preventDefault = preventDefault;\n/**\n * @module ol/events/Event\n */\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nvar BaseEvent = /** @class */function () {\n /**\n * @param {string} type Type.\n */\n function BaseEvent(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n /**\n * Stop event propagation.\n * @api\n */\n BaseEvent.prototype.preventDefault = function () {\n this.propagationStopped = true;\n };\n /**\n * Stop event propagation.\n * @api\n */\n BaseEvent.prototype.stopPropagation = function () {\n this.propagationStopped = true;\n };\n return BaseEvent;\n}();\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nfunction stopPropagation(evt) {\n evt.stopPropagation();\n}\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nfunction preventDefault(evt) {\n evt.preventDefault();\n}\nexports.default = BaseEvent;\n//# sourceMappingURL=Event.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/events/Event.js?"); /***/ }), /***/ "./node_modules/ol/events/EventType.js": /*!*********************************************!*\ !*** ./node_modules/ol/events/EventType.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/events/EventType\n */\n/**\n * @enum {string}\n * @const\n */\nexports.default = {\n /**\n * Generic change event. Triggered when the revision counter is increased.\n * @event module:ol/events/Event~BaseEvent#change\n * @api\n */\n CHANGE: 'change',\n /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n BLUR: 'blur',\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n FOCUS: 'focus',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n RESIZE: 'resize',\n TOUCHMOVE: 'touchmove',\n WHEEL: 'wheel'\n};\n//# sourceMappingURL=EventType.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/events/EventType.js?"); /***/ }), /***/ "./node_modules/ol/events/KeyCode.js": /*!*******************************************!*\ !*** ./node_modules/ol/events/KeyCode.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @module ol/events/KeyCode\n */\n/**\n * @enum {number}\n * @const\n */\nexports.default = {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n};\n//# sourceMappingURL=KeyCode.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/events/KeyCode.js?"); /***/ }), /***/ "./node_modules/ol/events/Target.js": /*!******************************************!*\ !*** ./node_modules/ol/events/Target.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Disposable = __webpack_require__(/*! ../Disposable.js */ \"./node_modules/ol/Disposable.js\");\n\nvar _Disposable2 = _interopRequireDefault(_Disposable);\n\nvar _Event = __webpack_require__(/*! ./Event.js */ \"./node_modules/ol/events/Event.js\");\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nvar _functions = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n\nvar _obj = __webpack_require__(/*! ../obj.js */ \"./node_modules/ol/obj.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n/**\n * @module ol/events/Target\n */\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n * `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n * There is no event target hierarchy. When a listener calls\n * `stopPropagation` or `preventDefault` on an event object, it means that no\n * more listeners after this one will be called. Same as when the listener\n * returns false.\n */\nvar Target = /** @class */function (_super) {\n __extends(Target, _super);\n /**\n * @param {*=} opt_target Default event target for dispatched events.\n */\n function Target(opt_target) {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {*}\n */\n _this.eventTarget_ = opt_target;\n /**\n * @private\n * @type {Object}\n */\n _this.pendingRemovals_ = null;\n /**\n * @private\n * @type {Object}\n */\n _this.dispatching_ = null;\n /**\n * @private\n * @type {Object>}\n */\n _this.listeners_ = null;\n return _this;\n }\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n Target.prototype.addEventListener = function (type, listener) {\n if (!type || !listener) {\n return;\n }\n var listeners = this.listeners_ || (this.listeners_ = {});\n var listenersForType = listeners[type] || (listeners[type] = []);\n if (listenersForType.indexOf(listener) === -1) {\n listenersForType.push(listener);\n }\n };\n /**\n * Dispatches an event and calls all listeners listening for events\n * of this type. The event parameter can either be a string or an\n * Object with a `type` property.\n *\n * @param {import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n Target.prototype.dispatchEvent = function (event) {\n /** @type {import(\"./Event.js\").default|Event} */\n var evt = typeof event === 'string' ? new _Event2.default(event) : event;\n var type = evt.type;\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n var listeners = this.listeners_ && this.listeners_[type];\n var propagate;\n if (listeners) {\n var dispatching = this.dispatching_ || (this.dispatching_ = {});\n var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */listeners[i].handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */listeners[i].call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n --dispatching[type];\n if (dispatching[type] === 0) {\n var pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, _functions.VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n };\n /**\n * Clean up.\n */\n Target.prototype.disposeInternal = function () {\n this.listeners_ && (0, _obj.clear)(this.listeners_);\n };\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array|undefined} Listeners.\n */\n Target.prototype.getListeners = function (type) {\n return this.listeners_ && this.listeners_[type] || undefined;\n };\n /**\n * @param {string=} opt_type Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n Target.prototype.hasListener = function (opt_type) {\n if (!this.listeners_) {\n return false;\n }\n return opt_type ? opt_type in this.listeners_ : Object.keys(this.listeners_).length > 0;\n };\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n Target.prototype.removeEventListener = function (type, listener) {\n var listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n var index = listeners.indexOf(listener);\n if (index !== -1) {\n if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = _functions.VOID;\n ++this.pendingRemovals_[type];\n } else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n };\n return Target;\n}(_Disposable2.default);\nexports.default = Target;\n//# sourceMappingURL=Target.js.map\n\n//# sourceURL=webpack:///./node_modules/ol/events/Target.js?"); /***/ }), /***/ "./node_modules/ol/events/condition.js": /*!*********************************************!*\ !*** ./node_modules/ol/events/condition.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.primaryAction = exports.penOnly = exports.touchOnly = exports.mouseOnly = exports.targetNotEditable = exports.shiftKeyOnly = exports.platformModifierKeyOnly = exports.noModifierKeys = exports.doubleClick = exports.singleClick = exports.pointerMove = exports.never = exports.mouseActionButton = exports.click = exports.always = exports.focusWithTabindex = exports.focus = exports.altShiftKeysOnly = exports.altKeyOnly = undefined;\nexports.all = all;\n\nvar _MapBrowserEventType = __webpack_require__(/*! ../MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n\nvar _MapBrowserEventType2 = _interopRequireDefault(_MapBrowserEventType);\n\nvar _functions = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n\nvar _has = __webpack_require__(/*! ../has.js */ \"./node_modules/ol/has.js\");\n\nvar _asserts = __webpack_require__(/*! ../asserts.js */ \"./node_modules/ol/asserts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\n/**\n * @module ol/events/condition\n */\nfunction all(var_args) {\n var conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n var pass = true;\n for (var i = 0, ii = conditions.length; i < ii; ++i) {\n pass = pass && conditions[i](event);\n if (!pass) {\n break;\n }\n }\n return pass;\n };\n}\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nvar altKeyOnly = exports.altKeyOnly = function altKeyOnly(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */mapBrowserEvent.originalEvent;\n return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nvar altShiftKeysOnly = exports.altShiftKeysOnly = function altShiftKeysOnly(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */mapBrowserEvent.originalEvent;\n return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey;\n};\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `
`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nvar focus = exports.focus = function focus(event) {\n return event.target.getTargetElement().contains(document.activeElement);\n};\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nvar focusWithTabindex = exports.focusWithTabindex = function focusWithTabindex(event) {\n return event.map.getTargetElement().hasAttribute('tabindex') ? focus(event) : true;\n};\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nvar always = exports.always = _functions.TRUE;\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nvar click = exports.click = function click(mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType2.default.CLICK;\n};\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nvar mouseActionButton = exports.mouseActionButton = function mouseActionButton(mapBrowserEvent) {\n var originalEvent = /** @type {MouseEvent} */mapBrowserEvent.originalEvent;\n return originalEvent.button == 0 && !(_has.WEBKIT && _has.MAC && originalEvent.ctrlKey);\n};\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nvar never = exports.never = _functions.FALSE;\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nvar pointerMove = exports.pointerMove = function pointerMove(mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nvar singleClick = exports.singleClick = function singleClick(mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType2.default.SINGLECLICK;\n};\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nvar doubleClick = exports.doubleClick = function doubleClick(mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType2.default.DBLCLICK;\n};\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nvar noModifierKeys = exports.noModifierKeys = function noModifierKeys(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */mapBrowserEvent.originalEvent;\n return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nvar platformModifierKeyOnly = exports.platformModifierKeyOnly = function platformModifierKeyOnly(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */mapBrowserEvent.originalEvent;\n return !originalEvent.altKey && (_has.MAC ? originalEvent.metaKey : originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nvar shiftKeyOnly = exports.shiftKeyOnly = function shiftKeyOnly(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */mapBrowserEvent.originalEvent;\n return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey;\n};\n/**\n * Return `true` if the target element is not editable, i.e. not a ``-,\n * `