diff --git a/dist/MapboxVectorLayer.d.ts b/dist/MapboxVectorLayer.d.ts new file mode 100644 index 00000000..2bc00657 --- /dev/null +++ b/dist/MapboxVectorLayer.d.ts @@ -0,0 +1,274 @@ +/** + * @typedef {Object} Options + * @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a + * style created with Mapbox Studio and hosted on Mapbox, this will look like + * 'mapbox://styles/you/your-style'. + * @property {string} [accessToken] The access token for your Mapbox style. This has to be provided + * for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query + * parameter of the style url. + * @property {string} [source] If your style uses more than one source, you need to use either the + * `source` property or the `layers` property to limit rendering to a single vector source. The + * `source` property corresponds to the id of a vector source in your Mapbox style. + * @property {Array} [layers] Limit rendering to the list of included layers. All layers + * must share the same vector source. If your style uses more than one source, you need to use + * either the `source` property or the `layers` property to limit rendering to a single vector + * source. + * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all + * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority + * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features. + * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has + * higher priority. + * + * As an optimization decluttered features from layers with the same `className` are rendered above + * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this + * behavior and place declutterd features with their own layer configure the layer with a `className` + * other than `ol-layer`. + * @property {import("ol/layer/Base.js").BackgroundColor|false} [background] Background color for the layer. + * If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent + * the Mapbox style's background from being used. + * @property {string} [className='ol-layer'] A CSS class name to set to the layer element. + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {import("ol/extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will + * match the style source's `minzoom`. + * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match + * the style source's `minzoom`. + * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will + * be visible. + * @property {import("ol/render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting + * features before rendering. By default features are drawn in the order that they are created. Use + * `null` to avoid the sort, but get an undefined draw order. + * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the + * renderer when getting features from the vector tile for the rendering or hit-detection. + * Recommended value: Vector tiles are usually generated with a buffer, so this value should match + * the largest possible buffer of the used tiles. It should be at least the size of the largest + * point symbol or line width. + * @property {import("ol/layer/VectorTile.js").VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles: + * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom + * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on + * rotated views. + * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector + * tile layers with only a few rendered features (e.g. for highlighting a subset of features of + * another layer with the same source). + * @property {import("ol/Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage + * this layer in its layers collection, and the layer will be rendered on top. This is useful for + * temporary layers. The standard way to add a layer to a map and have it managed by the map is to + * use `map.addLayer()`. + * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be + * recreated during animations. This means that no vectors will be shown clipped, but the setting + * will have a performance impact for large amounts of vector data. When set to `false`, batches + * will be recreated when no animation is active. + * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be + * recreated during interactions. See also `updateWhileAnimating`. + * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0` + * means no preloading. + * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. + * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ +/** + * @classdesc + * ```js + * import {MapboxVectorLayer} from 'ol-mapbox-style'; + * ``` + * A vector tile layer based on a Mapbox style that uses a single vector source. Configure + * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel. + * If the style uses more than one source, use the `source` property to choose a single + * vector source. If you want to render a subset of the layers in the style, use the `layers` + * property (all layers must share the same vector source). See the constructor options for + * more detail. + * + * const map = new Map({ + * view: new View({ + * center: [0, 0], + * zoom: 1, + * }), + * layers: [ + * new MapboxVectorLayer({ + * styleUrl: 'mapbox://styles/mapbox/bright-v9', + * accessToken: 'your-mapbox-access-token-here', + * }), + * ], + * target: 'map', + * }); + * + * On configuration or loading error, the layer will trigger an `'error'` event. Listeners + * will receive an object with an `error` property that can be used to diagnose the problem. + * + * **Note for users of the full build**: The `MapboxVectorLayer` requires the + * [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) library to be loaded as well. + * + * @param {Options} options Options. + * @extends {VectorTileLayer} + * @fires module:ol/events/Event~BaseEvent#event:error + * @api + */ +export default class MapboxVectorLayer extends VectorTileLayer { + /** + * @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken` + * must be provided. + */ + constructor(options: Options); + accessToken: string | undefined; +} +export type Map = import("ol/Map.js").default; +export type Options = { + /** + * The URL of the Mapbox style object to use for this layer. For a + * style created with Mapbox Studio and hosted on Mapbox, this will look like + * 'mapbox://styles/you/your-style'. + */ + styleUrl: string; + /** + * The access token for your Mapbox style. This has to be provided + * for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query + * parameter of the style url. + */ + accessToken?: string | undefined; + /** + * If your style uses more than one source, you need to use either the + * `source` property or the `layers` property to limit rendering to a single vector source. The + * `source` property corresponds to the id of a vector source in your Mapbox style. + */ + source?: string | undefined; + /** + * Limit rendering to the list of included layers. All layers + * must share the same vector source. If your style uses more than one source, you need to use + * either the `source` property or the `layers` property to limit rendering to a single vector + * source. + */ + layers?: string[] | undefined; + /** + * Declutter images and text. Decluttering is applied to all + * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority + * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features. + * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has + * higher priority. + * + * As an optimization decluttered features from layers with the same `className` are rendered above + * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this + * behavior and place declutterd features with their own layer configure the layer with a `className` + * other than `ol-layer`. + */ + declutter?: boolean | undefined; + /** + * Background color for the layer. + * If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent + * the Mapbox style's background from being used. + */ + background?: false | import("ol/layer/Base.js").BackgroundColor | undefined; + /** + * A CSS class name to set to the layer element. + */ + className?: string | undefined; + /** + * Opacity (0, 1). + */ + opacity?: number | undefined; + /** + * Visibility. + */ + visible?: boolean | undefined; + /** + * The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + */ + extent?: import("ol/extent.js").Extent | undefined; + /** + * The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + */ + zIndex?: number | undefined; + /** + * The minimum resolution (inclusive) at which this layer will be + * visible. + */ + minResolution?: number | undefined; + /** + * The maximum resolution (exclusive) below which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will + * match the style source's `minzoom`. + */ + maxResolution?: number | undefined; + /** + * The minimum view zoom level (exclusive) above which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match + * the style source's `minzoom`. + */ + minZoom?: number | undefined; + /** + * The maximum view zoom level (inclusive) at which this layer will + * be visible. + */ + maxZoom?: number | undefined; + /** + * Render order. Function to be used when sorting + * features before rendering. By default features are drawn in the order that they are created. Use + * `null` to avoid the sort, but get an undefined draw order. + */ + renderOrder?: import("ol/render.js").OrderFunction | undefined; + /** + * The buffer in pixels around the tile extent used by the + * renderer when getting features from the vector tile for the rendering or hit-detection. + * Recommended value: Vector tiles are usually generated with a buffer, so this value should match + * the largest possible buffer of the used tiles. It should be at least the size of the largest + * point symbol or line width. + */ + renderBuffer?: number | undefined; + /** + * Render mode for vector tiles: + * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom + * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on + * rotated views. + * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector + * tile layers with only a few rendered features (e.g. for highlighting a subset of features of + * another layer with the same source). + */ + renderMode?: import("ol/layer/VectorTile.js").VectorTileRenderType | undefined; + /** + * Sets the layer as overlay on a map. The map will not manage + * this layer in its layers collection, and the layer will be rendered on top. This is useful for + * temporary layers. The standard way to add a layer to a map and have it managed by the map is to + * use `map.addLayer()`. + */ + map?: import("ol/Map.js").default | undefined; + /** + * When set to `true`, feature batches will be + * recreated during animations. This means that no vectors will be shown clipped, but the setting + * will have a performance impact for large amounts of vector data. When set to `false`, batches + * will be recreated when no animation is active. + */ + updateWhileAnimating?: boolean | undefined; + /** + * When set to `true`, feature batches will be + * recreated during interactions. See also `updateWhileAnimating`. + */ + updateWhileInteracting?: boolean | undefined; + /** + * Preload. Load low-resolution tiles up to `preload` levels. `0` + * means no preloading. + */ + preload?: number | undefined; + /** + * Use interim tiles on error. + */ + useInterimTilesOnError?: boolean | undefined; + /** + * Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ + properties?: { + [x: string]: any; + } | undefined; +}; +import VectorTileLayer from 'ol/layer/VectorTile.js'; diff --git a/dist/apply.d.ts b/dist/apply.d.ts new file mode 100644 index 00000000..c54e9d66 --- /dev/null +++ b/dist/apply.d.ts @@ -0,0 +1,294 @@ +/** + * Applies a style function to an `ol/layer/VectorTile` or `ol/layer/Vector` + * with an `ol/source/VectorTile` or an `ol/source/Vector`. If the layer does not have a source + * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is + * set to `false`). + * + * **Example:** + * ```js + * import {applyStyle} from 'ol-mapbox-style'; + * import {VectorTile} from 'ol/layer.js'; + * + * const layer = new VectorTile({declutter: true}); + * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * + * The style function will render all layers from the `glStyle` object that use the source + * of the first layer, the specified `source`, or a subset of layers from the same source. The + * source needs to be a `"type": "vector"` or `"type": "geojson"` source. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer. When the layer has a source configured, + * it will be modified to use the configuration from the glStyle's `source`. Options specified on the + * layer's source will override those from the glStyle's `source`, except for `url` and + * `tileUrlFunction`. When the source projection is the default (`EPSG:3857`), the `tileGrid` will + * also be overridden. If you'd rather not have ol-mapbox-style modify the source, configure `applyStyle()` + * with the `updateSource: false` option. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or + * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is + * provided, all layers for the specified source will be included in the style function. When layer + * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey + * value, all layers using the first source specified in the glStyle will be rendered. + * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file + * (only required when a relative path is used for the `"sprite"` property of the style). + * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level. + * Only needed when working with non-standard tile grids or projections, can also be supplied with + * options. + * @return {Promise} Promise which will be resolved when the style can be used + * for rendering. + */ +export function applyStyle(layer: VectorTileLayer | VectorLayer, glStyle: string | any, sourceOrLayersOrOptions?: string | string[] | (Options & ApplyStyleOptions) | undefined, optionsOrPath?: string | (Options & ApplyStyleOptions) | undefined, resolutions?: number[] | undefined): Promise; +/** + * Applies properties of the Mapbox Style's first `background` layer to the + * provided map or layer (group). + * + * **Example:** + * ```js + * import {applyBackground} from 'ol-mapbox-style'; + * import {Map} from 'ol'; + * + * const map = new Map({target: 'map'}); + * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * @param {Map|import("ol/layer/Base.js").default} mapOrLayer OpenLayers Map or layer (group). + * @param {Object|string} glStyle Mapbox Style object or url. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the background is applied. + */ +export function applyBackground(mapOrLayer: Map | import("ol/layer/Base.js").default, glStyle: any | string, options?: Options): Promise; +/** + * Creates an OpenLayers VectorTile source for a gl source entry. + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url, + * with access key applied. + * @param {Options} options Options. + * @return {Promise} Promise resolving to a VectorTile source. + * @private + */ +export function setupVectorSource(glSource: any, styleUrl: string | undefined, options: Options): Promise; +export function setupLayer(glStyle: any, styleUrl: any, glLayer: any, options: any): Layer> | undefined; +/** + * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup. + * This includes the map background, the layers, and for Map instances that did not + * have a View defined yet also the center and the zoom. + * + * **Example:** + * ```js + * import apply from 'ol-mapbox-style'; + * + * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'}); + * ``` + * + * The center and zoom will only be set if present in the Mapbox Style document, + * and if not already set on the OpenLayers map. + * + * Layers will be added to the OpenLayers map, without affecting any layers that + * might already be set on the map. + * + * Layers added by `apply()` will have two additional properties: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function sets an additional `mapbox-style` property on the OpenLayers + * Map or LayerGroup instance, which holds the Mapbox Style object. + * + * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing + * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be + * the target of a new OpenLayers Map, or a layer group. If layer group, styles + * releated to the map and view will be ignored. + * @param {string|Object} style JSON style object or style url pointing to a + * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl` + * shown in Mapbox Studio's "share" panel. In addition, the `accessToken` option + * (see below) must be set. + * When passed as JSON style object, all OpenLayers layers created by `apply()` + * will be immediately available, but they may not have a source yet (i.e. when + * they are defined by a TileJSON url in the Mapbox Style document). When passed + * as style url, layers will be added to the map when the Mapbox Style document + * is loaded and parsed. + * @param {Options} options Options. + * @return {Promise} A promise that resolves after all layers have been added to + * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The + * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as + * argument. + */ +export function apply(mapOrGroupOrElement: Map | HTMLElement | string | LayerGroup, style: string | any, options?: Options): Promise; +/** + * If layerIds is not empty, applies the style specified in glStyle to the layer, + * and adds the layer to the map. + * + * The layer may not yet have a source when the function is called. If so, the style + * is applied to the layer via a once listener on the 'change:source' event. + * + * @param {Layer} layer An OpenLayers layer instance. + * @param {Array} layerIds Array containing layer ids of already-processed layers. + * @param {Object} glStyle Style as a JSON object. + * @param {string|undefined} styleUrl The original style URL. Only required + * when a relative path is used with the `"sprite"` property of the style. + * @param {Map|LayerGroup} mapOrGroup OpenLayers Map. + * @param {Options} options Options. + * @return {Promise} Returns a promise that resolves after the source has + * been set on the specified layer, and the style has been applied. + */ +export function finalizeLayer(layer: Layer, layerIds: Array, glStyle: any, styleUrl: string | undefined, mapOrGroup: Map | LayerGroup, options?: Options): Promise; +/** + * Get the Mapbox Layer object for the provided `layerId`. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {string} layerId Mapbox Layer id. + * @return {Object} Mapbox Layer object. + */ +export function getMapboxLayer(mapOrGroup: Map | LayerGroup, layerId: string): any; +/** + * Add a new Mapbox Layer object to the style. The map will be re-rendered. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {Object} mapboxLayer Mapbox Layer object. + * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added. + * @return {Promise} Resolves when the added layer is available. + */ +export function addMapboxLayer(mapOrGroup: Map | LayerGroup, mapboxLayer: any, beforeLayerId?: string | undefined): Promise; +/** + * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {Object} mapboxLayer Updated Mapbox Layer object. + */ +export function updateMapboxLayer(mapOrGroup: Map | LayerGroup, mapboxLayer: any): void; +/** + * Remove a Mapbox Layer object from the style. The map will be re-rendered. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {string|Object} mapboxLayerIdOrLayer Mapbox Layer id or Mapbox Layer object. + */ +export function removeMapboxLayer(mapOrGroup: Map | LayerGroup, mapboxLayerIdOrLayer: string | any): void; +/** + * Get the OpenLayers layer instance that contains the provided Mapbox Style + * `layer`. Note that multiple Mapbox Style layers are combined in a single + * OpenLayers layer instance when they use the same Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} layerId Mapbox Style layer id. + * @return {Layer} OpenLayers layer instance. + */ +export function getLayer(map: Map | LayerGroup, layerId: string): Layer; +/** + * Get the OpenLayers layer instances for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Array} OpenLayers layer instances. + */ +export function getLayers(map: Map | LayerGroup, sourceId: string): Array; +/** + * Get the OpenLayers source instance for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Source} OpenLayers source instance. + */ +export function getSource(map: Map | LayerGroup, sourceId: string): Source; +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * + * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the + * `mapbox-featurestate` property. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature + * state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @param {Object|null} state Feature state. Set to `null` to remove the feature state. + */ +export function setFeatureState(mapOrLayer: Map | VectorLayer | VectorTileLayer, feature: FeatureIdentifier, state: any | null): void; +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @return {Object|null} Feature state or `null` when no feature state is set for the given + * feature identifier. + */ +export function getFeatureState(mapOrLayer: Map | VectorLayer | VectorTileLayer, feature: FeatureIdentifier): any | null; +export type FeatureIdentifier = { + /** + * The feature id. + */ + id: string | number; + /** + * The source id. + */ + source: string; +}; +export type Options = { + /** + * Access token for 'mapbox://' urls. + */ + accessToken?: string | undefined; + /** + * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying + * the url, adding headers or setting credentials options. Called with the url and the resource + * type as arguments, this function is supposed to return a `Request` or a url `string`. Without a return value, + * the original request will not be modified. + */ + transformRequest?: ((arg0: string, arg1: import("./util.js").ResourceType) => (Request | string | void)) | undefined; + /** + * Only useful when working with non-standard projections. + * Code of a projection registered with OpenLayers. All sources of the style must be provided in this + * projection. The projection must also have a valid extent defined, which will be used to determine the + * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox + * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g. + * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`. + */ + projection?: string | undefined; + /** + * Only useful when working with non-standard projections. + * Resolutions for mapping resolution to the `zoom` used in the Mapbox style. + */ + resolutions?: number[] | undefined; + /** + * URL of the Mapbox GL style. Required for styles that were provided + * as object, when they contain a relative sprite url, or sources referencing data by relative url. + */ + styleUrl?: string | undefined; + /** + * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function be used for icons not in the sprite or to override sprite icons. + */ + getImage?: ((arg0: VectorLayer | VectorTileLayer, arg1: string) => HTMLImageElement | HTMLCanvasElement | string | undefined) | undefined; + /** + * Access token param. For internal use. + */ + accessTokenParam?: string | undefined; +}; +export type ApplyStyleOptions = { + /** + * Source. Default is `''`, which causes the first source in the + * style to be used. + */ + source?: string | undefined; + /** + * Layers. If no source is provided, the layers with the + * provided ids will be used from the style's `layers` array. All layers need to use the same source. + */ + layers?: string[] | undefined; + /** + * Update or create vector (tile) layer source with parameters + * specified for the source in the mapbox style definition. + */ + updateSource?: boolean | undefined; +}; +import VectorTileLayer from 'ol/layer/VectorTile.js'; +import VectorLayer from 'ol/layer/Vector.js'; +import Map from 'ol/Map.js'; +import Source from 'ol/source/Source.js'; +import Layer from 'ol/layer/Layer.js'; +import LayerGroup from 'ol/layer/Group.js'; diff --git a/dist/examples/apply-layergroup.css b/dist/examples/apply-layergroup.css new file mode 100644 index 00000000..3163e01e --- /dev/null +++ b/dist/examples/apply-layergroup.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=apply-layergroup.css.map*/ \ No newline at end of file diff --git a/dist/examples/apply-layergroup.css.map b/dist/examples/apply-layergroup.css.map new file mode 100644 index 00000000..2cef9265 --- /dev/null +++ b/dist/examples/apply-layergroup.css.map @@ -0,0 +1 @@ +{"version":3,"file":"apply-layergroup.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;E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;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/apply-layergroup.html b/dist/examples/apply-layergroup.html new file mode 100644 index 00000000..f432303d --- /dev/null +++ b/dist/examples/apply-layergroup.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/apply-layergroup.js b/dist/examples/apply-layergroup.js new file mode 100644 index 00000000..fee941ba --- /dev/null +++ b/dist/examples/apply-layergroup.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[835],{2357:(e,s,n)=>{n(9789);var a=n(8734),o=n(1202),t=n(9090),l=n(7539);const w=new a.Z;(0,l.nn)(w,"data/geojson-wms.json"),new o.Z({target:"map",view:new t.ZP({center:[-10203186.115192635,4475744.563386],zoom:4}),layers:[w]})}},e=>{e(e.s=2357)}]); +//# sourceMappingURL=apply-layergroup.js.map \ No newline at end of file diff --git a/dist/examples/apply-layergroup.js.map b/dist/examples/apply-layergroup.js.map new file mode 100644 index 00000000..657c821c --- /dev/null +++ b/dist/examples/apply-layergroup.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply-layergroup.js","mappings":"qKAKA,MAAMA,EAAa,IAAI,KACvB,QAAMA,EAAY,yBAElB,IAAI,IAAI,CACNC,OAAQ,MACRC,KAAM,IAAI,KAAK,CACbC,OAAQ,EAAE,mBAAoB,gBAC9BC,KAAM,IAERC,OAAQ,CAACL,I","sources":["webpack://ol-mapbox-style/./examples/apply-layergroup.js"],"sourcesContent":["import 'ol/ol.css';\nimport {Group as LayerGroup} from 'ol/layer.js';\nimport {Map, View} from 'ol';\nimport {apply} from 'ol-mapbox-style';\n\nconst layerGroup = new LayerGroup();\napply(layerGroup, 'data/geojson-wms.json');\n\nnew Map({\n target: 'map',\n view: new View({\n center: [-10203186.115192635, 4475744.563386],\n zoom: 4,\n }),\n layers: [layerGroup],\n});\n"],"names":["layerGroup","target","view","center","zoom","layers"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/common.js b/dist/examples/common.js new file mode 100644 index 00000000..468dce8a --- /dev/null +++ b/dist/examples/common.js @@ -0,0 +1,3 @@ +/*! For license information please see common.js.LICENSE.txt */ +(()=>{var t,e={9874:t=>{function e(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}t.exports=e,e.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},e.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},e.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},e.prototype.solveCurveX=function(t,e){var i,n,r,s,o;for(void 0===e&&(e=1e-6),r=t,o=0;o<8;o++){if(s=this.sampleCurveX(r)-t,Math.abs(s)(n=1))return n;for(;is?i=r:n=r,r=.5*(n-i)+i}return r},e.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},5694:(t,e)=>{var i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return t<0?0:t>1?1:t}function s(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function a(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.G=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in i)return i[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=r.indexOf("("),h=r.indexOf(")");if(-1!==l&&h+1===r.length){var c=r.substr(0,l),u=r.substr(l+1,h-(l+1)).split(","),d=1;switch(c){case"rgba":if(4!==u.length)return null;d=o(u.pop());case"rgb":return 3!==u.length?null:[s(u[0]),s(u[1]),s(u[2]),d];case"hsla":if(4!==u.length)return null;d=o(u.pop());case"hsl":if(3!==u.length)return null;var p=(parseFloat(u[0])%360+360)%360/360,f=o(u[1]),g=o(u[2]),m=g<=.5?g*(f+1):g+f-g*f,y=2*g-m;return[n(255*a(y,m,p+1/3)),n(255*a(y,m,p)),n(255*a(y,m,p-1/3)),d];default:return null}}return null}}catch(t){}},645:(t,e)=>{e.read=function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<>1,c=-7,u=i?r-1:0,d=i?-1:1,p=t[e+u];for(u+=d,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=h}return(p?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,f=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*l-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+p]=255&a,p+=f,a/=256,r-=8);for(o=o<0;t[i+p]=255&o,p+=f,o/=256,h-=8);t[i+p-f]|=128*g}},4138:t=>{var e={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},i=" ",n=/(italic|oblique)$/i,r={};t.exports=function(t,s,o){var a=r[t];if(!a){Array.isArray(t)||(t=[t]);for(var l=400,h="normal",c=[],u=0,d=t.length;u1?p[p.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){l=e[g],p.pop(),m&&g.startsWith(m)&&p.pop();break}}"number"==typeof f&&(l=f);var y=p.join(i).replace("Klokantech Noto Sans","Noto Sans");-1!==y.indexOf(i)&&(y='"'+y+'"'),c.push(y)}a=r[t]=[h,l,c]}return a[0]+i+a[1]+i+s+"px"+(o?"/"+o:"")+i+a[2]}},9789:()=>{},9204:t=>{t.exports=function t(i,n){if(!i){var r=new e(n);throw Error.captureStackTrace&&Error.captureStackTrace(r,t),r}};class e extends Error{}e.prototype.name="AssertionError"},3614:(t,e,i)=>{"use strict";t.exports=r;var n=i(645);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var s=4294967296,o=1/s,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function u(t,e){for(var i=0;i>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*s;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+w(this.buf,this.pos+4)*s;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(n=(112&(r=s[i.pos++]))>>4,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<3,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<10,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<17,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<24,r<128)return h(t,n,e);if(n|=(1&(r=s[i.pos++]))<<31,r<128)return h(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&a?function(t,e,i){return a.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){for(var n="",r=e;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(h=l):2===c?128==(192&(s=t[r+1]))&&(h=(31&l)<<6|63&s)<=127&&(h=null):3===c?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&l)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var i=l(this);for(t=t||[];this.pos127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var i,n;if(t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,s=0;s55295&&n<57344){if(!r){n>56319||s+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&c(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i=128&&c(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,r.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},2582:function(t){t.exports=function(){"use strict";function t(t,n,r,s,o){!function t(i,n,r,s,o){for(;s>r;){if(s-r>600){var a=s-r+1,l=n-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(r,Math.floor(n-l*c/a+u)),Math.min(s,Math.floor(n+(a-l)*c/a+u)),o)}var d=i[n],p=r,f=s;for(e(i,r,n),o(i[s],d)>0&&e(i,r,s);p0;)f--}0===o(i[r],d)?e(i,r,f):e(i,++f,s),f<=n&&(r=f+1),n<=f&&(s=f-1)}}(t,n,r||0,s||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,i,n,r,s){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,s),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var s=0;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=f(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,s,a,l,h,u,d=1/0,p=1/0,f=e;f<=i-e;f++){var g=o(t,0,f,this.toBBox),m=o(t,f,i,this.toBBox),y=(r=g,s=m,void 0,void 0,void 0,void 0,a=Math.max(r.minX,s.minX),l=Math.max(r.minY,s.minY),h=Math.min(r.maxX,s.maxX),u=Math.min(r.maxY,s.maxY),Math.max(0,h-a)*Math.max(0,u-l)),_=c(g)+c(m);y=e;p--){var f=t.children[p];a(l,t.leaf?r(f):f),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)},n}()},8714:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(2971),r=i(2071),s=i(291);const o="length";class a extends s.ZP{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends n.Z{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(r.Z.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(r.Z.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(r.Z.REMOVE,i,t)),this.dispatchEvent(new a(r.Z.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i{"use strict";i.d(e,{Z:()=>n});const n={ADD:"add",REMOVE:"remove"}},5431:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},8096:(t,e,i)=>{"use strict";i.d(e,{Kp:()=>c,Q9:()=>u,ZP:()=>d});var n=i(208),r=i(5487),s=i(553),o=i(177),a=i(5818),l=i(6885);class h extends n.Z{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"==typeof n?s.Z.IDLE:n,this.image_=null,this.loader="function"==typeof n?n:null}changed(){this.dispatchEvent(r.Z.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==s.Z.IDLE&&this.loader){this.state=s.Z.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,l.Vi)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=s.Z.LOADED})).catch((t=>{this.state=s.Z.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function c(t,e,i){const n=t;let s=!0,l=!1,h=!1;const c=[(0,a.Vx)(n,r.Z.LOAD,(function(){h=!0,l||e()}))];return n.src&&o.Tp?(l=!0,n.decode().then((function(){s&&e()})).catch((function(t){s&&(h?e():i())}))):c.push((0,a.Vx)(n,r.Z.ERROR,i)),function(){s=!1,c.forEach(a.bN)}}function u(t,e){return e&&(t.src=e),o.Tp?new Promise(((e,i)=>t.decode().then((()=>e(t)),i))):function(t,e){return new Promise(((e,i)=>{function n(){s(),e(t)}function r(){s(),i(new Error("Image load error"))}function s(){t.removeEventListener("load",n),t.removeEventListener("error",r)}t.addEventListener("load",n),t.addEventListener("error",r)}))}(t)}const d=h},553:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},825:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(4806),r=i(7195),s=i(8326),o=i(8096);class a extends n.Z{constructor(t,e,i,n,r,s){super(t,e,s),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=r.Z.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=r.Z.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,s.E4)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=r.Z.LOADED:this.state=r.Z.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==r.Z.ERROR&&(this.state=r.Z.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==r.Z.IDLE&&(this.state=r.Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.Kp)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},1202:(t,e,i)=>{"use strict";i.d(e,{Z:()=>qt});var n=i(2971),r=i(8714),s=i(2071),o=i(5431),a=i(6885),l=i(4187),h=i(6101),c=i(8641),u=i(2710),d=i(1295),p=i(1900);class f extends o.Z{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,l.O3)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,h.qC)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,h.nb)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,r,s,o,a){let l;const h=e.viewState;function u(t,e,i,n){return r.call(s,e,t?i:null,n)}const f=h.projection,g=(0,p.Cf)(t.slice(),f),m=[[0,0]];if(f.canWrapX()&&n){const t=f.getExtent(),e=(0,c.dz)(t);m.push([-e,0],[e,0])}const y=e.layerStatesArray,_=y.length,v=[],x=[];for(let n=0;n=0;--r){const s=y[r],c=s.layer;if(c.hasRenderer()&&(0,d.j)(s,h)&&o.call(a,c)){const r=c.getRenderer(),o=c.getSource();if(r&&o){const a=o.getWrapX()?g:t,h=u.bind(null,s.managed);x[0]=a[0]+m[n][0],x[1]=a[1]+m[n][1],l=r.forEachFeatureAtCoordinate(x,e,i,h,v)}if(l)return l}}if(0===v.length)return;const b=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*b)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,r,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,a.uX,this,r,s)}getMap(){return this.map_}renderFrame(t){(0,l.O3)()}flushDeclutterItems(t){}scheduleExpireIconCache(t){u.c.canExpireCache()&&t.postRenderFunctions.push(g)}}function g(t,e){u.c.expire()}const m=f;var y=i(5990),_=i(7380),v=i(8771),x=i(245),b=i(147),w=i(5818),C=i(8326);const E=class extends m{constructor(t){super(t),this.fontChangeListenerKey_=(0,w.oL)(b.sG,y.Z.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=x.XV+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new _.Z(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,w.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(v.Z.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=this.declutterLayers_;n.length=0;let r=null;for(let s=0,o=e.length;s=0;--i)e[i].renderDeclutter(t);e.length=0}};var T=i(5487),S=i(8734),R=i(291);class k extends R.ZP{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const I=k,M=class extends I{constructor(t,e,i,n,r,s){super(t,e,r),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},P={SINGLECLICK:"singleclick",CLICK:T.Z.CLICK,DBLCLICK:T.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},L="pointerdown";var A=i(208),O=i(177);class F extends A.Z{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=(0,w.oL)(i,L,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,w.oL)(i,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(T.Z.TOUCHMOVE,this.boundHandleTouchMove_,!!O.bM&&{passive:!1})}emulateClick_(t){let e=new M(P.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new M(P.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new M(P.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==P.POINTERUP||e.type==P.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=P.POINTERDOWN&&e.type!=P.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new M(P.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(w.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new M(P.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,w.oL)(t,P.POINTERMOVE,this.handlePointerMove_,this),(0,w.oL)(t,P.POINTERUP,this.handlePointerUp_,this),(0,w.oL)(this.element_,P.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,w.oL)(this.element_.getRootNode(),P.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new M(P.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new M(P.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,w.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(T.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,w.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(w.bN),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const j=F,Z="postrender",D="loadstart",z="loadend",N="layergroup",G="size",q="target",W="view";var U=i(2918),X=i(9090),V=i(7755),Y=i(9515);class B extends n.Z{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,C.ZF)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,C.ZF)(this.element);for(let t=0,e=this.listenerKeys.length;te.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,H.fS)(e,this.renderedAttributions_)){(0,C.ep)(this.ulElement_);for(let t=0,i=e.length;t0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:J.Vv}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(x.oj);t||0!==i?t&&0!==i&&this.element.classList.remove(x.oj):this.element.classList.add(x.oj)}this.label_.style.transform=t}this.rotation_=i}},tt=class extends K{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",r=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",s=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"==typeof s?document.createTextNode(s):s),h.addEventListener(T.Z.CLICK,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=r,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(T.Z.CLICK,this.handleClick_.bind(this,-i),!1);const u=e+" "+x.XV+" "+x.hg,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:J.Vv})):e.setZoom(n)}}},et="active";class it extends n.Z{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(et)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(et,t)}setMap(t){this.map_=t}}function nt(t,e,i,n){const r=t.getZoom();if(void 0===r)return;const s=t.getConstrainedZoom(r+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:J.Vv})}const rt=it,st=class extends rt{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==P.DBLCLICK){const i=t.originalEvent,n=t.map,r=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_;nt(n.getView(),s,r,this.duration_),i.preventDefault(),e=!0}return!e}};function ot(t){const e=t.length;let i=0,n=0;for(let r=0;r0}}else if(t.type==P.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==P.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}};function lt(t){const e=arguments;return function(t){let i=!0;for(let n=0,r=e.length;n0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}};var vt=i(828);const xt=class extends at{constructor(t){t=t||{},super({stopDown:a.Dv}),this.condition_=t.condition?t.condition:ht,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!mt(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===vt.h$)return;const n=e.getSize(),r=t.pixel,s=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=s}handleUpEvent(t){return!mt(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!mt(t)&&(!(!dt(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}};var bt=i(3083);class wt extends o.Z{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new bt.ZP([i])}getGeometry(){return this.geometry_}}const Ct=wt;class Et extends R.ZP{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}const Tt=class extends at{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new Ct(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:dt,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Et("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Et(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Et("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}},St=class extends Tt{constructor(t){super({condition:(t=t||{}).condition?t.condition:ft,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),r=e.getResolution()/n;i=i.clone(),i.scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:J.Vv})}},Rt="ArrowLeft",kt="ArrowRight",It="ArrowDown",Mt=class extends rt{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return pt(t)&>(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==T.Z.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==It||n==Rt||n==kt||"ArrowUp"==n)){const r=t.map.getView(),s=r.getResolution()*this.pixelDelta_;let o=0,a=0;n==It?a=-s:n==Rt?o=-s:n==kt?o=s:a=s;const l=[o,a];(0,p.U1)(l,r.getRotation()),function(t,e,i){const n=t.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:J.GE,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e}},Pt=class extends rt{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!function(t){const e=t.originalEvent;return O.tK?e.metaKey:e.ctrlKey}(t)&>(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==T.Z.KEYDOWN||t.type==T.Z.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,s="+"===n?this.delta_:-this.delta_;nt(r.getView(),s,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}};var Lt=i(3983);const At=class extends rt{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:ut;this.condition_=t.onFocusOnly?lt(ct,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==T.Z.WHEEL)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==T.Z.WHEEL&&(n=i.deltaY,O.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=O.MP),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const s=e.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=n;const o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),o),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,Lt.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),nt(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},Ot=class extends at{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=a.Dv),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=r;const s=t.map,o=s.getView();o.getConstraints().rotation!==vt.h$&&(this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(ot(this.targetPointers))),this.rotating_&&(s.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}},Ft=class extends at{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=a.Dv),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,s=i.clientY-n.clientY,o=Math.sqrt(r*r+s*s);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(ot(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};var jt=i(8661),Zt=i(4307),Dt=i(44);function zt(t){t instanceof d.Z?t.setMapInternal(null):t instanceof S.Z&&t.getLayers().forEach(zt)}function Nt(t,e){if(t instanceof d.Z)t.setMapInternal(e);else if(t instanceof S.Z){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new r.Z;return(void 0===t.zoom||t.zoom)&&e.push(new tt(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new Q(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new $(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new r.Z,i=new class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new xt),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new st({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new _t({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new Ot),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new Ft({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new Mt),e.push(new Pt({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new At({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new St({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new U.Z(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(N,this.handleLayerGroupChanged_),this.addChangeListener(W,this.handleViewChanged_),this.addChangeListener(G,this.handleSizeChanged_),this.addChangeListener(q,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof X.ZP||t.view.then((function(t){i.setView(new X.ZP(t))})),this.controls.addEventListener(s.Z.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(s.Z.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(s.Z.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(s.Z.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(s.Z.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(s.Z.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Nt(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,s=void 0!==i.layerFilter?i.layerFilter:a.uX,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,o,e,null,s,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof S.Z?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:a.uX,r=void 0!==e.hitTolerance?e.hitTolerance:0,s=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,s,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],r=e.height/i[1],s="changedTouches"in t?t.changedTouches[0]:t;return[(s.clientX-e.left)/n,(s.clientY-e.top)/r]}getTarget(){return this.get(q)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,jt.lO)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,h.nn)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(N)}setLayers(t){const e=this.getLayerGroup();if(t instanceof r.Z)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[V.Z.ANIMATING]||e[V.Z.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new S.V("removelayer",e)),this.set(N,t)}setSize(t){this.set(G,t)}setTarget(t){this.set(q,t)}setView(t){if(!t||t instanceof X.ZP)return void this.set(W,t);this.set(W,new X.ZP);const e=this;t.then((function(t){e.setView(new X.ZP(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||(e=[n,r],!(0,Zt.py)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,Dt.ZK)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,H.fS)(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}}const qt=Gt},2971:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(291),r=i(5990),s=i(2706),o=i(4187),a=i(9374);class l extends n.ZP{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends s.Z{constructor(t){super(),this.on,this.once,this.un,(0,o.sq)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=r.Z.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.x)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const c=h},5990:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PROPERTYCHANGE:"propertychange"}},2706:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(208),r=i(5487),s=i(5818);class o extends n.Z{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(r.Z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r{"use strict";i.d(e,{Z:()=>h});var n=i(208),r=i(5487),s=i(7195),o=i(4187),a=i(1015);class l extends n.Z{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(r.Z.CHANGE)}release(){this.state===s.Z.ERROR&&this.setState(s.Z.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==s.Z.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==s.Z.LOADED){t.interimTile=null;break}t.getState()==s.Z.LOADING?e=t:t.getState()==s.Z.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==s.Z.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.O3)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.YQ)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},2918:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h,R:()=>c});var n=i(5487),r=i(9515),s=i(9374);const o=1/0,a=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,s.Z)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,r.h)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=o&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;for(;t>1;){const r=this.getLeftChildIndex_(t),s=this.getRightChildIndex_(t),o=st;){const t=this.getParentIndex_(e);if(!(n[t]>s))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=r,n[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const r=e.length;let s,a,l;for(a=0;a0;)n=this.dequeue()[0],r=n.getKey(),i=n.getState(),i!==l.Z.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++s,n.load())}};function c(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return o;if(!t.wantedTiles[i][e.getKey()])return o;const s=t.viewState.center,a=n[0]-s[0],l=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(a*a+l*l)/r}},2519:(t,e,i)=>{"use strict";i.d(e,{T:()=>r,Z:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function r(t,e,i,r,s){return void 0!==s?(s.minX=t,s.maxX=e,s.minY=i,s.maxY=r,s):new n(t,e,i,r)}const s=n},7195:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},9090:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>S});var n=i(2971),r=i(7755);const s={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var o=i(4768),a=i(8661),l=i(6885),h=i(1900),c=i(9515),u=i(3983);function d(t,e,i){return function(n,r,s,o,a){if(!n)return;if(!r&&!e)return n;const l=e?0:s[0]*r,h=e?0:s[1]*r,c=a?a[0]:0,d=a?a[1]:0;let p=t[0]+l/2+c,f=t[2]-l/2+c,g=t[1]+h/2+d,m=t[3]-h/2+d;p>f&&(p=(f+p)/2,f=p),g>m&&(g=(m+g)/2,m=g);let y=(0,u.uZ)(n[0],p,f),_=(0,u.uZ)(n[1],g,m);if(o&&i&&r){const t=30*r;y+=-t*Math.log(1+Math.max(0,p-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-f)/t),_+=-t*Math.log(1+Math.max(0,g-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-m)/t)}return[y,_]}}function p(t){return t}var f=i(8641),g=i(5537);function m(t,e,i,n){const r=(0,f.dz)(e)/i[0],s=(0,f.Cr)(e)/i[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function y(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,u.uZ)(n,i/2,2*e)}function _(t,e,i,n,r){return i=void 0===i||i,function(s,o,a,l){if(void 0!==s){const o=n?m(t,n,a,r):t;return i&&l?y(s,o,e):(0,u.uZ)(s,e,o)}}}var v=i(828),x=i(1015),b=i(3083);class w extends n.Z{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.UQ)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.h_)(),t.center&&(t.center=(0,a.Vs)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.dY)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in s)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let r=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,d=void 0!==t.showFullExtent&&t.showFullExtent,p=(0,a.UQ)(t.projection,"EPSG:3857"),v=p.getExtent();let x=t.constrainOnlyCenter,b=t.extent;if(h||b||!p.isGlobal()||(x=!1,b=v),void 0!==t.resolutions){const o=t.resolutions;i=o[r],n=void 0!==o[s]?o[s]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(r,s,o,a){if(void 0!==r){const l=t[0],h=t[t.length-1],c=i?m(l,i,o,n):l;if(a)return e?y(r,c,h):(0,u.uZ)(r,h,c);const d=Math.min(c,r),p=Math.floor((0,g.h7)(t,d,s));return t[p]>c&&p1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[r.Z.INTERACTING]>0}cancelAnimations(){let t;this.setHint(r.Z.ANIMATING,-this.hints_[r.Z.ANIMATING]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const l=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===l?r.targetResolution:r.sourceResolution+l*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===l?(0,u.$W)(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+l*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(r.Z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&C(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.U1)(i,t-this.getRotation()),(0,h.IH)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),r=this.getResolution();return void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.lO)(t,this.getProjection()):t}getCenterInternal(){return this.get(s.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.Fj)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.h)(e,"The view center is not defined");const i=this.getResolution();(0,c.h)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.h)(void 0!==n,"The view rotation is not defined"),(0,f.p8)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(s.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.dY)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,f.dz)(t)/e[0],n=(0,f.Cr)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(s.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const r=this.padding_;if(r){const t=this.getViewportSizeMinusPadding_();n=T(n,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const r=(0,g.h7)(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.uZ)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.h)(!(0,f.xb)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.dY)(t,this.getProjection());i=(0,b.oJ)(e)}else if("Circle"===t.getType()){const e=(0,a.dY)(t.getExtent(),this.getProjection());i=(0,b.oJ)(e),i.rotate(this.getRotation(),(0,f.qg)(e))}else{const e=(0,a.Cs)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=r.length;t{"use strict";i.d(e,{Z:()=>n});const n={ANIMATING:0,INTERACTING:1}},5537:(t,e,i)=>{"use strict";function n(t,e,i){let n,s;i=i||r;let o=0,a=t.length,l=!1;for(;o>1),s=+i(t[n],e),s<0?o=n+1:(a=n,l=!s);return l?o:~o}function r(t,e){return t>e?1:t0?r-1:r}return n-1}if(i>0){for(let i=1;i0||i&&0===s)}))}i.d(e,{FZ:()=>o,fS:()=>l,h7:()=>s,j2:()=>r,l7:()=>a,pT:()=>h,ry:()=>n})},9515:(t,e,i)=>{"use strict";function n(t,e){if(!t)throw new Error(e)}i.d(e,{h:()=>n})},9706:(t,e,i)=>{"use strict";i.d(e,{BB:()=>c,XC:()=>o,_2:()=>l});var n=i(3983);const r=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,s=/^([a-z]*)$|^hsla?\(.*\)$/i;function o(t){return"string"==typeof t?t:c(t)}const a=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}n=function(t){let e,i,n,o,a;if(s.exec(t)&&(t=function(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}(t)),r.exec(t)){const r=t.length-1;let s;s=r<=4?1:2;const l=4===r||8===r;e=parseInt(t.substr(1+0*s,s),16),i=parseInt(t.substr(1+1*s,s),16),n=parseInt(t.substr(1+2*s,s),16),o=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(o=(o<<4)+o)),a=[e,i,n,o/255]}else if(t.startsWith("rgba("))a=t.slice(5,-1).split(",").map(Number),h(a);else{if(!t.startsWith("rgb("))throw new Error("Invalid color");a=t.slice(4,-1).split(",").map(Number),a.push(1),h(a)}return a}(i),t[i]=n,++e}return n}}();function l(t){return Array.isArray(t)?t:a(t)}function h(t){return t[0]=(0,n.uZ)(t[0]+.5|0,0,255),t[1]=(0,n.uZ)(t[1]+.5|0,0,255),t[2]=(0,n.uZ)(t[2]+.5|0,0,255),t[3]=(0,n.uZ)(t[3],0,1),t}function c(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}},6620:(t,e,i)=>{"use strict";i.d(e,{y:()=>r});var n=i(9706);function r(t){return Array.isArray(t)?(0,n.BB)(t):t}},44:(t,e,i)=>{"use strict";i.d(e,{ZK:()=>s});const n={info:1,warn:2,error:3,none:4};let r=n.info;function s(...t){r>n.warn||console.warn(...t)}},1900:(t,e,i)=>{"use strict";i.d(e,{Cf:()=>l,IH:()=>r,U1:()=>o,bA:()=>a,fS:()=>s});var n=i(8641);function r(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function s(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function o(t,e){const i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,s=t[1]*i+t[0]*n;return t[0]=r,t[1]=s,t}function a(t,e){return t[0]*=e,t[1]*=e,t}function l(t,e){if(e.canWrapX()){const i=(0,n.dz)(e.getExtent()),r=function(t,e,i){const r=e.getExtent();let s=0;return e.canWrapX()&&(t[0]r[2])&&(i=i||(0,n.dz)(r),s=Math.floor((t[0]-r[0])/i)),s}(t,e,i);r&&(t[0]-=r*i)}return t}},245:(t,e,i)=>{"use strict";i.d(e,{XV:()=>r,hN:()=>o,hg:()=>s,oj:()=>n,p:()=>h});const n="ol-hidden",r="ol-unselectable",s="ol-control",o="ol-collapsed",a=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"),l=["style","variant","weight","size","lineHeight","family"],h=function(t){const e=t.match(a);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=l.length;t{"use strict";i.d(e,{$H:()=>o,E4:()=>r,ZF:()=>a,ep:()=>l,hF:()=>h,jy:()=>s});var n=i(177);function r(t,e,i,r){let s;return s=i&&i.length?i.shift():n.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",r)}function s(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function o(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function a(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function l(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function h(t,e){const i=t.childNodes;for(let n=0;;++n){const r=i[n],s=e[n];if(!r&&!s)break;r!==s&&(r?s?t.insertBefore(s,r):(t.removeChild(r),--n):t.appendChild(s))}}},1015:(t,e,i)=>{"use strict";function n(t){return Math.pow(t,3)}function r(t){return 1-n(1-t)}function s(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{GE:()=>o,Vv:()=>r,YQ:()=>n,rd:()=>s})},5818:(t,e,i)=>{"use strict";i.d(e,{Vx:()=>s,bN:()=>o,oL:()=>r});var n=i(9374);function r(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function s(t,e,i,n){return r(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.Z)(t))}},291:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>n});const n=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},5487:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},208:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(5431),r=i(291),s=i(6885),o=i(9374);class a extends n.Z{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new r.ZP(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=s.Zn,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}}const l=a},8641:(t,e,i)=>{"use strict";i.d(e,{Cf:()=>N,Cr:()=>M,EO:()=>Z,Ed:()=>P,GN:()=>m,H6:()=>w,HK:()=>g,I7:()=>D,MV:()=>G,Ne:()=>z,T9:()=>p,Wj:()=>v,Xv:()=>A,YN:()=>f,b8:()=>l,bg:()=>C,d9:()=>o,dY:()=>I,dz:()=>O,f3:()=>s,fS:()=>y,g0:()=>R,hC:()=>E,hI:()=>r,jE:()=>c,kK:()=>F,l7:()=>_,lJ:()=>d,p8:()=>k,pX:()=>u,qP:()=>x,qf:()=>a,qg:()=>S,r4:()=>h,rL:()=>L,w$:()=>T,xb:()=>j});var n=i(8716);function r(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;is&&(h|=n.Z.RIGHT),lo&&(h|=n.Z.ABOVE),h===n.Z.UNKNOWN&&(h=n.Z.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function p(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function f(t){return p(1/0,1/0,-1/0,-1/0,t)}function g(t,e){const i=t[0],n=t[1];return p(i,n,i,n,e)}function m(t,e,i,n,r){return x(f(r),t,e,i,n)}function y(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function _(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function v(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function x(t,e,i,n,r){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function j(t){return t[2]=a&&m<=h),r||!(o&n.Z.RIGHT)||s&n.Z.RIGHT||(y=f-(p-h)*g,r=y>=l&&y<=c),r||!(o&n.Z.BELOW)||s&n.Z.BELOW||(m=p-(f-l)/g,r=m>=a&&m<=h),r||!(o&n.Z.LEFT)||s&n.Z.LEFT||(y=f-(p-a)*g,r=y>=l&&y<=c)}return r}function z(t,e,i,n){if(j(t))return f(i);let r=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let s=0;s=i[2])){const e=O(i),r=Math.floor((n[0]-i[0])/e)*e;t[0]-=r,t[2]-=r}return t}function G(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];N(t,e);const n=O(i);if(O(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}},8716:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},7537:(t,e,i)=>{"use strict";i.d(e,{Be:()=>o,ov:()=>s});var n=i(6885);let r=!1;function s(t,e,i,n,s,o,a){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(l.responseType="arraybuffer"),l.withCredentials=r,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=l.responseText:"xml"==t?(n=l.responseXML,n||(n=(new DOMParser).parseFromString(l.responseText,"application/xml"))):"arraybuffer"==t&&(n=l.response),n?o(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):a()}else a()},l.onerror=a,l.send()}function o(t,e){return function(i,r,o,a,l){const h=this;s(t,e,i,r,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.Zn)}}},9646:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>s,fI:()=>o});var n=i(4187),r=i(8661);const s=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?(0,r.U2)(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=(0,r.U2)(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return(0,n.O3)()}readFeature(t,e){return(0,n.O3)()}readFeatures(t,e){return(0,n.O3)()}readGeometry(t,e){return(0,n.O3)()}readProjection(t){return(0,n.O3)()}writeFeature(t,e){return(0,n.O3)()}writeFeatures(t,e){return(0,n.O3)()}writeGeometry(t,e){return(0,n.O3)()}};function o(t,e,i){const n=i?(0,r.U2)(i.featureProjection):null,s=i?(0,r.U2)(i.dataProjection):null;let o;if(o=n&&s&&!(0,r.OP)(n,s)?(e?t.clone():t).transform(e?n:s,e?s:n):t,e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i{"use strict";i.d(e,{Z:()=>I});var n=i(2971),r=i(5487),s=i(9515),o=i(5818);class a extends n.Z{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.oL)(t,r.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,s.h)("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const l=a;var h=i(1694),c=i(8641);class u extends h.Z{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.bN),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t{"use strict";i.d(e,{Dv:()=>s,Vi:()=>l,Zn:()=>o,qe:()=>a,uX:()=>r});var n=i(5537);function r(){return!0}function s(){return!1}function o(){}function a(t){let e,i,r,s=!1;return function(){const o=Array.prototype.slice.call(arguments);return s&&this===r&&(0,n.fS)(o,i)||(s=!0,r=this,i=o,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},1694:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var n=i(2971),r=i(4187),s=i(6101),o=i(8641),a=i(8661),l=i(6885),h=i(6442);const c=(0,s.Ue)();class u extends n.Z{constructor(){super(),this.extent_=(0,o.lJ)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.qe)((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,r.O3)()}closestPointXY(t,e,i,n){return(0,r.O3)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,r.O3)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.YN)(t),this.extentRevision_=this.getRevision()}return(0,o.EO)(this.extent_,t)}rotate(t,e){(0,r.O3)()}scale(t,e,i){(0,r.O3)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,r.O3)()}getType(){return(0,r.O3)()}applyTransform(t){(0,r.O3)()}intersectsExtent(t){return(0,r.O3)()}translate(t,e){(0,r.O3)()}transform(t,e){const i=(0,a.U2)(t),n="tile-pixels"==i.getUnits()?function(t,n,r){const l=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Cr)(u)/(0,o.Cr)(l);return(0,s.qC)(c,u[0],u[3],d,-d,0,0,0),(0,h.vT)(t,0,t.length,r,c,n),(0,a.Ck)(i,e)(t,n,r)}:(0,a.Ck)(i,e);return this.applyTransform(n),this}}const d=u},2083:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(2967),r=i(3042),s=i(8641),o=i(8527),a=i(226),l=i(5537),h=i(3032),c=i(9241),u=i(9405),d=i(3746),p=i(7374);class f extends n.ZP{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){this.flatCoordinates?(0,l.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new f(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,s.qf)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.E)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,u.iJ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,c.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,u.WW)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,p.W)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new f(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.Kz)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()}}const g=f},7403:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var n=i(2083),r=i(2967),s=i(3042),o=i(8641),a=i(8527),l=i(226),h=i(5537),c=i(9241),u=i(9405),d=i(3746);class p extends r.ZP{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{let e=this.getLayout();const i=t,n=[],r=[];for(let t=0,s=i.length;t{"use strict";i.d(e,{Z:()=>u});var n=i(188),r=i(2967),s=i(8641),o=i(8527),a=i(5537),l=i(9241),h=i(3983);class c extends r.ZP{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?(0,a.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.qf)(this.getExtent(),t,e))return n;const r=this.flatCoordinates,o=this.stride;for(let s=0,a=r.length;s{"use strict";i.d(e,{Z:()=>v});var n=i(6259),r=i(3083),s=i(2967),o=i(3042),a=i(8641),l=i(8527),h=i(5537),c=i(3448),u=i(9241),d=i(3746),p=i(974),f=i(4078),g=i(1071),m=i(9679),y=i(226);class _ extends s.ZP{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){let n=this.getLayout();const r=t,s=[],o=[];for(let t=0,e=r.length;t{"use strict";i.d(e,{Z:()=>l});var n=i(2967),r=i(8641),s=i(8527),o=i(3983);class a extends n.ZP{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const r=this.flatCoordinates,s=(0,o.bI)(t,e,r[0],r[1]);if(s{"use strict";i.d(e,{ZP:()=>v,oJ:()=>x});var n=i(2967),r=i(3042),s=i(8641),o=i(8527),a=i(226),l=i(9241),h=i(4078);class c extends n.ZP{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,s.qf)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.QQ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c;var d=i(188),p=i(5537),f=i(3448),g=i(3746),m=i(974),y=i(9679);class _ extends n.ZP{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,p.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new _(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,s.qf)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,y.wY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,h.KP)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,m.zX)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.o1)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,s.qg)(this.getExtent());this.flatInteriorPoint_=(0,f.X)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.Z(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let r=0;for(let s=0,o=i.length;s{"use strict";i.d(e,{Kr:()=>h,ZP:()=>c});var n=i(1694),r=i(4187),s=i(8641),o=i(6442);class a extends n.Z{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return(0,s.GN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,r.O3)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length{"use strict";function n(t,e,i,n){let r=0,s=t[i-n],o=t[i-n+1];for(;es,KP:()=>r,QQ:()=>n})},1071:(t,e,i)=>{"use strict";i.d(e,{E:()=>r});var n=i(8641);function r(t,e,i,r){const s=[];let o=(0,n.lJ)();for(let a=0,l=i.length;a{"use strict";i.d(e,{Af:()=>o,Bv:()=>s,H$:()=>l,Xl:()=>h,gI:()=>c,sD:()=>a});var n=i(3983);function r(t,e,i,r,s,o,a){const l=t[e],h=t[e+1],c=t[i]-l,u=t[i+1]-h;let d;if(0===c&&0===u)d=e;else{const p=((s-l)*c+(o-h)*u)/(c*c+u*u);if(p>1)d=i;else{if(p>0){for(let s=0;ss&&(s=l),o=i,a=r}return s}function o(t,e,i,n,r){for(let o=0,a=i.length;o{"use strict";i.d(e,{TG:()=>s,Zl:()=>a,uG:()=>r,wY:()=>o});var n=i(8641);function r(t,e,i,r,o){return!(0,n.H6)(o,(function(n){return!s(t,e,i,r,n[0],n[1])}))}function s(t,e,i,n,r,s){let o=0,a=t[i-n],l=t[i-n+1];for(;es&&(i-a)*(s-l)-(r-a)*(n-l)>0&&o++:n<=s&&(i-a)*(s-l)-(r-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,r,o){if(0===i.length)return!1;if(!s(t,e,i[0],n,r,o))return!1;for(let e=1,a=i.length;e{"use strict";function n(t,e,i,n){for(let n=0,r=i.length;nn,QT:()=>o,Sg:()=>r,_5:()=>s})},9241:(t,e,i)=>{"use strict";function n(t,e,i,n,r){r=void 0!==r?r:[];let s=0;for(let o=e;on,o1:()=>r,ug:()=>s})},3448:(t,e,i)=>{"use strict";i.d(e,{U:()=>o,X:()=>s});var n=i(5537),r=i(9679);function s(t,e,i,s,o,a,l){let h,c,u,d,p,f,g;const m=o[a+1],y=[];for(let n=0,r=i.length;nv&&(u=(d+p)/2,(0,r.wY)(t,e,i,s,u,m)&&(_=u,v=n)),d=p}return isNaN(_)&&(_=o[a]),l?(l.push(_,m,v),l):[_,m,v]}function o(t,e,i,n,r){let o=[];for(let a=0,l=i.length;a{"use strict";i.d(e,{WW:()=>s,dG:()=>a,iJ:()=>o});var n=i(5537),r=i(3983);function s(t,e,i,s,o,a,l){let h,c;const u=(i-e)/s;if(1===u)h=e;else if(2===u)h=e,c=o;else if(0!==u){let r=t[e],a=t[e+1],l=0;const u=[0];for(let n=e+s;n1?l:2,a=a||new Array(l);for(let e=0;e>1;s{"use strict";i.d(e,{AW:()=>a,Kz:()=>o,ac:()=>h,mV:()=>l,oW:()=>c});var n=i(8641),r=i(3032),s=i(9679);function o(t,e,i,s,o){const a=(0,n.qP)((0,n.lJ)(),t,e,i,s);return!!(0,n.kK)(o,a)&&(!!(0,n.r4)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,r.E)(t,e,i,s,(function(t,e){return(0,n.I7)(o,t,e)})))}function a(t,e,i,n,r){for(let s=0,a=i.length;s{"use strict";function n(t,e,i,n){let r=t[e],s=t[e+1],o=0;for(let a=e+n;an})},974:(t,e,i)=>{"use strict";function n(t,e,i,n){for(;e0}function s(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,a=i.length;oh,$v:()=>s,Oj:()=>o,zX:()=>a,dL:()=>l})},3032:(t,e,i)=>{"use strict";function n(t,e,i,n,r){let s;for(e+=n;en})},226:(t,e,i)=>{"use strict";i.d(e,{Pp:()=>h,UJ:()=>s,Zh:()=>l,dt:()=>r,uZ:()=>o});var n=i(3983);function r(t,e,i,r,s,o,a){const l=(i-e)/r;if(l<3){for(;e0;){const i=c.pop(),o=c.pop();let a=0;const l=t[o],d=t[o+1],p=t[i],f=t[i+1];for(let e=o+r;ea&&(u=e,a=s)}a>s&&(h[(u-e)/r]=1,o+r0&&g>p)&&(f<0&&m0&&m>f)?(l=i,h=d):(s[a++]=l,s[a++]=h,c=l,u=h,l=i,h=d)}return s[a++]=l,s[a++]=h,a}function l(t,e,i,n,r,s,o,l){for(let h=0,c=i.length;h{"use strict";function n(t,e,i,n,r,s){s=s||[];let o=0;for(let a=e;ao,U1:()=>r,bA:()=>s,vT:()=>n})},177:(t,e,i)=>{"use strict";i.d(e,{G$:()=>s,Id:()=>l,MP:()=>a,Tp:()=>h,V:()=>r,bM:()=>c,tK:()=>o});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",r=n.includes("firefox"),s=(n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),n.includes("webkit")&&!n.includes("edge")),o=n.includes("macintosh"),a="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,h="undefined"!=typeof Image&&Image.prototype.decode,c=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},947:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(2971),r=i(1912),s=i(4187),o=i(9515),a=i(3983);class l extends n.Z{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[r.Z.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.h)("number"==typeof e[r.Z.OPACITY],"Layer opacity must be a number"),e[r.Z.VISIBLE]=void 0===t.visible||t.visible,e[r.Z.Z_INDEX]=t.zIndex,e[r.Z.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[r.Z.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[r.Z.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[r.Z.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,s.O3)()}getLayerStatesArray(t){return(0,s.O3)()}getExtent(){return this.get(r.Z.EXTENT)}getMaxResolution(){return this.get(r.Z.MAX_RESOLUTION)}getMinResolution(){return this.get(r.Z.MIN_RESOLUTION)}getMinZoom(){return this.get(r.Z.MIN_ZOOM)}getMaxZoom(){return this.get(r.Z.MAX_ZOOM)}getOpacity(){return this.get(r.Z.OPACITY)}getSourceState(){return(0,s.O3)()}getVisible(){return this.get(r.Z.VISIBLE)}getZIndex(){return this.get(r.Z.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(r.Z.EXTENT,t)}setMaxResolution(t){this.set(r.Z.MAX_RESOLUTION,t)}setMinResolution(t){this.set(r.Z.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(r.Z.MAX_ZOOM,t)}setMinZoom(t){this.set(r.Z.MIN_ZOOM,t)}setOpacity(t){(0,o.h)("number"==typeof t,"Layer opacity must be a number"),this.set(r.Z.OPACITY,t)}setVisible(t){this.set(r.Z.VISIBLE,t)}setZIndex(t){this.set(r.Z.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},670:(t,e,i)=>{"use strict";i.d(e,{Z:()=>rt});var n=i(1295),r=i(2582),s=i(7389),o=i(283),a=i(1345),l=i(2846),h=i(5393),c=i(8958),u=i(1280),d=i(5537);let p=0;const f=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match"},I={[k.Number]:P(M(1,1/0,v),g),[k.String]:P(M(1,1/0,v),m),[k.Get]:P((function(t,e){if(2!==t.length)throw new Error("Expected 1 argument for get operation");const i=R(t[1],e);if(!(i instanceof E))throw new Error("Expected a literal argument for get operation");if("string"!=typeof i.value)throw new Error("Expected a string argument for get operation");return e.properties.add(i.value),[i]}),v),[k.Var]:P((function(t,e){if(2!==t.length)throw new Error("Expected 1 argument for var operation");const i=R(t[1],e);if(!(i instanceof E))throw new Error("Expected a literal argument for var operation");if("string"!=typeof i.value)throw new Error("Expected a string argument for get operation");return e.variables.add(i.value),[i]}),v),[k.Resolution]:P((function(t,e){const i=t[0];if(1!==t.length)throw new Error(`Expected no arguments for ${i} operation`);return[]}),g),[k.Any]:P(M(2,1/0,f),f),[k.All]:P(M(2,1/0,f),f),[k.Not]:P(M(1,1,f),f),[k.Equal]:P(M(2,2,v),f),[k.NotEqual]:P(M(2,2,v),f),[k.GreaterThan]:P(M(2,2,v),f),[k.GreaterThanOrEqualTo]:P(M(2,2,v),f),[k.LessThan]:P(M(2,2,v),f),[k.LessThanOrEqualTo]:P(M(2,2,v),f),[k.Multiply]:P(M(2,1/0,g),g),[k.Divide]:P(M(2,2,g),g),[k.Add]:P(M(2,1/0,g),g),[k.Subtract]:P(M(2,2,g),g),[k.Clamp]:P(M(3,3,g),g),[k.Mod]:P(M(2,2,g),g),[k.Pow]:P(M(2,2,g),g),[k.Abs]:P(M(1,1,g),g),[k.Floor]:P(M(1,1,g),g),[k.Ceil]:P(M(1,1,g),g),[k.Round]:P(M(1,1,g),g),[k.Sin]:P(M(1,1,g),g),[k.Cos]:P(M(1,1,g),g),[k.Atan]:P(M(1,2,g),g),[k.Sqrt]:P(M(1,1,g),g),[k.Match]:P(M(4,1/0,m|g),v)};function M(t,e,i){return function(n,r){const s=n[0],o=n.length-1;if(t===e){if(o!==t)throw new Error(`Expected ${t} argument${1===t?"":"s"} for operation ${s}, got ${o}`)}else if(oe)throw new Error(`Expected ${t} to ${e} arguments for operation ${s}, got ${o}`);const a=new Array(o);for(let t=0;t{for(let e=0;et.properties[n];case k.Var:return t=>t.variables[n];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case k.Resolution:return t=>t.resolution;case k.Any:case k.All:case k.Not:return function(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e!r[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case k.Equal:case k.NotEqual:case k.LessThan:case k.LessThanOrEqualTo:case k.GreaterThan:case k.GreaterThanOrEqualTo:return function(t,e){const i=t.operator,n=A(t.args[0],e),r=A(t.args[1],e);switch(i){case k.Equal:return t=>n(t)===r(t);case k.NotEqual:return t=>n(t)!==r(t);case k.LessThan:return t=>n(t)n(t)<=r(t);case k.GreaterThan:return t=>n(t)>r(t);case k.GreaterThanOrEqualTo:return t=>n(t)>=r(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case k.Multiply:case k.Divide:case k.Add:case k.Subtract:case k.Clamp:case k.Mod:case k.Pow:case k.Abs:case k.Floor:case k.Ceil:case k.Round:case k.Sin:case k.Cos:case k.Atan:case k.Sqrt:return function(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let i=0;i{let e=1;for(let i=0;ir[0](t)/r[1](t);case k.Add:return t=>{let e=0;for(let i=0;ir[0](t)-r[1](t);case k.Clamp:return t=>{const e=r[0](t),i=r[1](t);if(en?n:e};case k.Mod:return t=>r[0](t)%r[1](t);case k.Pow:return t=>Math.pow(r[0](t),r[1](t));case k.Abs:return t=>Math.abs(r[0](t));case k.Floor:return t=>Math.floor(r[0](t));case k.Ceil:return t=>Math.ceil(r[0](t));case k.Round:return t=>Math.round(r[0](t));case k.Sin:return t=>Math.sin(r[0](t));case k.Cos:return t=>Math.cos(r[0](t));case k.Atan:return 2===n?t=>Math.atan2(r[0](t),r[1](t)):t=>Math.atan(r[0](t));case k.Sqrt:return t=>Math.sqrt(r[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case k.Match:return function(t,e){const i=t.args.length,n=new Array(i);for(let r=0;r{const e=n[0](t);for(let r=1;r4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}const it="renderOrder";class nt extends n.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(it)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new r(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(it,t)}setStyle(t){this.style_=function(t){if(void 0===t)return s.yF;if(!t)return null;if("function"==typeof t)return t;if(t instanceof s.ZP)return t;if(!Array.isArray(t))return j([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof s.ZP){const i=new Array(e);for(let n=0;n{"use strict";i.d(e,{V:()=>f,Z:()=>y});var n=i(947),r=i(8714),s=i(2071),o=i(291),a=i(5487),l=i(5990),h=i(9515),c=i(9374),u=i(8641),d=i(4187),p=i(5818);class f extends o.ZP{constructor(t,e){super(t),this.layer=e}}const g="layers";class m extends n.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(g,this.handleLayersChanged_),i?Array.isArray(i)?i=new r.Z(i.slice(),{unique:!0}):(0,h.h)("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new r.Z(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(p.bN),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,p.oL)(t,s.Z.ADD,this.handleLayersAdd_,this),(0,p.oL)(t,s.Z.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(p.bN);(0,c.Z)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{"use strict";i.d(e,{Z:()=>p,j:()=>d});var n=i(947),r=i(5487),s=i(1912),o=i(8771),a=i(9090),l=i(9515),h=i(8641),c=i(5818);class u extends n.Z{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(s.Z.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(s.Z.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.oL)(t,r.Z.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.ZP?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const r=this.getExtent();return d(n,e.viewState)&&(!r||(0,h.kK)(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof a.ZP?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(s.Z.MAP,t)}getMapInternal(){return this.get(s.Z.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.oL)(t,o.Z.PRECOMPOSE,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.h)(!e.some((function(t){return t.layer===i.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}),this),this.mapRenderKey_=(0,c.oL)(this,r.Z.CHANGE,t.render,t),this.changed())}setSource(t){this.set(s.Z.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const p=u},1912:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},8280:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},6333:(t,e,i)=>{"use strict";i.d(e,{Z:()=>b});var n=i(670),r=i(1391),s=i(8015),o=i(418),a=i(8771),l=i(7755),h=i(9289),c=i(6101),u=i(8641),d=i(8326),p=i(6234),f=i(5537),g=i(8661),m=i(4187),y=i(1900);class _ extends s.Z{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,u.lJ)(),this.wrappedRenderedExtent_=(0,u.lJ)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,r=e.viewState,s=r.center,o=r.resolution,a=r.projection,h=r.rotation,c=a.getExtent(),d=this.getLayer().getSource(),p=e.pixelRatio,f=e.viewHints,g=!(f[l.Z.ANIMATING]||f[l.Z.INTERACTING]),m=this.compositionContext_,y=Math.round(e.size[0]*p),_=Math.round(e.size[1]*p),v=d.getWrapX()&&a.canWrapX(),x=v?(0,u.dz)(c):null,b=v?Math.ceil((n[2]-c[2])/x)+1:1;let w=v?Math.floor((n[0]-c[0])/x):0;do{const e=this.getRenderTransform(s,o,h,p,y,_,w*x);t.execute(m,1,e,h,g,void 0,i)}while(++w{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];(0,c.nn)(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,r=this.renderedProjection_,s=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*h.UN,d=t[1]*h.UN;a.push(this.getRenderTransform(e,i,n,h.UN,l,d,0).slice());const p=o.getSource(),f=r.getExtent();if(p.getWrapX()&&r.canWrapX()&&!(0,u.r4)(f,s)){let t=s[0];const r=(0,u.dz)(f);let o,c=0;for(;tf[2];)++c,o=r*c,a.push(this.getRenderTransform(e,i,n,h.UN,l,d,o).slice()),t-=r}this.hitDetectionImageData_=(0,h.TU)(t,a,this.renderedFeatures_,o.getStyleFunction(),s,i,n)}e((0,h.ix)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const s=(0,m.sq)(t),o=l[s];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,s,o,i,h,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[l.Z.ANIMATING],s=t.viewHints[l.Z.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&n||!h&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=t.extent,d=t.viewState,m=d.projection,_=d.resolution,v=t.pixelRatio,x=e.getRevision(),b=e.getRenderBuffer();let w=e.getRenderOrder();void 0===w&&(w=p.eR);const C=d.center.slice(),E=(0,u.f3)(c,b*_),T=E.slice(),S=[E.slice()],R=m.getExtent();if(i.getWrapX()&&m.canWrapX()&&!(0,u.r4)(R,t.extent)){const t=(0,u.dz)(R),e=Math.max((0,u.dz)(E)/2,t);E[0]=R[0]-e,E[2]=R[2]+e,(0,y.Cf)(C,m);const i=(0,u.Cf)(S[0],m);i[0]R[0]&&i[2]>R[2]&&S.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==_&&this.renderedRevision_==x&&this.renderedRenderOrder_==w&&(0,u.r4)(this.wrappedRenderedExtent_,E))return(0,f.fS)(this.renderedExtent_,T)||(this.hitDetectionImageData_=null,this.renderedExtent_=T),this.renderedCenter_=C,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new r.Z((0,p.Qz)(_,v),E,_,v);let I;this.getLayer().getDeclutter()&&(I=new r.Z((0,p.Qz)(_,v),E,_,v));const M=(0,g.Cs)();let P;if(M){for(let t=0,e=S.length;t{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,_)),i){const e=this.renderFeature(t,L,i,k,P,I);A=A&&!e}},F=(0,g.Fj)(E,m),j=i.getFeaturesInExtent(F);w&&j.sort(w);for(let t=0,e=j.length;t{"use strict";i.d(e,{Z:()=>C});var n=i(670),r=i(1391),s=i(418),o=i(8845),a=i(7195),l=i(7755),h=i(9289),c=i(6101),u=i(8641),d=i(6234),p=i(4187),f=i(4307),g=i(1900);const m={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},y={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class _ extends o.Z{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=(0,c.Ue)()}prepareTile(t,e,i){let n;const r=t.getState();return r!==a.Z.LOADED&&r!==a.Z.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState,o=s.resolution,a=s.projection,h=this.getLayer(),c=h.getSource().getTile(t,e,i,r,a),u=n.viewHints,d=!(u[l.Z.ANIMATING]||u[l.Z.INTERACTING]);return!d&&c.wantedResolution||(c.wantedResolution=o),this.prepareTile(c,r,a)&&(d||Date.now()-n.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(c,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?(0,p.sq)(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),o=n.getRevision(),l=n.getRenderOrder()||null,h=t.wantedResolution,c=t.getReplayState(n);if(!c.dirty&&c.renderedResolution===h&&c.renderedRevision==o&&c.renderedRenderOrder==l)return;const f=n.getSource(),g=n.getDeclutter(),m=f.getTileGrid(),y=f.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),_=f.getSourceTiles(e,i,t),v=(0,p.sq)(n);delete t.hitDetectionImageData[v],t.executorGroups[v]=[],g&&(t.declutterExecutorGroups[v]=[]),c.dirty=!1;for(let i=0,o=_.length;i{const r=n===_?e.declutterTree.all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),r=(0,p.sq)(n),s=n.getSource(),o=this.renderedProjection,l=o.getExtent(),d=this.renderedResolution,m=s.getTileGridForProjection(o),y=(0,c.nn)(this.renderedPixelToCoordinateTransform_,t.slice()),_=m.getTileCoordForCoordAndResolution(y,d);let v;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const x=m.getTileCoordExtent(v.wrappedTileCoord),b=(0,u.rL)(x),w=[(y[0]-b[0])/d,(b[1]-y[1])/d],C=v.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let E=v.hitDetectionImageData[r];if(!E){const t=(0,f.Pq)(m.getTileSize(m.getZForResolution(d,s.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(m.getTileCoordCenter(v.wrappedTileCoord),d,0,h.UN,t[0]*h.UN,t[1]*h.UN,0)];E=(0,h.TU)(t,i,C,n.getStyleFunction(),m.getTileCoordExtent(v.wrappedTileCoord),v.getReplayState(n).renderedResolution,e),v.hitDetectionImageData[r]=E}e((0,h.ix)(w,C,E))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const n=t.viewHints,r=!(n[l.Z.ANIMATING]||n[l.Z.INTERACTING]),s=this.renderedTiles;for(let e=0,i=s.length;e=0;--e)n[e].execute(this.context,1,this.getTileRenderTransform(i,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,r=n.center,s=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),u=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,p=u.getTileCoordExtent(t.wrappedTileCoord),f=u.getTileCoordExtent(d,this.tmpExtent)[0]-p[0];return(0,c.Jp)((0,c.bA)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,s,o,i,l,h,f))}postRender(t,e){const i=e.viewHints,n=!(i[l.Z.ANIMATING]||i[l.Z.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),o=t.globalAlpha;t.globalAlpha=r.getOpacity();const a=y[s],h=e.viewState,c=h.rotation,d=r.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,m=[],_=[];let v=!0;for(let i=g.length-1;i>=0;--i){const s=g[i];v=v&&!s.getReplayState(r).dirty;const o=s.executorGroups[(0,p.sq)(r)].filter((t=>t.hasExecutors(a)));if(0===o.length)continue;const l=this.getTileRenderTransform(s,e),h=s.tileCoord[0];let d=!1;const y=o[0].getClipCoords(l);if(y){for(let e=0,i=m.length;e{"use strict";function n(t,e){return[[-1/0,-1/0,1/0,1/0]]}function r(t,e){return[t]}i.d(e,{$6:()=>n,VW:()=>r}),i(8661)},3983:(t,e,i)=>{"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function r(t,e,i,n,r,o){const a=r-i,l=o-n;if(0!==a||0!==l){const s=((t-i)*a+(e-n)*l)/(a*a+l*l);s>1?(i=r,n=o):s>0&&(i+=a*s,n+=l*s)}return s(t,e,i,n)}function s(t,e,i,n){const r=i-t,s=n-e;return r*r+s*s}function o(t){const e=t.length;for(let i=0;ir&&(r=e,n=s)}if(0===r)return null;const s=t[n];t[n]=t[i],t[i]=s;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let r=n-1;r>=0;r--)t[r][e]-=t[r][n]*i[n]}return i}function a(t){return t*Math.PI/180}function l(t,e){const i=t%e;return i*e<0?i+e:i}function h(t,e,i){return t+i*(e-t)}function c(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function u(t,e){return Math.floor(c(t,e))}function d(t,e){return Math.ceil(c(t,e))}i.d(e,{$W:()=>l,FH:()=>c,GW:()=>u,SV:()=>o,Yr:()=>a,bI:()=>s,mD:()=>d,rU:()=>r,t7:()=>h,uZ:()=>n})},9374:(t,e,i)=>{"use strict";function n(t){for(const e in t)delete t[e]}function r(t){let e;for(e in t)return!1;return!e}i.d(e,{Z:()=>n,x:()=>r})},8661:(t,e,i)=>{"use strict";i.d(e,{Wm:()=>g.W,UQ:()=>A,h_:()=>S,OP:()=>F,mi:()=>O,Vs:()=>W,dY:()=>X,U2:()=>M,_Q:()=>P,Ck:()=>Z,WO:()=>j,Cs:()=>G,lO:()=>q,Fj:()=>U,on:()=>V,vs:()=>D});var n=i(9619);const r=6378137,s=Math.PI*r,o=[-s,-s,s,s],a=[-180,-85,180,85],l=r*Math.log(Math.tan(Math.PI/2));class h extends n.Z{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/r)}})}}const c=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];const u=[-180,-90,180,90],d=6378137*Math.PI/180;class p extends n.Z{constructor(t,e){super({code:t,units:"degrees",extent:u,axisOrientation:e,global:!0,metersPerUnit:d,worldExtent:u})}}const f=[new p("CRS:84"),new p("EPSG:4326","neu"),new p("urn:ogc:def:crs:OGC:1.3:CRS84"),new p("urn:ogc:def:crs:OGC:2:84"),new p("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new p("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new p("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var g=i(8375);let m={},y={};function _(t,e,i){const n=t.getCode(),r=e.getCode();n in y||(y[n]={}),y[n][r]=i}var v=i(8641),x=i(1900),b=i(3983);const w=6371008.8;function C(t,e,i){i=i||w;const n=(0,b.Yr)(t[1]),r=(0,b.Yr)(e[1]),s=(r-n)/2,o=(0,b.Yr)(e[0]-t[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}var E=i(44);let T=!0;function S(t){T=!(void 0===t||t)}function R(t,e){if(void 0!==e)for(let i=0,n=t.length;i=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(T=!1,(0,E.ZK)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function U(t,e){return N?z(t,e,N):t}function X(t,e){return N?z(t,N,e):t}function V(t,e){if(!N)return t;const i=M(e).getUnits(),n=N.getUnits();return i&&n?t*g.W[i]/g.W[n]:t}var Y,B,K;L(c),L(f),Y=c,B=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;ol?i=l:i<-l&&(i=-l),e[o+1]=i}return e},K=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o{"use strict";i.d(e,{Z:()=>r});var n=i(8375);const r=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.W[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8375:(t,e,i)=>{"use strict";i.d(e,{W:()=>n});const n={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},7380:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var n=i(291);class r extends n.ZP{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const s=r},8771:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},5624:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},147:(t,e,i)=>{"use strict";i.d(e,{Df:()=>l,He:()=>d,Kd:()=>k,PH:()=>m,Qx:()=>E,Tx:()=>g,V4:()=>f,X9:()=>u,Zw:()=>I,_f:()=>M,bL:()=>h,mb:()=>c,oB:()=>_,rc:()=>p,ru:()=>y,sG:()=>x,yC:()=>v});var n=i(2971),r=i(177),s=i(9374),o=i(8326),a=i(245);const l="10px sans-serif",h="#000",c="round",u=[],d=0,p="round",f=10,g="#000",m="center",y="middle",_=[0,0,0,0],v=1,x=new n.Z;let b,w=null;const C={},E=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let r,o;function l(r,s,a){let l=!0;for(let h=0;hMath.max(e,R(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],r=[];let s=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){s=Math.max(s,o),r.push(o),o=0,a+=l;continue}const d=e[h+1]||t.font,p=R(d,u);i.push(p),o+=p;const f=T(d);n.push(f),l=Math.max(l,f)}return{width:s,height:a,widths:i,heights:n,lineWidths:r}}function M(t,e,i,n,r,s,o,a,l,h,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t{"use strict";i.d(e,{Z:()=>d});var n=i(5707),r=i(8716),s=i(5624),o=i(6620),a=i(8641),l=i(147),h=i(5537),c=i(9241);class u extends s.Z{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let o=0,l=t.length;oa&&(this.instructions.push([n.ZP.CUSTOM,a,h,t,i,c.Ml]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,h,t,r||i,c.Ml]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([n.ZP.CUSTOM,a,h,t,i]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,h,t,r||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[n.ZP.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.ZP.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let r,s,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.ZP.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.ZP.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!(0,h.fS)(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.ZP.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.d9)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.f3)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=u},1391:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(9557),r=i(5707);class s extends n.Z{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const o=s;var a=i(147);class l extends n.Z{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),a=[r.ZP.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,a.X9,a.He],r.$O);const o=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(o,0,o.length,l),this.hitDetectionInstructions.push(r.Yc),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,a.X9,a.He],r.$O);const o=t.getEnds(),l=t.getFlatCoordinates(),h=t.getStride();let c=0;for(let t=0,e=o.length;t{"use strict";i.d(e,{Z:()=>R});var n=i(5707),r=i(4286),s=i(6101),o=i(8641),a=i(147),l=i(3983),h=i(6442);function c(t,e,i,n,r,s,o,a,c,u,d,p){let f=t[e],g=t[e+1],m=0,y=0,_=0,v=0;function x(){m=f,y=g,f=t[e+=n],g=t[e+1],v+=_,_=Math.sqrt((f-m)*(f-m)+(g-y)*(g-y))}do{x()}while(et[2]}else I=w>R;const M=Math.PI,P=[],L=E+n===e;let A;if(_=0,v=T,f=t[e=E],g=t[e+1],L){x(),A=Math.atan2(g-y,f-m),I&&(A+=A>0?-M:M);const t=(R+w)/2,e=(k+C)/2;return P[0]=[t,e,(S-s)/2,A,r],P}for(let t=0,h=(r=r.replace(/\n/g," ")).length;t0?-M:M),void 0!==A){let t=p-A;if(t+=t>M?-2*M:t<-M?2*M:0,Math.abs(t)>o)return null}A=p;const w=t;let C=0;for(;t0&&t.push("\n",""),t.push(e,""),t}const w=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,s.Ue)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,l=i?this.fillStates[i]:null,h=this.textStates[e],c=this.pixelRatio,u=[h.scale[0]*c,h.scale[1]*c],d=Array.isArray(t),p=h.justify?r.I[h.justify]:x(Array.isArray(t)?t[0]:t,h.textAlign||a.PH),f=n&&o.lineWidth?o.lineWidth:0,g=d?t:t.split("\n").reduce(b,[]),{width:m,height:y,widths:_,heights:v,lineWidths:w}=(0,a.Zw)(h,g),C=m+f,E=[],T=(C+2)*u[0],S=(y+f)*u[1],R={width:T<0?Math.floor(T):Math.ceil(T),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:E};1==u[0]&&1==u[1]||E.push("scale",u),n&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",f),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",l.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const k=.5-p;let I=p*C+k*f;const M=[],P=[];let L,A=0,O=0,F=0,j=0;for(let t=0,e=g.length;tt?t-c:r,S=a+u>e?e-u:a,R=x[3]+T*_[0]+x[1],k=x[0]+S*_[1]+x[2],I=C-x[3],M=E-x[0];let P;return(b||0!==d)&&(f[0]=I,y[0]=I,f[1]=M,g[1]=M,g[0]=I+R,m[0]=g[0],m[1]=M+k,y[1]=m[1]),0!==d?(P=(0,s.qC)((0,s.Ue)(),i,n,1,1,d,-i,-n),(0,s.nn)(P,f),(0,s.nn)(P,g),(0,s.nn)(P,m),(0,s.nn)(P,y),(0,o.T9)(Math.min(f[0],g[0],m[0],y[0]),Math.min(f[1],g[1],m[1],y[1]),Math.max(f[0],g[0],m[0],y[0]),Math.max(f[1],g[1],m[1],y[1]),p)):(0,o.T9)(Math.min(I,I+R),Math.min(M,M+k),Math.max(I,I+R),Math.max(M,M+k),p),v&&(C=Math.round(C),E=Math.round(E)),{drawImageX:C,drawImageY:E,drawImageW:T,drawImageH:S,originX:c,originY:u,declutterBox:{minX:p[0],minY:p[1],maxX:p[2],maxY:p[3],value:w},canvasTransform:P,scale:_}}replayImageOrLabel_(t,e,i,n,r,s,o){const l=!(!s&&!o),h=n.declutterBox,c=t.canvas,u=o?o[2]*n.scale[0]/2:0;return h.minX-u<=c.width/e&&h.maxX+u>=0&&h.minY-u<=c.height/e&&h.maxY+u>=0&&(l&&this.replayTextBackground_(t,f,g,m,y,s,o),(0,a._f)(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=(0,s.nn)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),l=this.strokeStates[i],h=this.pixelRatio,c=x(Array.isArray(t)?t[0]:t,s.textAlign||a.PH),u=r.I[s.textBaseline||a.ru],d=l&&l.lineWidth?l.lineWidth:0;return{label:o,anchorX:c*(o.width/h-2*s.scale[0])+2*(.5-c)*d,anchorY:u*o.height/h+2*(.5-u)*d}}execute_(t,e,i,r,l,p,f,g){let m;this.pixelCoordinates_&&(0,u.fS)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,h.vT)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,s.lk)(this.renderedTransform_,i));let y=0;const v=r.length;let b,w,C,E,T,S,R,k,I,M,P,L,A=0,O=0,F=0,j=null,Z=null;const D=this.coordinateCache_,z=this.viewRotation_,N=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:z},q=this.instructions!=r||this.overlaps?0:200;let W,U,X,V;for(;yq&&(this.fill_(t),O=0),F>q&&(t.stroke(),F=0),O||F||(t.beginPath(),E=NaN,T=NaN),++y;break;case n.ZP.CIRCLE:A=i[1];const r=m[A],s=m[A+1],h=m[A+2]-r,u=m[A+3]-s,v=Math.sqrt(h*h+u*u);t.moveTo(r+v,s),t.arc(r,s,v,0,2*Math.PI,!0),++y;break;case n.ZP.CLOSE_PATH:t.closePath(),++y;break;case n.ZP.CUSTOM:A=i[1],b=i[2];const Y=i[3],B=i[4],K=6==i.length?i[5]:void 0;G.geometry=Y,G.feature=W,y in D||(D[y]=[]);const H=D[y];K?K(m,A,b,2,H):(H[0]=m[A],H[1]=m[A+1],H.length=2),B(H,G),++y;break;case n.ZP.DRAW_IMAGE:A=i[1],b=i[2],k=i[3],w=i[4],C=i[5];let $=i[6];const J=i[7],Q=i[8],tt=i[9],et=i[10];let it=i[11];const nt=i[12];let rt=i[13];const st=i[14],ot=i[15];if(!k&&i.length>=20){I=i[19],M=i[20],P=i[21],L=i[22];const t=this.drawLabelWithPointPlacement_(I,M,P,L);k=t.label,i[3]=k;const e=i[23];w=(t.anchorX-e)*this.pixelRatio,i[4]=w;const n=i[24];C=(t.anchorY-n)*this.pixelRatio,i[5]=C,$=k.height,i[6]=$,rt=k.width,i[13]=rt}let at,lt,ht,ct;i.length>25&&(at=i[25]),i.length>17?(lt=i[16],ht=i[17],ct=i[18]):(lt=a.oB,ht=!1,ct=!1),et&&N?it+=z:et||N||(it-=z);let ut=0;for(;Ai)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const r=[];for(let t=0,e=n.length;t0){if(!a||"Image"!==g&&"Text"!==g||a.includes(t)){const i=(f[s]-3)/4,o=n-i%l,a=n-(i/l|0),h=r(t,e,o*o+a*a);if(h)return h}d.clearRect(0,0,l,l);break}}const y=Object.keys(this.executorsByZIndex_).map(Number);let _,v,x,b,w;for(y.sort(u.j2),_=y.length-1;_>=0;--_){const t=y[_].toString();for(x=this.executorsByZIndex_[t],v=T.length-1;v>=0;--v)if(g=T[v],b=x[g],void 0!==b&&(w=b.executeHitDetection(d,h,i,m,p),w))return w}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return(0,h.vT)(o,0,8,2,t,o),o}isEmpty(){return(0,E.x)(this.executorsByZIndex_)}execute(t,e,i,n,r,s,o){const a=Object.keys(this.executorsByZIndex_).map(Number);let l,h,c,d,p,f;for(a.sort(u.j2),this.maxExtent_&&(t.save(),this.clip(t,i)),s=s||T,o&&a.reverse(),l=0,h=a.length;l{"use strict";i.d(e,{$O:()=>o,Yc:()=>s,ZP:()=>l,gO:()=>r,s3:()=>a});const n={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},r=[n.FILL],s=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},4286:(t,e,i)=>{"use strict";i.d(e,{I:()=>d,Z:()=>f});var n=i(9557),r=i(5707),s=i(6620),o=i(147),a=i(4187),l=i(8641),h=i(3983);function c(t,e,i,n,r){const s=[];let o=i,a=0,l=e.slice(i,2);for(;a=t){const e=(t-a+d)/d,p=(0,h.t7)(i,c,e),f=(0,h.t7)(n,u,e);l.push(p,f),s.push(l),l=[p,f],a==t&&(o+=r),a=0}else if(a0&&s.push(l),s}function u(t,e,i,n,r){let s,o,a,l,h,c,u,d,p,f,g=i,m=i,y=0,_=0,v=i;for(o=i;ot&&(_>y&&(y=_,g=v,m=o),_=0,v=o-r)),a=l,u=p,d=f),h=i,c=n}return _+=l,_>y?[v,o]:[g,m]}const d={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class p extends n.Z{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.bL]={fillStyle:o.bL},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const a=this.coordinates;let h=a.length;const d=t.getType();let p=null,f=t.getStride();if("line"!==s.placement||"LineString"!=d&&"MultiLineString"!=d&&"Polygon"!=d&&"MultiPolygon"!=d){let i=s.overflow?null:[];switch(d){case"Point":case"MultiPoint":p=t.getFlatCoordinates();break;case"LineString":p=t.getFlatMidpoint();break;case"Circle":p=t.getCenter();break;case"MultiLineString":p=t.getFlatMidpoints(),f=2;break;case"Polygon":p=t.getFlatInteriorPoint(),s.overflow||i.push(p[2]/this.resolution),f=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();p=[];for(let t=0,n=e.length;t{const n=a[2*(t+i)]===p[i*f]&&a[2*(t+i)+1]===p[i*f+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let l=s.padding;if(l!=o.oB&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const c=this.pixelRatio;this.instructions.push([r.ZP.DRAW_IMAGE,h,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,l==o.oB?o.oB:l.map((function(t){return t*c})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const u=1/c,g=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=o.bL,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,h,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,void 0,this.declutterImageWithText_,l,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.bL:this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),s.backgroundFill&&(this.state.fillStyle=g,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.kK)(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(p=t.getFlatCoordinates(),"LineString"==d)i=[p.length];else if("MultiLineString"==d)i=t.getEnds();else if("Polygon"==d)i=t.getEnds().slice(0,1);else if("MultiPolygon"==d){const e=t.getEndss();i=[];for(let t=0,n=e.length;t{"use strict";i.d(e,{UN:()=>m,TU:()=>y,ix:()=>_});var n=i(5624),r=i(6620),s=i(6101),o=i(147),a=i(5537),l=i(8641),h=i(3983),c=i(6442),u=i(2967);class d extends n.Z{constructor(t,e,i,n,r,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.FH)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,s.Ue)()}drawImages_(t,e,i,n){if(!this.image_)return;const r=(0,c.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=r.length;tt*this.pixelRatio_)),lineDashOffset:(s||o.He)*this.pixelRatio_,lineJoin:void 0!==a?a:o.rc,lineWidth:(void 0!==l?l:o.yC)*this.pixelRatio_,miterLimit:void 0!==h?h:o.V4,strokeStyle:(0,r.y)(t||o.Tx)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/i,s[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,r.y)(t||o.bL)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o.mb,lineDash:n||o.X9,lineDashOffset:s||o.He,lineJoin:void 0!==a?a:o.rc,lineWidth:void 0!==l?l:o.yC,miterLimit:void 0!==h?h:o.V4,strokeStyle:(0,r.y)(t||o.Tx)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),c=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),p=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.Df,textAlign:void 0!==d?d:o.PH,textBaseline:void 0!==p?p:o.ru},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((t,e,i)=>t+(i%2?" ":e)),""):u:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}else this.text_=""}}const p=d;var f=i(2846),g=i(8326);const m=.5;function y(t,e,i,n,r,s,o){const h=t[0]*m,c=t[1]*m,u=(0,g.E4)(h,c);u.imageSmoothingEnabled=!1;const d=u.canvas,y=new p(u,m,r,null,o),_=i.length,v=Math.floor(16777215/_),x={};for(let t=1;t<=_;++t){const e=i[t-1],o=e.getStyleFunction()||n;if(!o)continue;let a=o(e,s);if(!a)continue;Array.isArray(a)||(a=[a]);const h=(t*v).toString(16).padStart(7,"#00000");for(let t=0,i=a.length;t{"use strict";i.d(e,{r:()=>m,Z:()=>_});var n=i(5487),r=i(553),s=i(2706),o=i(4187);class a extends s.Z{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return(0,o.O3)()}getData(t){return null}prepareFrame(t){return(0,o.O3)()}renderFrame(t,e){return(0,o.O3)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,r)=>{const s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}}forEachFeatureAtCoordinate(t,e,i,n,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==r.Z.LOADED&&e.getState()!==r.Z.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=r.Z.LOADED&&e!=r.Z.ERROR&&t.addEventListener(n.Z.CHANGE,this.boundHandleImageChange_),e==r.Z.IDLE&&(t.load(),e=t.getState()),e==r.Z.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a;var h=i(7380),c=i(8771),u=i(6101),d=i(9706),p=i(8326),f=i(5537),g=i(8641);const m=[];let y=null;const _=class extends l{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,u.Ue)(),this.pixelTransform=(0,u.Ue)(),this.inversePixelTransform=(0,u.Ue)(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;y||(y=(0,p.E4)(1,1,void 0,{willReadFrequently:!0})),y.clearRect(0,0,1,1);try{y.drawImage(t,e,i,1,1,0,0,1,1),n=y.getImageData(0,0,1,1).data}catch(t){return y=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let r,s;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,f.fS)((0,d._2)(t.style.backgroundColor),(0,d._2)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(s=e.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=n;let t=r.style;t.position="absolute",t.width="100%",t.height="100%",s=(0,p.E4)();const e=s.canvas;r.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=r,this.context=s}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,g.rL)(i),r=(0,g.Xv)(i),s=(0,g.w$)(i),o=(0,g.hC)(i);(0,u.nn)(e.coordinateToPixelTransform,n),(0,u.nn)(e.coordinateToPixelTransform,r),(0,u.nn)(e.coordinateToPixelTransform,s),(0,u.nn)(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;(0,u.nn)(a,n),(0,u.nn)(a,r),(0,u.nn)(a,s),(0,u.nn)(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new h.Z(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(c.Z.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(c.Z.POSTRENDER,t,e)}getRenderTransform(t,e,i,n,r,s,o){const a=r/2,l=s/2,h=n/e,c=-h,d=-t[0]+o,p=-t[1];return(0,u.qC)(this.tempTransform,a,l,h,c,-i,d,p)}disposeInternal(){delete this.frameState,super.disposeInternal()}}},8845:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(8015),r=i(825),s=i(9494),o=i(2519),a=i(7195),l=i(6101),h=i(5537),c=i(8641),u=i(8661),d=i(4187),p=i(4307);class f extends n.Z{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,c.lJ)(),this.tmpTileRange_=new o.Z(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==a.Z.LOADED||i==a.Z.EMPTY||i==a.Z.ERROR&&!n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,i,r,s);return l.getState()==a.Z.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.nn)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,c.b8)(o,n))return null;const h=e.pixelRatio,u=e.viewState.projection,d=e.viewState,f=i.getRenderSource(),g=f.getTileGridForProjection(d.projection),m=f.getTilePixelRatio(e.pixelRatio);for(let t=g.getZForResolution(d.resolution);t>=g.getMinZoom();--t){const e=g.getTileCoordForCoordAndZ(n,t),i=f.getTile(t,e[1],e[2],h,u);if(!(i instanceof r.Z||i instanceof s.Z)||i instanceof s.Z&&i.getState()===a.Z.EMPTY)return null;if(i.getState()!==a.Z.LOADED)continue;const o=g.getOrigin(t),l=(0,p.Pq)(g.getTileSize(t)),c=g.getResolution(t),y=Math.floor(m*((n[0]-o[0])/c-e[1]*l[0])),_=Math.floor(m*((o[1]-n[1])/c-e[2]*l[1])),v=Math.round(m*f.getGutterForProjection(d.projection));return this.getImageData(i.getImage(),y+v,_+v)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,p=n.rotation,f=t.pixelRatio,g=this.getLayer(),m=g.getSource(),y=m.getRevision(),_=m.getTileGridForProjection(r),v=_.getZForResolution(s,m.zDirection),x=_.getResolution(v);let b=t.extent;const w=t.viewState.resolution,C=m.getTilePixelRatio(f),E=Math.round((0,c.dz)(b)/w*f),T=Math.round((0,c.Cr)(b)/w*f),S=i.extent&&(0,u.dY)(i.extent,r);S&&(b=(0,c.Ed)(b,(0,u.dY)(i.extent,r)));const R=x*E/2/C,k=x*T/2/C,I=[o[0]-R,o[1]-k,o[0]+R,o[1]+k],M=_.getTileRangeForExtentAndZ(b,v),P={};P[v]={};const L=this.createLoadedTileFinder(m,r,P),A=this.tmpExtent,O=this.tmpTileRange_;this.newTiles_=!1;const F=p?(0,c.dY)(n.center,w,p,t.size):void 0;for(let e=M.minX;e<=M.maxX;++e)for(let n=M.minY;n<=M.maxY;++n){if(p&&!_.tileCoordIntersectsViewport([v,e,n],F))continue;const r=this.getTile(v,e,n,t);if(this.isDrawableTile(r)){const e=(0,d.sq)(this);if(r.getState()==a.Z.LOADED){P[v][r.tileCoord.toString()]=r;let t=r.inTransition(e);t&&1!==i.opacity&&(r.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(r)||(this.newTiles_=!0)}if(1===r.getAlpha(e,t.time))continue}const s=_.getTileCoordChildTileRange(r.tileCoord,O,A);let o=!1;s&&(o=L(v+1,s)),o||_.forEachTileCoordParentTileRange(r.tileCoord,L,O,A)}const j=x/s*f/C;(0,l.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/f,1/f,p,-E/2,-T/2);const Z=(0,l.BB)(this.pixelTransform);this.useContainer(e,Z,this.getBackground(t));const D=this.context,z=D.canvas;(0,l.nb)(this.inversePixelTransform,this.pixelTransform),(0,l.qC)(this.tempTransform,E/2,T/2,j,j,0,-E/2,-T/2),z.width!=E||z.height!=T?(z.width=E,z.height=T):this.containerReused||D.clearRect(0,0,E,T),S&&this.clipUnrotated(D,t,S),m.getInterpolate()||(D.imageSmoothingEnabled=!1),this.preRender(D,t),this.renderedTiles.length=0;let N,G,q,W=Object.keys(P).map(Number);W.sort(h.j2),1!==i.opacity||this.containerReused&&!m.getOpaque(t.viewState.projection)?(N=[],G=[]):W=W.reverse();for(let e=W.length-1;e>=0;--e){const i=W[e],n=m.getTilePixelSize(i,f,r),s=_.getResolution(i)/x,o=n[0]*s*j,a=n[1]*s*j,h=_.getTileCoordForCoordAndZ((0,c.rL)(I),i),u=_.getTileCoordExtent(h),p=(0,l.nn)(this.tempTransform,[C*(u[0]-I[0])/x,C*(I[3]-u[3])/x]),g=C*m.getGutterForProjection(r),y=P[i];for(const e in y){const n=y[e],r=n.tileCoord,s=h[1]-r[1],l=Math.round(p[0]-(s-1)*o),u=h[2]-r[2],f=Math.round(p[1]-(u-1)*a),_=Math.round(p[0]-s*o),x=Math.round(p[1]-u*a),b=l-_,w=f-x,C=v===i,E=C&&1!==n.getAlpha((0,d.sq)(this),t.time);let T=!1;if(!E)if(N){q=[_,x,_+b,x,_+b,x+w,_,x+w];for(let t=0,e=N.length;t{"use strict";i.d(e,{Pn:()=>c,Qz:()=>h,eR:()=>a,se:()=>l});var n=i(553),r=i(4187);const s=.5,o={Point:function(t,e,i,r,s){const o=i.getImage(),a=i.getText();let l;if(o){if(o.getImageState()!=n.Z.LOADED)return;let h=t;if(s){const n=o.getDeclutterMode();if("none"!==n)if(h=s,"obstacle"===n){const n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(o,l),n.drawPoint(e,r)}else a&&a.getText()&&(l={})}const c=h.getBuilder(i.getZIndex(),"Image");c.setImageStyle(o,l),c.drawPoint(e,r)}if(a&&a.getText()){let n=t;s&&(n=s);const o=n.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a,l),o.drawText(e,r)}},LineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},Polygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(s||o){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},MultiPoint:function(t,e,i,r,s){const o=i.getImage(),a=i.getText();let l;if(o){if(o.getImageState()!=n.Z.LOADED)return;let h=t;if(s){const n=o.getDeclutterMode();if("none"!==n)if(h=s,"obstacle"===n){const n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(o,l),n.drawMultiPoint(e,r)}else a&&a.getText()&&(l={})}const c=h.getBuilder(i.getZIndex(),"Image");c.setImageStyle(o,l),c.drawMultiPoint(e,r)}if(a&&a.getText()){let n=t;s&&(n=s);const o=n.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a,l),o.drawText(e,r)}},MultiLineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(o||s){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){const s=e.getGeometriesArray();let a,l;for(a=0,l=s.length;a{"use strict";i.d(e,{Co:()=>d,aA:()=>u,rX:()=>l,sY:()=>p});var n=i(8641),r=i(8326),s=i(8661),o=i(3983);let a;const l=[];function h(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function c(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function u(t,e,i,r){const o=(0,s.vs)(i,e,t);let a=(0,s._Q)(e,r,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const c=t.getExtent();if(!c||(0,n.b8)(c,o)){const e=(0,s._Q)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,r){const s=(0,n.qg)(i);let o=u(t,e,s,r);return(!isFinite(o)||o<=0)&&(0,n.H6)(i,(function(i){return o=u(t,e,i,r),isFinite(o)&&o>0})),o}function p(t,e,i,s,u,d,p,f,g,m,y,_){const v=(0,r.E4)(Math.round(i*t),Math.round(i*e),l);if(_||(v.imageSmoothingEnabled=!1),0===g.length)return v.canvas;function x(t){return Math.round(t*i)/i}v.scale(i,i),v.globalCompositeOperation="lighter";const b=(0,n.lJ)();g.forEach((function(t,e,i){(0,n.l7)(b,t.extent)}));const w=(0,n.dz)(b),C=(0,n.Cr)(b),E=(0,r.E4)(Math.round(i*w/s),Math.round(i*C/s),l);_||(E.imageSmoothingEnabled=!1);const T=i/s;g.forEach((function(t,e,i){const r=t.extent[0]-b[0],s=-(t.extent[3]-b[3]),o=(0,n.dz)(t.extent),a=(0,n.Cr)(t.extent);t.image.width>0&&t.image.height>0&&E.drawImage(t.image,m,m,t.image.width-2*m,t.image.height-2*m,r*T,s*T,o*T,a*T)}));const S=(0,n.rL)(p);return f.getTriangles().forEach((function(t,e,n){const u=t.source,p=t.target;let f=u[0][0],g=u[0][1],m=u[1][0],y=u[1][1],w=u[2][0],C=u[2][1];const T=x((p[0][0]-S[0])/d),R=x(-(p[0][1]-S[1])/d),k=x((p[1][0]-S[0])/d),I=x(-(p[1][1]-S[1])/d),M=x((p[2][0]-S[0])/d),P=x(-(p[2][1]-S[1])/d),L=f,A=g;f=0,g=0,m-=L,y-=A,w-=L,C-=A;const O=[[m,y,0,0,k-T],[w,C,0,0,M-T],[0,0,m,y,I-R],[0,0,w,C,P-R]],F=(0,o.SV)(O);if(F){if(v.save(),v.beginPath(),function(){if(void 0===a){const t=(0,r.E4)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=c(e,0)||c(e,4)||c(e,8),(0,r.jy)(t),l.push(t.canvas)}return a}()||!_){v.moveTo(k,I);const t=4,e=T-k,i=R-I;for(let n=0;n{"use strict";i.d(e,{Z:()=>f});var n=i(4773),r=i(5487),s=i(4806),o=i(7195),a=i(5476),l=i(7161),h=i(3983),c=i(8641),u=i(5818),d=i(8326);class p extends s.Z{constructor(t,e,i,r,s,u,d,p,f,g,m,y){super(s,o.Z.IDLE,{interpolate:!!y}),this.renderEdges_=void 0!==m&&m,this.pixelRatio_=d,this.gutter_=p,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=u||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const _=r.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let x=this.sourceTileGrid_.getExtent();const b=v?(0,c.Ed)(_,v):_;if(0===(0,c.bg)(b))return void(this.state=o.Z.EMPTY);const w=t.getExtent();w&&(x=x?(0,c.Ed)(x,w):w);const C=r.getResolution(this.wrappedTileCoord_[0]),E=(0,l.Co)(t,i,b,C);if(!isFinite(E)||E<=0)return void(this.state=o.Z.EMPTY);const T=void 0!==g?g:n.m;if(this.triangulation_=new a.Z(t,i,b,x,E*T,C),0===this.triangulation_.getTriangles().length)return void(this.state=o.Z.EMPTY);this.sourceZ_=e.getZForResolution(E);let S=this.triangulation_.calculateSourceExtent();if(x&&(t.canWrapX()?(S[1]=(0,h.uZ)(S[1],x[1],x[3]),S[3]=(0,h.uZ)(S[3],x[1],x[3])):S=(0,c.Ed)(S,x)),(0,c.bg)(S)){const t=e.getTileRangeForExtentAndZ(S,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=f(this.sourceZ_,e,i,d);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=o.Z.EMPTY)}else this.state=o.Z.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&e.getState()==o.Z.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=o.Z.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.sY)(n,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.Z.LOADED}this.changed()}load(){if(this.state==o.Z.IDLE){this.state=o.Z.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(i==o.Z.IDLE||i==o.Z.LOADING){t++;const i=(0,u.oL)(e,r.Z.CHANGE,(function(n){const r=e.getState();r!=o.Z.LOADED&&r!=o.Z.ERROR&&r!=o.Z.EMPTY||((0,u.bN)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==o.Z.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(u.bN),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.jy)(this.canvas_.getContext("2d")),l.rX.push(this.canvas_),this.canvas_=null),super.release()}}const f=p},5476:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(8641),r=i(8661),s=i(3983);const o=class{constructor(t,e,i,s,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,r.Ck)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=s,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&(0,n.dz)(s)>=(0,n.dz)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.dz)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.dz)(this.targetProj_.getExtent()):null;const c=(0,n.rL)(i),u=(0,n.Xv)(i),d=(0,n.w$)(i),p=(0,n.hC)(i),f=this.transformInv_(c),g=this.transformInv_(u),m=this.transformInv_(d),y=this.transformInv_(p),_=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.bg)(i)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,p,f,g,m,y,_),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&d<1;let g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const s=(0,n.hI)([t,e,i,r]);g=(0,n.dz)(s)/this.targetWorldWidth_>.25||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>.25||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,n.kK)(u,this.maxSourceExtent_))return;let m=0;if(!(g||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(c>0)g=!0;else if(m=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=m&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;r=f?((0,s.$W)(o[0],p)+(0,s.$W)(l[0],p))/2-(0,s.$W)(n[0],p):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];g=r*r+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],s=this.transformInv_(n),u=[(r[0]+t[0])/2,(r[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,n,u,o,a,s,d,c-1),this.addQuad_(u,n,i,r,d,s,l,h,c-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],s=this.transformInv_(n),u=[(i[0]+r[0])/2,(i[1]+r[1])/2],d=this.transformInv_(u);this.addQuad_(t,n,u,r,o,s,d,h,c-1),this.addQuad_(n,e,i,u,s,a,l,d,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,i,r,o,l,h),0==(14&m)&&this.addTriangle_(t,i,e,o,l,a),m&&(0==(13&m)&&this.addTriangle_(e,r,t,a,h,o),0==(7&m)&&this.addTriangle_(e,r,i,a,h,l))}calculateSourceExtent(){const t=(0,n.lJ)();return this.triangles_.forEach((function(e,i,r){const s=e.source;(0,n.Wj)(t,s[0]),(0,n.Wj)(t,s[1]),(0,n.Wj)(t,s[2])})),t}getTriangles(){return this.triangles_}}},4773:(t,e,i)=>{"use strict";i.d(e,{m:()=>n});const n=.5},828:(t,e,i)=>{"use strict";i.d(e,{Gw:()=>a,YP:()=>s,gE:()=>o,h$:()=>r});var n=i(3983);function r(t){if(void 0!==t)return 0}function s(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){return t=t||(0,n.Yr)(5),function(e,i){return i?e:void 0!==e?Math.abs(e)<=t?0:e:void 0}}},4307:(t,e,i)=>{"use strict";function n(t){return t[0]>0&&t[1]>0}function r(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function s(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Pq:()=>s,bA:()=>r,py:()=>n})},8458:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(2971),r=i(8661);class s extends n.Z{constructor(t){super(),this.projection=(0,r.U2)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=s},3107:(t,e,i)=>{"use strict";i.d(e,{Z:()=>E});var n=i(8714),r=i(2071),s=i(291),o=i(5487),a=i(5990),l=i(2582),h=i(8641),c=i(4187),u=i(9374);const d=class{constructor(t){this.rbush_=new l(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,c.sq)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,r=e.length;n{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(r.Z.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(x.bN);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new w("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,u.x)(this.nullGeometryFeatures_)||(0,v.l7)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,h.MV)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let r=null;const s=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||m.uX,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e.closestPointXY(i,n,s,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new w("featuresloadend",void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new w("featuresloaderror"))})),n.insert(s,{extent:s.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,h.fS)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=(0,c.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=(0,c.sq)(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(x.bN),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new w(g,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){(0,_.h)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader((0,b.Be)(t,this.format_))}}const E=C},283:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var n=i(5393);class r extends n.Z{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new r({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const s=r},1345:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const r=n},2846:(t,e,i)=>{"use strict";i.d(e,{Z:()=>y});var n=i(5487),r=i(553),s=i(8443),o=i(9706),a=i(9515),l=i(208),h=i(8326),c=i(8096),u=i(2710);let d=null;class p extends l.Z{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?r.Z.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===r.Z.LOADED){d||(d=(0,h.E4)(1,1,void 0,{willReadFrequently:!0})),d.drawImage(this.image_,0,0);try{d.getImageData(0,0,1,1),this.tainted_=!1}catch(t){d=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(n.Z.CHANGE)}handleImageError_(){this.imageState_=r.Z.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=r.Z.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,h.E4)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===r.Z.IDLE){this.image_||this.initializeImage_(),this.imageState_=r.Z.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,c.Q9)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==r.Z.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.XC)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}}var f=i(4187);function g(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class m extends s.Z{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const l=void 0!==t.img?t.img:null;let h,c=t.src;if((0,a.h)(!(void 0!==c&&l),"`image` and `src` cannot be provided at the same time"),void 0!==c&&0!==c.length||!l||(c=l.src||(0,f.sq)(l)),(0,a.h)(void 0!==c&&c.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,a.h)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?h=r.Z.IDLE:void 0!==l&&(h=l instanceof HTMLImageElement?l.complete?l.src?r.Z.LOADED:r.Z.IDLE:r.Z.LOADING:r.Z.LOADED),this.color_=void 0!==t.color?(0,o._2)(t.color):null,this.iconImage_=function(t,e,i,n,r){let s=void 0===e?void 0:u.c.get(e,i,r);return s||(s=new p(t,t instanceof HTMLImageElement?t.src||void 0:e,i,n,r),u.c.set(e,i,r,s)),s}(l,c,this.crossOrigin_,h,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(g(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(g(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new m({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==r.Z.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==r.Z.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.Z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.Z.CHANGE,t)}}const y=m},2710:(t,e,i)=>{"use strict";i.d(e,{c:()=>s});var n=i(9706);function r(t,e,i){return e+":"+t+":"+(i?(0,n.XC)(i):"null")}const s=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=r(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=r(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},8443:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(4187),r=i(4307);class s{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,r.Pq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new s({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.O3)()}getImage(t){return(0,n.O3)()}getHitDetectionImage(){return(0,n.O3)()}getPixelRatio(t){return 1}getImageState(){return(0,n.O3)()}getImageSize(){return(0,n.O3)()}getOrigin(){return(0,n.O3)()}getSize(){return(0,n.O3)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,r.Pq)(t)}listenImageChange(t){(0,n.O3)()}load(){(0,n.O3)()}unlistenImageChange(t){(0,n.O3)()}}const o=s},5393:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(553),r=i(8443),s=i(9706),o=i(6620),a=i(8326),l=i(147);class h extends r.Z{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=(0,a.E4)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return n.Z.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n{"use strict";i.d(e,{Z:()=>r});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const r=n},7389:(t,e,i)=>{"use strict";i.d(e,{J$:()=>l,ZP:()=>d,yF:()=>c});var n=i(283),r=i(1345),s=i(8958),o=i(9515);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=u,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=u,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.h)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}let h=null;function c(t,e){if(!h){const t=new r.Z({color:"rgba(255,255,255,0.4)"}),e=new s.Z({color:"#3399CC",width:1.25});h=[new a({image:new n.Z({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function u(t){return t.getGeometry()}const d=a},1280:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(1345),r=i(4307);class s{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,r.Pq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.Z({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new s({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,r.Pq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=s},4768:(t,e,i)=>{"use strict";i.d(e,{S:()=>r,e:()=>n});const n=42,r=256},6101:(t,e,i)=>{"use strict";i.d(e,{BB:()=>_,Iu:()=>f,Jp:()=>l,Ue:()=>o,bA:()=>d,lk:()=>c,mc:()=>a,n3:()=>p,nb:()=>m,nn:()=>u,qC:()=>g});var n=i(177),r=i(9515);const s=new Array(6);function o(){return[1,0,0,1,0,0]}function a(t){return h(t,1,0,0,1,0,0)}function l(t,e){const i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],p=e[5];return t[0]=i*l+r*h,t[1]=n*l+s*h,t[2]=i*c+r*u,t[3]=n*c+s*u,t[4]=i*d+r*p+o,t[5]=n*d+s*p+a,t}function h(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function u(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function d(t,e,i){return l(t,h(s,e,0,0,i,0,0))}function p(t,e,i){return h(t,e,0,0,i,0,0)}function f(t,e,i){return l(t,h(s,1,0,0,1,e,i))}function g(t,e,i,n,r,s,o,a){const l=Math.sin(s),h=Math.cos(s);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=o*n*h-a*n*l+e,t[5]=o*r*l+a*r*h+i,t}function m(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;(0,r.h)(0!==i,"Transformation matrix cannot be inverted");const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=s/i,t[4]=(a*c-l*h)/i,t[5]=-(s*c-o*h)/i,t}let y;function _(t){const e="matrix("+t.join(", ")+")";if(n.Id)return e;const i=y||(y=document.createElement("div"));return i.style.transform=e,i.style.transform}},4187:(t,e,i)=>{"use strict";function n(){throw new Error("Unimplemented abstract method.")}i.d(e,{O3:()=>n,sq:()=>s});let r=0;function s(t){return t.ol_uid||(t.ol_uid=String(++r))}},7539:(t,e,i)=>{"use strict";i.d(e,{nn:()=>$s,h0:()=>Ns,bg:()=>Ds,ZP:()=>$s,LN:()=>Qs,uX:()=>Xn});var n={};i.r(n),i.d(n,{array:()=>ie,color:()=>ee,number:()=>te});var r=i(283),s=i(1345),o=i(2846),a=i(6101),l=i(8641),h=i(5537),c=i(3448),u=i(8661),d=i(9405),p=i(1071),f=i(6442);const g=(0,a.Ue)();class m{constructor(t,e,i,n,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=n}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,l.HK)(this.flatCoordinates_):(0,l.GN)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,l.qg)(this.getExtent());this.flatInteriorPoints_=(0,c.X)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,p.E)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,c.U)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,d.WW)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,r=i.length;n0&&t.stops.length<=2);const n=["case"];for(const t of i)n.push(["==",r,t[0]],t[1]);return n.push(R(t,e)),n}if("categorical"===n){const n=["match",r];for(const t of i)M(n,t[0],t[1],!1);return n.push(R(t,e)),n}if("interval"===n){const e=["step",["number",r]];for(const t of i)M(e,t[0],t[1],!0);return I(e),void 0===t.default?e:["case",["==",["typeof",r],"number"],e,T(t.default)]}if("exponential"===n){const e=void 0!==t.base?t.base:1,n=[S(t),1===e?["linear"]:["exponential",e],["number",r]];for(const t of i)M(n,t[0],t[1],!1);return void 0===t.default?n:["case",["==",["typeof",r],"number"],n,T(t.default)]}throw new Error(`Unknown property function type ${n}`)}function I(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function M(t,e,i,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(i))}function P(t,e){return t.type?t.type:(E(e.expression),e.expression.interpolated?"exponential":"interval")}function L(t){const e=["concat"],i=/{([^{}]+)}/g;let n=0;for(let r=i.exec(t);null!==r;r=i.exec(t)){const s=t.slice(n,i.lastIndex-r[0].length);n=i.lastIndex,s.length>0&&e.push(s),e.push(["get",r[1]])}if(1===e.length)return t;if(n`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const K=[Z,D,z,N,G,X,q,Y(W),V];function H(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!H(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of K)if(!H(t,e))return null}return`Expected ${B(t)} but found ${B(e)} instead.`}function $(t,e){return e.some((e=>e.kind===t.kind))}function J(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}class Q{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class tt{constructor(t,e,i,n,r){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=i,this.fontStack=n,this.textColor=r}}class et{constructor(t){this.sections=t}static fromString(t){return new et([new tt(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof et?t:et.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const i={};e.fontStack&&(i["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(i["font-scale"]=e.scale),e.textColor&&(i["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(i)}return t}}class it{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new it({name:t,available:!1}):null}serialize(){return["image",this.name]}}function nt(t,e,i,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,i,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function rt(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof C)return!0;if(t instanceof Q)return!0;if(t instanceof et)return!0;if(t instanceof it)return!0;if(Array.isArray(t)){for(const e of t)if(!rt(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!rt(t[e]))return!1;return!0}return!1}function st(t){if(null===t)return Z;if("string"==typeof t)return z;if("boolean"==typeof t)return N;if("number"==typeof t)return D;if(t instanceof C)return G;if(t instanceof Q)return U;if(t instanceof et)return X;if(t instanceof it)return V;if(Array.isArray(t)){const e=t.length;let i;for(const e of t){const t=st(e);if(i){if(i===t)continue;i=W;break}i=t}return Y(i||W,e)}return E("object"==typeof t),q}function ot(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof C||t instanceof et||t instanceof it?t.toString():JSON.stringify(t)}class at{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!rt(t[1]))return e.error("invalid value");const i=t[1];let n=st(i);const r=e.expectedType;return"array"!==n.kind||0!==n.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(n=r),new at(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof C?["rgba"].concat(this.value.toArray()):this.value instanceof et?this.value.serialize():(E(null===this.value||"string"==typeof this.value||"number"==typeof this.value||"boolean"==typeof this.value),this.value)}}const lt=at,ht=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}},ct={string:z,number:D,boolean:N,object:q};class ut{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i,n=1;const r=t[0];if("array"===r){let r,s;if(t.length>2){const i=t[1];if("string"!=typeof i||!(i in ct)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);r=ct[i],n++}else r=W;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);s=t[2],n++}i=Y(r,s)}else E(ct[r],r),i=ct[r];const s=[];for(;nt.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}const dt=ut;class pt{constructor(t){this.type=X,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const n=[];let r=!1;for(let i=1;i<=t.length-1;++i){const s=t[i];if(r&&"object"==typeof s&&!Array.isArray(s)){r=!1;let t=null;if(s["font-scale"]&&(t=e.parse(s["font-scale"],1,D),!t))return null;let i=null;if(s["text-font"]&&(i=e.parse(s["text-font"],1,Y(z)),!i))return null;let o=null;if(s["text-color"]&&(o=e.parse(s["text-color"],1,G),!o))return null;const a=n[n.length-1];a.scale=t,a.font=i,a.textColor=o}else{const s=e.parse(t[i],1,W);if(!s)return null;const o=s.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:s,scale:null,font:null,textColor:null})}}return new pt(n)}evaluate(t){return new et(this.sections.map((e=>{const i=e.content.evaluate(t);return st(i)===V?new tt("",i,null,null,null):new tt(ot(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const i={};e.scale&&(i["font-scale"]=e.scale.serialize()),e.font&&(i["text-font"]=e.font.serialize()),e.textColor&&(i["text-color"]=e.textColor.serialize()),t.push(i)}return t}}class ft{constructor(t){this.type=V,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,z);return i?new ft(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=it.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const gt={"to-boolean":N,"to-color":G,"to-number":D,"to-string":z};class mt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(E(gt[i],i),("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const n=gt[i],r=[];for(let i=1;i4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:nt(e[0],e[1],e[2],e[3]),!i))return new C(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ht(i||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new ht(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?et.fromString(ot(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?it.fromString(ot(this.args[0].evaluate(t))):ot(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new pt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ft(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}const yt=mt,_t=["Unknown","Point","LineString","Polygon"],vt=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?_t[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:n}=this.featureTileCoord,r=i*e-t[0],s=n*e-t[1];return this.featureDistanceData.bearing[0]*r+this.featureDistanceData.bearing[1]*s}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=C.parse(t)),e}};class xt{constructor(t,e,i,n){this.name=t,this.type=e,this._evaluate=i,this.args=n}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const i=t[0],n=xt.definitions[i];if(!n)return e.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const r=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let a=null;for(const[n,s]of o){a=new Bt(e.registry,e.path,null,e.scope);const o=[];let l=!1;for(let e=1;e0),1===o.length)e.errors.push(...a.errors);else{const i=(o.length?o:s).map((([t])=>{return e=t,Array.isArray(e)?`(${e.map(B).join(", ")})`:`(${B(e.type)}...)`;var e})).join(" | "),n=[];for(let i=1;i=e[2]||t[1]<=e[1]||t[3]>=e[3])}function St(t,e){const i=(180+t[0])/360,n=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360);var r;const s=Math.pow(2,e.z);return[Math.round(i*s*Ct),Math.round(n*s*Ct)]}function Rt(t,e,i){const n=t[0]-e[0],r=t[1]-e[1],s=t[0]-i[0],o=t[1]-i[1];return n*o-s*r==0&&n*s<=0&&r*o<=0}function kt(t,e){let i=!1;for(let o=0,a=e.length;on[1]!=s[1]>n[1]&&n[0]<(s[0]-r[0])*(n[1]-r[1])/(s[1]-r[1])+r[0]&&(i=!i)}}var n,r,s;return i}function It(t,e){for(let i=0;i0&&u<0||c<0&&u>0}function Pt(t,e,i,n){const r=[e[0]-t[0],e[1]-t[1]];return 0!=(s=[n[0]-i[0],n[1]-i[1]])[0]*(o=r)[1]-s[1]*o[0]&&!(!Mt(t,e,i,n)||!Mt(i,n,t,e));var s,o}function Lt(t,e,i){for(const n of i)for(let i=0;ii[2]){const e=.5*n;let r=t[0]-i[0]>e?-n:i[0]-t[0]>e?n:0;0===r&&(r=t[0]-i[2]>e?-n:i[2]-t[0]>e?n:0),t[0]+=r}Et(e,t)}function Dt(t,e,i,n){const r=Math.pow(2,n.z)*Ct,s=[n.x*Ct,n.y*Ct],o=[];if(!t)return o;for(const n of t)for(const t of n){const n=[t.x+s[0],t.y+s[1]];Zt(n,e,i,r),o.push(n)}return o}function zt(t,e,i,n){const r=Math.pow(2,n.z)*Ct,s=[n.x*Ct,n.y*Ct],o=[];if(!t)return o;for(const i of t){const t=[];for(const n of i){const i=[n.x+s[0],n.y+s[1]];Et(e,i),t.push(i)}o.push(t)}if(e[2]-e[0]<=r/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const t of o)for(const n of t)Zt(n,e,i,r)}var a;return o}class Nt{constructor(t,e){this.type=N,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(rt(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t{e&&!qt(t)&&(e=!1)})),e}function Wt(t){if(t instanceof bt&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!Wt(t)&&(e=!1)})),e}function Ut(t,e){if(t instanceof bt&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild((t=>{i&&!Ut(t,e)&&(i=!1)})),i}class Xt{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const i=t[1];return e.scope.has(i)?new Xt(i,e.scope.get(i)):e.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}const Vt=Xt;class Yt{constructor(t,e=[],i,n=new j,r=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=r,this.expectedType=i}parse(t,e,i,n,r={}){return e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)}_parse(t,e){function i(t,e,i){return"assert"===i?new dt(e,[t]):"coerce"===i?new yt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=t[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const r=this.registry[n];if(r){let n=r.parse(t,this);if(!n)return null;if(this.expectedType){const t=this.expectedType,r=n.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==r.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==r.kind&&"string"!==r.kind){if(this.checkSubtype(t,r))return null}else n=i(n,t,e.typeAnnotation||"coerce");else n=i(n,t,e.typeAnnotation||"assert")}if(!(n instanceof lt)&&"resolvedImage"!==n.type.kind&&Kt(n)){const t=new vt;try{n=new lt(n.type,n.evaluate(t))}catch(t){return this.error(t.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,i){const n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new Yt(this.registry,n,e||null,r,this.errors)}error(t,...e){const i=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new O(i,t))}checkSubtype(t,e){const i=H(t,e);return i&&this.error(i),i}}const Bt=Yt;function Kt(t){if(t instanceof Vt)return Kt(t.boundExpression);if(t instanceof bt&&"error"===t.name)return!1;if(t instanceof wt)return!1;if(t instanceof Gt)return!1;const e=t instanceof yt||t instanceof dt;let i=!0;return t.eachChild((t=>{i=e?i&&Kt(t):i&&t instanceof lt})),!!i&&qt(t)&&Ut(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Ht(t,e){const i=t.length-1;let n,r,s=0,o=i,a=0;for(;s<=o;)if(a=Math.floor((s+o)/2),n=t[a],r=t[a+1],n<=e){if(a===i||ee))throw new ht("Input is not a number.");o=a-1}return 0}class $t{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,D);if(!i)return null;const n=[];let r=null;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(let i=1;i=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const h=e.parse(o,l,r);if(!h)return null;r=r||h.type,n.push([s,h])}return new $t(r,i,n)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);const r=e.length;return n>=e[r-1]?i[r-1].evaluate(t):i[Ht(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}const Jt=$t;var Qt=i(9874);function te(t,e,i){return t*(1-i)+e*i}function ee(t,e,i){return new C(te(t.r,e.r,i),te(t.g,e.g,i),te(t.b,e.b,i),te(t.a,e.a,i))}function ie(t,e,i){return t.map(((t,n)=>te(t,e[n],i)))}const ne=.95047,re=1.08883,se=4/29,oe=6/29,ae=3*oe*oe,le=oe*oe*oe,he=Math.PI/180,ce=180/Math.PI;function ue(t){return t>le?Math.pow(t,1/3):t/ae+se}function de(t){return t>oe?t*t*t:ae*(t-se)}function pe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ge(t){const e=fe(t.r),i=fe(t.g),n=fe(t.b),r=ue((.4124564*e+.3575761*i+.1804375*n)/ne),s=ue((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*s-16,a:500*(r-s),b:200*(s-ue((.0193339*e+.119192*i+.9503041*n)/re)),alpha:t.a}}function me(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*de(e),i=ne*de(i),n=re*de(n),new C(pe(3.2404542*i-1.5371385*e-.4985314*n),pe(-.969266*i+1.8760108*e+.041556*n),pe(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}function ye(t,e,i){const n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}const _e={forward:ge,reverse:me,interpolate:function(t,e,i){return{l:te(t.l,e.l,i),a:te(t.a,e.a,i),b:te(t.b,e.b,i),alpha:te(t.alpha,e.alpha,i)}}},ve=function(t){const{l:e,a:i,b:n}=ge(t),r=Math.atan2(n,i)*ce;return{h:r<0?r+360:r,c:Math.sqrt(i*i+n*n),l:e,alpha:t.a}},xe=function(t){const e=t.h*he,i=t.c;return me({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},be=function(t,e,i){return{h:ye(t.h,e.h,i),c:te(t.c,e.c,i),l:te(t.l,e.l,i),alpha:te(t.alpha,e.alpha,i)}};class we{constructor(t,e,i,n,r){this.type=t,this.operator=e,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,i,n){let r=0;if("exponential"===t.name)r=Ce(e,t.base,i,n);else if("linear"===t.name)r=Ce(e,1,i,n);else if("cubic-bezier"===t.name){const s=t.controlPoints;r=new Qt(s[0],s[1],s[2],s[3]).solve(Ce(e,1,i,n))}return r}static parse(t,e){let[i,n,r,...s]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(r=e.parse(r,2,D),!r)return null;const o=[];let a=null;"interpolate-hcl"===i||"interpolate-lab"===i?a=G:e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType);for(let t=0;t=i)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',r);const h=e.parse(n,l,a);if(!h)return null;a=a||h.type,o.push([i,h])}return"number"===a.kind||"color"===a.kind||"array"===a.kind&&"number"===a.itemType.kind&&"number"==typeof a.N?new we(a,i,n,r,o):e.error(`Type ${B(a)} is not interpolatable.`)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const s=e.length;if(r>=e[s-1])return i[s-1].evaluate(t);const o=Ht(e,r),a=e[o],l=e[o+1],h=we.interpolationFactor(this.interpolation,r,a,l),c=i[o].evaluate(t),u=i[o+1].evaluate(t);return"interpolate"===this.operator?n[this.type.kind.toLowerCase()](c,u,h):"interpolate-hcl"===this.operator?xe(be(ve(c),ve(u),h)):_e.reverse(_e.interpolate(_e.forward(c),_e.forward(u),h))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;tH(n,t.type)));return new Te(s?W:i,r)}evaluate(t){let e,i=null,n=0;for(const r of this.args){if(n++,i=r.evaluate(t),i&&i instanceof it&&!i.available&&(e||(e=i),i=null,n===this.args.length))return e;if(null!==i)break}return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Se=Te;class Re{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let n=1;n=i.length)throw new ht(`Array index out of bounds: ${e} > ${i.length-1}.`);if(e!==Math.floor(e))throw new ht(`Array index must be an integer, but found ${e} instead.`);return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}const Me=Ie;class Pe{constructor(t,e){this.type=N,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,W),n=e.parse(t[2],2,W);return i&&n?$(i.type,[N,z,D,Z,W])?new Pe(i,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${B(i.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(null==i)return!1;if(!J(e,["boolean","string","number","null"]))throw new ht(`Expected first argument to be of type boolean, string, number or null, but found ${B(st(e))} instead.`);if(!J(i,["string","array"]))throw new ht(`Expected second argument to be of type array or string, but found ${B(st(i))} instead.`);return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}const Le=Pe;class Ae{constructor(t,e,i){this.type=D,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,W),n=e.parse(t[2],2,W);if(!i||!n)return null;if(!$(i.type,[N,z,D,Z,W]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${B(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,D);return r?new Ae(i,n,r):null}return new Ae(i,n)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!J(e,["boolean","string","number","null"]))throw new ht(`Expected first argument to be of type boolean, string, number or null, but found ${B(st(e))} instead.`);if(!J(i,["string","array"]))throw new ht(`Expected second argument to be of type array or string, but found ${B(st(i))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return i.indexOf(e,n)}return i.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}const Oe=Ae;class Fe{constructor(t,e,i,n,r,s){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=s}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const r={},s=[];for(let o=2;oNumber.MAX_SAFE_INTEGER)return h.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return h.error("Numeric branch labels must be integer values.");if(i){if(h.checkSubtype(i,st(t)))return null}else i=st(t);if(void 0!==r[String(t)])return h.error("Branch labels must be unique.");r[String(t)]=s.length}const c=e.parse(l,o,n);if(!c)return null;n=n||c.type,s.push(c)}const o=e.parse(t[1],1,W);if(!o)return null;const a=e.parse(t[t.length-1],t.length-1,n);return a?(E(i&&n),"value"!==o.type.kind&&e.concat(1).checkSubtype(i,o.type)?null:new Fe(i,n,o,r,s,a)):null}evaluate(t){const e=this.input.evaluate(t);return(st(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),i=[],n={};for(const t of e){const e=n[this.cases[t]];void 0===e?(n[this.cases[t]]=i.length,i.push([this.cases[t],[t]])):i[e][1].push(t)}const r=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,n]of i)1===n.length?t.push(r(n[0])):t.push(n.map(r)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}const je=Fe;class Ze{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const n=[];for(let r=1;re.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const De=Ze;class ze{constructor(t,e,i,n){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,W),n=e.parse(t[2],2,D);if(!i||!n)return null;if(!$(i.type,[Y(W),z,W]))return e.error(`Expected first argument to be of type array or string, but found ${B(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,D);return r?new ze(i.type,i,n,r):null}return new ze(i.type,i,n)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!J(e,["string","array"]))throw new ht(`Expected first argument to be of type array or string, but found ${B(st(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(i,n)}return e.slice(i)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}const Ne=ze;function Ge(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function qe(t,e,i,n){return 0===n.compare(e,i)}function We(t,e,i){const n="=="!==t&&"!="!==t;return class r{constructor(t,e,i){this.type=N,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let s=e.parse(t[1],1,W);if(!s)return null;if(!Ge(i,s.type))return e.concat(1).error(`"${i}" comparisons are not supported for type '${B(s.type)}'.`);let o=e.parse(t[2],2,W);if(!o)return null;if(!Ge(i,o.type))return e.concat(2).error(`"${i}" comparisons are not supported for type '${B(o.type)}'.`);if(s.type.kind!==o.type.kind&&"value"!==s.type.kind&&"value"!==o.type.kind)return e.error(`Cannot compare types '${B(s.type)}' and '${B(o.type)}'.`);n&&("value"===s.type.kind&&"value"!==o.type.kind?s=new dt(o.type,[s]):"value"!==s.type.kind&&"value"===o.type.kind&&(o=new dt(s.type,[o])));let a=null;if(4===t.length){if("string"!==s.type.kind&&"string"!==o.type.kind&&"value"!==s.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(a=e.parse(t[3],3,U),!a)return null}return new r(s,o,a)}evaluate(r){const s=this.lhs.evaluate(r),o=this.rhs.evaluate(r);if(n&&this.hasUntypedArgument){const e=st(s),i=st(o);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new ht(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${i.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=st(s),i=st(o);if("string"!==t.kind||"string"!==i.kind)return e(r,s,o)}return this.collator?i(r,s,o,this.collator.evaluate(r)):e(r,s,o)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Ue=We("==",(function(t,e,i){return e===i}),qe),Xe=We("!=",(function(t,e,i){return e!==i}),(function(t,e,i,n){return!qe(0,e,i,n)})),Ve=We("<",(function(t,e,i){return e",(function(t,e,i){return e>i}),(function(t,e,i,n){return n.compare(e,i)>0})),Be=We("<=",(function(t,e,i){return e<=i}),(function(t,e,i,n){return n.compare(e,i)<=0})),Ke=We(">=",(function(t,e,i){return e>=i}),(function(t,e,i,n){return n.compare(e,i)>=0}));class He{constructor(t,e,i,n,r,s){this.type=z,this.number=t,this.locale=e,this.currency=i,this.unit=n,this.minFractionDigits=r,this.maxFractionDigits=s}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,D);if(!i)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let r=null;if(n.locale&&(r=e.parse(n.locale,1,z),!r))return null;let s=null;if(n.currency&&(s=e.parse(n.currency,1,z),!s))return null;let o=null;if(n.unit&&(o=e.parse(n.unit,1,z),!o))return null;let a=null;if(n["min-fraction-digits"]&&(a=e.parse(n["min-fraction-digits"],1,D),!a))return null;let l=null;return n["max-fraction-digits"]&&(l=e.parse(n["max-fraction-digits"],1,D),!l)?null:new He(i,r,s,o,a,l)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class $e{constructor(t){this.type=D,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error(`Expected argument of type string or array, but found ${B(i.type)} instead.`):new $e(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ht(`Expected value to be of type string or array, but found ${B(st(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Je={"==":Ue,"!=":Xe,">":Ye,"<":Ve,">=":Ke,"<=":Be,array:dt,at:Me,boolean:dt,case:De,coalesce:Se,collator:wt,format:pt,image:ft,in:Le,"index-of":Oe,interpolate:Ee,"interpolate-hcl":Ee,"interpolate-lab":Ee,length:$e,let:ke,literal:lt,match:je,number:dt,"number-format":He,object:dt,slice:Ne,step:Jt,string:dt,"to-boolean":yt,"to-color":yt,"to-number":yt,"to-string":yt,var:Vt,within:Gt};function Qe(t,[e,i,n,r]){e=e.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);const s=r?r.evaluate(t):1,o=nt(e,i,n,s);if(o)throw new ht(o);return new C(e/255*s,i/255*s,n/255*s,s)}function ti(t,e){return t in e}function ei(t,e){const i=e[t];return void 0===i?null:i}function ii(t){return{type:t}}bt.register(Je,{error:[{kind:"error"},[z],(t,[e])=>{throw new ht(e.evaluate(t))}],typeof:[z,[W],(t,[e])=>B(st(e.evaluate(t)))],"to-rgba":[Y(D,4),[G],(t,[e])=>e.evaluate(t).toArray()],rgb:[G,[D,D,D],Qe],rgba:[G,[D,D,D,D],Qe],has:{type:N,overloads:[[[z],(t,[e])=>ti(e.evaluate(t),t.properties())],[[z,q],(t,[e,i])=>ti(e.evaluate(t),i.evaluate(t))]]},get:{type:W,overloads:[[[z],(t,[e])=>ei(e.evaluate(t),t.properties())],[[z,q],(t,[e,i])=>ei(e.evaluate(t),i.evaluate(t))]]},"feature-state":[W,[z],(t,[e])=>ei(e.evaluate(t),t.featureState||{})],properties:[q,[],t=>t.properties()],"geometry-type":[z,[],t=>t.geometryType()],id:[W,[],t=>t.id()],zoom:[D,[],t=>t.globals.zoom],pitch:[D,[],t=>t.globals.pitch||0],"distance-from-center":[D,[],t=>t.distanceFromCenter()],"heatmap-density":[D,[],t=>t.globals.heatmapDensity||0],"line-progress":[D,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[D,[],t=>t.globals.skyRadialProgress||0],accumulated:[W,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[D,ii(D),(t,e)=>{let i=0;for(const n of e)i+=n.evaluate(t);return i}],"*":[D,ii(D),(t,e)=>{let i=1;for(const n of e)i*=n.evaluate(t);return i}],"-":{type:D,overloads:[[[D,D],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[D],(t,[e])=>-e.evaluate(t)]]},"/":[D,[D,D],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[D,[D,D],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[D,[],()=>Math.LN2],pi:[D,[],()=>Math.PI],e:[D,[],()=>Math.E],"^":[D,[D,D],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[D,[D],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[D,[D],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[D,[D],(t,[e])=>Math.log(e.evaluate(t))],log2:[D,[D],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[D,[D],(t,[e])=>Math.sin(e.evaluate(t))],cos:[D,[D],(t,[e])=>Math.cos(e.evaluate(t))],tan:[D,[D],(t,[e])=>Math.tan(e.evaluate(t))],asin:[D,[D],(t,[e])=>Math.asin(e.evaluate(t))],acos:[D,[D],(t,[e])=>Math.acos(e.evaluate(t))],atan:[D,[D],(t,[e])=>Math.atan(e.evaluate(t))],min:[D,ii(D),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[D,ii(D),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[D,[D],(t,[e])=>Math.abs(e.evaluate(t))],round:[D,[D],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[D,[D],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[D,[D],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[N,[z,W],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[N,[W],(t,[e])=>t.id()===e.value],"filter-type-==":[N,[z],(t,[e])=>t.geometryType()===e.value],"filter-<":[N,[z,W],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n{const i=t.id(),n=e.value;return typeof i==typeof n&&i":[N,[z,W],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>r}],"filter-id->":[N,[W],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>n}],"filter-<=":[N,[z,W],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n<=r}],"filter-id-<=":[N,[W],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i<=n}],"filter->=":[N,[z,W],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>=r}],"filter-id->=":[N,[W],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>=n}],"filter-has":[N,[W],(t,[e])=>e.value in t.properties()],"filter-has-id":[N,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[N,[Y(z)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[N,[Y(W)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[N,[z,Y(W)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[N,[z,Y(W)],(t,[e,i])=>function(t,e,i,n){for(;i<=n;){const r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:N,overloads:[[[N,N],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[ii(N),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:N,overloads:[[[N,N],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[ii(N),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[N,[N],(t,[e])=>!e.evaluate(t)],"is-supported-script":[N,[z],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[z,[z],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[z,[z],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[z,ii(W),(t,e)=>e.map((e=>ot(e.evaluate(t)))).join("")],"resolved-locale":[z,[U],(t,[e])=>e.evaluate(t).resolvedLocale()]});const ni=Je;function ri(t){return{result:"success",value:t}}function si(t){return{result:"error",value:t}}function oi(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}class ai{constructor(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new vt,this._defaultValue=e?"color"===(i=e).type&&(oi(i.default)||Array.isArray(i.default))?new C(0,0,0,0):"color"===i.type?C.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,i,n,r,s,o,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=n||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=a||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,n,r,s,o,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=a||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new ht(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function li(t,e){const i=new Bt(ni,[],e?function(t){const e={color:G,string:z,number:D,enum:z,boolean:N,formatted:X,resolvedImage:V};return"array"===t.type?Y(e[t.value]||W,t.length):e[t.type]}(e):void 0),n=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?ri(new ai(n,e)):(E(i.errors.length>0),si(i.errors))}class hi{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Wt(e.expression)}evaluateWithoutErrorHandling(t,e,i,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,s)}evaluate(t,e,i,n,r,s){return this._styleExpression.evaluate(t,e,i,n,r,s)}}class ci{constructor(t,e,i,n){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Wt(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,i,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,s)}evaluate(t,e,i,n,r,s){return this._styleExpression.evaluate(t,e,i,n,r,s)}interpolationFactor(t,e,i){return this.interpolationType?Ee.interpolationFactor(this.interpolationType,t,e,i):0}}function ui(t,e){if("error"===(t=li(t,e)).result)return t;const i=t.value.expression,n=qt(i);if(!n&&"data-driven"!==e["property-type"])return si([new O("","data expressions not supported")]);const r=Ut(i,["zoom","pitch","distance-from-center"]);if(!(r||(s=e,s.expression&&s.expression.parameters.indexOf("zoom")>-1)))return si([new O("","zoom expressions not supported")]);var s;const o=di(i);if(!o&&!r)return si([new O("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof O)return si([o]);if(o instanceof Ee&&!function(t){return!!t.expression&&t.expression.interpolated}(e))return si([new O("",'"interpolate" expressions cannot be used with this property')]);if(!o)return ri(new hi(n?"constant":"source",t.value));const a=o instanceof Ee?o.interpolation:void 0;return ri(new ci(n?"camera":"composite",t.value,o.labels,a))}function di(t){let e=null;if(t instanceof ke)e=di(t.result);else if(t instanceof Se){for(const i of t.args)if(e=di(i),e)break}else(t instanceof Jt||t instanceof Ee)&&t.input instanceof bt&&"zoom"===t.input.name&&(e=t);return e instanceof O||t.eachChild((t=>{const i=di(t);i instanceof O?e=i:!e&&i?e=new O("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new O("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function pi(t){if(Array.isArray(t))return t.map(pi);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=pi(t[i]);return e}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}const fi=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8],"doc":"Style specification version number. Must be 8.","example":8},"name":{"type":"string","doc":"A human-readable name for the style.","example":"Bright"},"metadata":{"type":"*","doc":"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},"center":{"type":"array","value":"number","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).","example":[-73.9749,40.7736]},"zoom":{"type":"number","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).","example":12.5},"bearing":{"type":"number","default":0,"period":360,"units":"degrees","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).","example":29},"pitch":{"type":"number","default":0,"units":"degrees","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).","example":50},"light":{"type":"light","doc":"The global light source.","example":{"anchor":"viewport","color":"white","intensity":0.4}},"terrain":{"type":"terrain","doc":"A global modifier that elevates layers and markers based on a DEM data source."},"fog":{"type":"fog","doc":"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."},"sources":{"required":true,"type":"sources","doc":"Data source specifications.","example":{"mapbox-streets":{"type":"vector","url":"mapbox://mapbox.mapbox-streets-v6"}}},"sprite":{"type":"string","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).","example":"mapbox://sprites/mapbox/bright-v8"},"glyphs":{"type":"string","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).","example":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition","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.","example":{"duration":300,"delay":0}},"projection":{"type":"projection","doc":"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.","example":{"name":"albers","center":[-154,50],"parallels":[55,65]}},"layers":{"required":true,"type":"array","value":"layer","doc":"Layers will be drawn in the order of this array.","example":[{"id":"water","source":"mapbox-streets","source-layer":"water","type":"fill","paint":{"fill-color":"#00ffff"}}]}},"sources":{"*":{"type":"source","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."}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{"doc":"A vector tile source."}},"doc":"The type of the source."},"url":{"type":"string","doc":"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},"tiles":{"type":"array","value":"string","doc":"An array of one or more tile source URLs, as in the TileJSON spec."},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129],"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."},"scheme":{"type":"enum","values":{"xyz":{"doc":"Slippy map tilenames scheme."},"tms":{"doc":"OSGeo spec scheme."}},"default":"xyz","doc":"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},"minzoom":{"type":"number","default":0,"doc":"Minimum zoom level for which tiles are available, as in the TileJSON spec."},"maxzoom":{"type":"number","default":22,"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."},"attribution":{"type":"string","doc":"Contains an attribution to be displayed when the map is shown to a user."},"promoteId":{"type":"promoteId","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. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{"doc":"A raster tile source."}},"doc":"The type of the source."},"url":{"type":"string","doc":"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},"tiles":{"type":"array","value":"string","doc":"An array of one or more tile source URLs, as in the TileJSON spec."},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129],"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."},"minzoom":{"type":"number","default":0,"doc":"Minimum zoom level for which tiles are available, as in the TileJSON spec."},"maxzoom":{"type":"number","default":22,"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."},"tileSize":{"type":"number","default":512,"units":"pixels","doc":"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},"scheme":{"type":"enum","values":{"xyz":{"doc":"Slippy map tilenames scheme."},"tms":{"doc":"OSGeo spec scheme."}},"default":"xyz","doc":"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},"attribution":{"type":"string","doc":"Contains an attribution to be displayed when the map is shown to a user."},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{"doc":"A RGB-encoded raster DEM source"}},"doc":"The type of the source."},"url":{"type":"string","doc":"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},"tiles":{"type":"array","value":"string","doc":"An array of one or more tile source URLs, as in the TileJSON spec."},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129],"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."},"minzoom":{"type":"number","default":0,"doc":"Minimum zoom level for which tiles are available, as in the TileJSON spec."},"maxzoom":{"type":"number","default":22,"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."},"tileSize":{"type":"number","default":512,"units":"pixels","doc":"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},"attribution":{"type":"string","doc":"Contains an attribution to be displayed when the map is shown to a user."},"encoding":{"type":"enum","values":{"terrarium":{"doc":"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},"mapbox":{"doc":"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},"default":"mapbox","doc":"The encoding used by this source. Mapbox Terrain RGB is used by default"},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{"doc":"A GeoJSON data source."}},"doc":"The data type of the GeoJSON source."},"data":{"type":"*","doc":"A URL to a GeoJSON file, or inline GeoJSON."},"maxzoom":{"type":"number","default":18,"doc":"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},"attribution":{"type":"string","doc":"Contains an attribution to be displayed when the map is shown to a user."},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0,"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."},"filter":{"type":"*","doc":"An expression for filtering features prior to processing them for rendering."},"tolerance":{"type":"number","default":0.375,"doc":"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},"cluster":{"type":"boolean","default":false,"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"},"clusterRadius":{"type":"number","default":50,"minimum":0,"doc":"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},"clusterMaxZoom":{"type":"number","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."},"clusterMinPoints":{"type":"number","doc":"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},"clusterProperties":{"type":"*","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\\"]]}`"},"lineMetrics":{"type":"boolean","default":false,"doc":"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},"generateId":{"type":"boolean","default":false,"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."},"promoteId":{"type":"promoteId","doc":"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{"doc":"A video data source."}},"doc":"The data type of the video source."},"urls":{"required":true,"type":"array","value":"string","doc":"URLs to video content in order of preferred format."},"coordinates":{"required":true,"doc":"Corners of video specified in longitude, latitude pairs.","type":"array","length":4,"value":{"type":"array","length":2,"value":"number","doc":"A single longitude, latitude pair."}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{"doc":"An image data source."}},"doc":"The data type of the image source."},"url":{"required":true,"type":"string","doc":"URL that points to an image."},"coordinates":{"required":true,"doc":"Corners of image specified in longitude, latitude pairs.","type":"array","length":4,"value":{"type":"array","length":2,"value":"number","doc":"A single longitude, latitude pair."}}},"layer":{"id":{"type":"string","doc":"Unique layer name.","required":true},"type":{"type":"enum","values":{"fill":{"doc":"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"line":{"doc":"A stroked line.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"symbol":{"doc":"An icon or a text label.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"circle":{"doc":"A filled circle.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"heatmap":{"doc":"A heatmap.","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"fill-extrusion":{"doc":"An extruded (3D) polygon.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}}},"raster":{"doc":"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"hillshade":{"doc":"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"background":{"doc":"The background color or pattern of the map.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}}},"sky":{"doc":"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}}},"doc":"Rendering type of this layer.","required":true},"metadata":{"type":"*","doc":"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},"source":{"type":"string","doc":"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{"type":"string","doc":"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},"minzoom":{"type":"number","minimum":0,"maximum":24,"doc":"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},"maxzoom":{"type":"number","minimum":0,"maximum":24,"doc":"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},"filter":{"type":"filter","doc":"An 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. The `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions are supported only for filter expressions on the symbol layer."},"layout":{"type":"layout","doc":"Layout properties for the layer."},"paint":{"type":"paint","doc":"Default paint properties for this layer."}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","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.","sdk-support":{"basic functionality":{"js":"1.2.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"},"data-driven styling":{"js":"1.2.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","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.","sdk-support":{"basic functionality":{"js":"1.2.0","android":"9.2.0","ios":"5.9.0","macos":"0.16.0"},"data-driven styling":{"js":"1.2.0","android":"9.2.0","ios":"5.9.0","macos":"0.16.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"doc":"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.","sdk-support":{"basic functionality":{"js":"v2.10.0","android":"10.7.0","ios":"10.7.0"}},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{"doc":"A cap with a squared-off end which is drawn to the exact endpoint of the line."},"round":{"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."},"square":{"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."}},"default":"butt","doc":"The display of line endings.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"2.3.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{"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."},"round":{"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."},"miter":{"doc":"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},"default":"miter","doc":"The display of lines when joining.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"doc":"Used to automatically convert miter joins to bevel joins for sharp angles.","requires":[{"line-join":"miter"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"doc":"Used to automatically convert round joins to miter joins for shallow angles.","requires":[{"line-join":"round"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","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.","sdk-support":{"basic functionality":{"js":"1.2.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"},"data-driven styling":{"js":"1.2.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{"doc":"The label is placed at the point where the geometry is located."},"line":{"doc":"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{"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."}},"default":"point","doc":"Label placement relative to its geometry.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"`line-center` value":{"js":"0.47.0","android":"6.4.0","ios":"4.3.0","macos":"0.10.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","doc":"Distance between two symbol anchors.","requires":[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"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.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","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.","sdk-support":{"basic functionality":{"js":"0.53.0","android":"7.4.0","ios":"4.11.0","macos":"0.14.0"},"data-driven styling":{"js":"0.53.0","android":"7.4.0","ios":"4.11.0","macos":"0.14.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{"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`."},"viewport-y":{"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`."},"source":{"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."}},"default":"auto","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`.","sdk-support":{"basic functionality":{"js":"0.49.0","android":"6.6.0","ios":"4.5.0","macos":"0.12.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"doc":"If true, the icon will be visible even if it collides with other previously drawn symbols.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"doc":"If true, other symbols can be visible even if they collide with the icon.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"doc":"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.","requires":["icon-image","text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{"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."},"viewport":{"doc":"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"auto":{"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`."}},"default":"auto","doc":"In combination with `symbol-placement`, determines the rotation behavior of icons.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0","macos":"0.3.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","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.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{"doc":"The icon is displayed at its intrinsic aspect ratio."},"width":{"doc":"The icon is scaled in the x-dimension to fit the width of the text."},"height":{"doc":"The icon is scaled in the y-dimension to fit the height of the text."},"both":{"doc":"The icon is scaled in both x- and y-dimensions."}},"default":"none","doc":"Scales the icon to fit around the associated text.","requires":["icon-image","text-field"],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0","macos":"0.2.1"},"stretchable icons":{"js":"1.6.0","android":"9.2.0","ios":"5.8.0","macos":"0.15.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","doc":"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0","macos":"0.2.1"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","doc":"Name of image in sprite to use for drawing an image background.","tokens":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","doc":"Rotates the icon clockwise.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.21.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","doc":"Size of the additional area around the icon bounding box used for detecting symbol collisions.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"doc":"If true, the icon may be flipped to prevent it from being rendered upside-down.","requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"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.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{"doc":"The center of the icon is placed closest to the anchor."},"left":{"doc":"The left side of the icon is placed closest to the anchor."},"right":{"doc":"The right side of the icon is placed closest to the anchor."},"top":{"doc":"The top of the icon is placed closest to the anchor."},"bottom":{"doc":"The bottom of the icon is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the icon is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the icon is placed closest to the anchor."}},"default":"center","doc":"Part of the icon placed closest to the anchor.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{"doc":"The icon is aligned to the plane of the map."},"viewport":{"doc":"The icon is aligned to the plane of the viewport."},"auto":{"doc":"Automatically matches the value of `icon-rotation-alignment`."}},"default":"auto","doc":"Orientation of icon when map is pitched.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{"doc":"The text is aligned to the plane of the map."},"viewport":{"doc":"The text is aligned to the plane of the viewport."},"auto":{"doc":"Automatically matches the value of `text-rotation-alignment`."}},"default":"auto","doc":"Orientation of text when map is pitched.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0","macos":"0.2.1"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0","macos":"0.3.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{"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."},"viewport":{"doc":"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"auto":{"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`."}},"default":"auto","doc":"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0","macos":"0.3.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"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. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"doc":"Font stack to use for displaying text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","doc":"Font size.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","doc":"The maximum line width for text wrapping.","requires":["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","doc":"Text leading value for multi-line text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"2.3.0","android":"10.0.0","ios":"10.0.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","doc":"Text tracking amount.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{"doc":"The text is aligned towards the anchor position."},"left":{"doc":"The text is aligned to the left."},"center":{"doc":"The text is centered."},"right":{"doc":"The text is aligned to the right."}},"default":"center","doc":"Text justification options.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"},"auto":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0","macos":"0.14.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"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.","sdk-support":{"basic functionality":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0","macos":"0.14.0"},"data-driven styling":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0","macos":"0.14.0"}},"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{"doc":"The center of the text is placed closest to the anchor."},"left":{"doc":"The left side of the text is placed closest to the anchor."},"right":{"doc":"The right side of the text is placed closest to the anchor."},"top":{"doc":"The top of the text is placed closest to the anchor."},"bottom":{"doc":"The bottom of the text is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the text is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the text is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the text is placed closest to the anchor."}},"requires":["text-field",{"symbol-placement":["point"]}],"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`.","sdk-support":{"basic functionality":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0","macos":"0.14.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{"doc":"The center of the text is placed closest to the anchor."},"left":{"doc":"The left side of the text is placed closest to the anchor."},"right":{"doc":"The right side of the text is placed closest to the anchor."},"top":{"doc":"The top of the text is placed closest to the anchor."},"bottom":{"doc":"The bottom of the text is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the text is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the text is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the text is placed closest to the anchor."}},"default":"center","doc":"Part of the text placed closest to the anchor.","requires":["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","doc":"Maximum angle change between adjacent characters.","requires":["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{"doc":"If a text\'s language supports horizontal writing mode, symbols would be laid out horizontally."},"vertical":{"doc":"If a text\'s language supports vertical writing mode, symbols would be laid out vertically."}},"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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either [\'horizontal\', \'vertical\'] or [\'vertical\', \'horizontal\'], the order doesn\'t affect the placement.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"1.3.0","android":"8.3.0","ios":"5.3.0","macos":"0.15.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","doc":"Rotates the text clockwise.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","doc":"Size of the additional area around the text bounding box used for detecting symbol collisions.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"doc":"If true, the text may be flipped vertically to prevent it from being rendered upside-down.","requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{"doc":"The text is not altered."},"uppercase":{"doc":"Forces all letters to be displayed in uppercase."},"lowercase":{"doc":"Forces all letters to be displayed in lowercase."}},"default":"none","doc":"Specifies how to capitalize text, similar to the CSS `text-transform` property.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","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.","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"doc":"If true, the text will be visible even if it collides with other previously drawn symbols.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"doc":"If true, other symbols can be visible even if they collide with the text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"doc":"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.","requires":["text-field","icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"property-type":"constant"}},"filter":{"type":"array","value":"*","doc":"A filter selects specific features from a layer."},"filter_symbol":{"type":"boolean","doc":"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","doc":"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","doc":"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","doc":"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","doc":"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","doc":"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{"doc":"`[\\"==\\", key, value]` equality: `feature[key] = value`"},"!=":{"doc":"`[\\"!=\\", key, value]` inequality: `feature[key] ≠ value`"},">":{"doc":"`[\\">\\", key, value]` greater than: `feature[key] > value`"},">=":{"doc":"`[\\">=\\", key, value]` greater than or equal: `feature[key] ≥ value`"},"<":{"doc":"`[\\"<\\", key, value]` less than: `feature[key] < value`"},"<=":{"doc":"`[\\"<=\\", key, value]` less than or equal: `feature[key] ≤ value`"},"in":{"doc":"`[\\"in\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`"},"!in":{"doc":"`[\\"!in\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`"},"all":{"doc":"`[\\"all\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`"},"any":{"doc":"`[\\"any\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`"},"none":{"doc":"`[\\"none\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`"},"has":{"doc":"`[\\"has\\", key]` `feature[key]` exists"},"!has":{"doc":"`[\\"!has\\", key]` `feature[key]` does not exist"},"within":{"doc":"`[\\"within\\", object]` feature geometry is within object geometry"}},"doc":"The filter operator."},"geometry_type":{"type":"enum","values":{"Point":{"doc":"Filter to point geometries."},"LineString":{"doc":"Filter to line geometries."},"Polygon":{"doc":"Filter to polygon geometries."}},"doc":"The geometry type for the filter to select."},"function":{"expression":{"type":"expression","doc":"An expression."},"stops":{"type":"array","doc":"An array of stops.","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0,"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."},"property":{"type":"string","doc":"The name of a feature property to use as the function input.","default":"$zoom"},"type":{"type":"enum","values":{"identity":{"doc":"Return the input value as the output value."},"exponential":{"doc":"Generate an output by interpolating between stops just less than and just greater than the function input."},"interval":{"doc":"Return the output value of the stop just less than the function input."},"categorical":{"doc":"Return the output value of the stop equal to the function input."}},"doc":"The interpolation strategy to use in function evaluation.","default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{"doc":"Use the RGB color space to interpolate color values"},"lab":{"doc":"Use the LAB color space to interpolate color values."},"hcl":{"doc":"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},"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.","default":"rgb"},"default":{"type":"*","required":false,"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."}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2,"doc":"Zoom level and value pair."},"expression":{"type":"array","value":"*","minimum":1,"doc":"An expression defines a function that can be used for data-driven style properties or feature filters."},"expression_name":{"doc":"","type":"enum","values":{"let":{"doc":"Binds expressions to named variables, which can then be referenced in the result expression using [\\"var\\", \\"variable_name\\"].","group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"var":{"doc":"References variable bound using \\"let\\".","group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"literal":{"doc":"Provides a literal array or object value.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"array":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"at":{"doc":"Retrieves an item from an array.","group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"in":{"doc":"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).","group":"Lookup","sdk-support":{"basic functionality":{"js":"1.6.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"}}},"index-of":{"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.","group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.0.0","ios":"10.0.0"}}},"slice":{"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.","group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.0.0","ios":"10.0.0"}}},"case":{"doc":"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"match":{"doc":"Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\"get\\", \\"building_type\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\"c\\", \\"b\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\"in\\"` operator.\\nIf the input type does not match the type of the labels, the result will be the fallback value.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"coalesce":{"doc":"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`\'image\'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"step":{"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.","group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"interpolate":{"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.","group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"interpolate-hcl":{"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.","group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0"}}},"interpolate-lab":{"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.","group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0"}}},"ln2":{"doc":"Returns mathematical constant ln(2).","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"pi":{"doc":"Returns the mathematical constant pi.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"e":{"doc":"Returns the mathematical constant e.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"typeof":{"doc":"Returns a string describing the type of the given value.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"string":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"number":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"boolean":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"object":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"collator":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},"format":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0","macos":"0.12.0"},"text-font":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0","macos":"0.12.0"},"font-scale":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0","macos":"0.12.0"},"text-color":{"js":"1.3.0","android":"7.3.0","ios":"4.10.0","macos":"0.14.0"},"image":{"js":"1.6.0","android":"8.6.0","ios":"5.7.0","macos":"0.15.0"}}},"image":{"doc":"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`\'format\'`](#types-format) expression. A [`\'coalesce\'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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.","group":"Types","sdk-support":{"basic functionality":{"js":"1.4.0","android":"8.6.0","ios":"5.7.0","macos":"0.15.0"}}},"number-format":{"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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.","group":"Types","sdk-support":{"basic functionality":{"js":"0.54.0","android":"8.4.0","ios":"5.4.0","macos":"0.15.0"}}},"to-string":{"doc":"Converts the input value to a string. If the input is `null`, the result is `\\"\\"`. If the input is a [`boolean`](#types-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`](#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. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. 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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"to-number":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"to-boolean":{"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`.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"to-rgba":{"doc":"Returns a four-element array containing the input color\'s red, green, blue, and alpha components, in that order.","group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"to-color":{"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.","group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"rgb":{"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.","group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"rgba":{"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.","group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"get":{"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.","group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"has":{"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.","group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"length":{"doc":"Returns the length of an array or string.","group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"properties":{"doc":"Returns the feature properties object. Note that in some cases, it may be more efficient to use `[\\"get\\", \\"property_name\\"]` directly.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"feature-state":{"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.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.46.0","android":"10.0.0","ios":"10.0.0"}}},"geometry-type":{"doc":"Returns the feature\'s geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"id":{"doc":"Returns the feature\'s id, if it has one.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"zoom":{"doc":"Returns 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.","group":"Camera","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"pitch":{"doc":"Returns the current pitch in degrees. `[\\"pitch\\"]` may only be used in the `filter` expression for a `symbol` layer.","group":"Camera","sdk-support":{"basic functionality":{"js":"2.6.0","android":"10.9.0","ios":"10.9.0"}}},"distance-from-center":{"doc":"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\"distance-from-center\\"]` may only be used in the `filter` expression for a `symbol` layer.","group":"Camera","sdk-support":{"basic functionality":{"js":"2.6.0","android":"10.9.0","ios":"10.9.0"}}},"heatmap-density":{"doc":"Returns 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.","group":"Heatmap","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"line-progress":{"doc":"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.6.0","macos":"0.12.0"}}},"sky-radial-progress":{"doc":"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.","group":"sky","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}},"accumulated":{"doc":"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.53.0","android":"8.4.0","ios":"5.5.0","macos":"0.15.0"}}},"+":{"doc":"Returns the sum of the inputs.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"*":{"doc":"Returns the product of the inputs.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"-":{"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.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"/":{"doc":"Returns the result of floating point division of the first input by the second.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"%":{"doc":"Returns the remainder after integer division of the first input by the second.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"^":{"doc":"Returns the result of raising the first input to the power specified by the second.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"sqrt":{"doc":"Returns the square root of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"log10":{"doc":"Returns the base-ten logarithm of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"ln":{"doc":"Returns the natural logarithm of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"log2":{"doc":"Returns the base-two logarithm of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"sin":{"doc":"Returns the sine of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"cos":{"doc":"Returns the cosine of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"tan":{"doc":"Returns the tangent of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"asin":{"doc":"Returns the arcsine of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"acos":{"doc":"Returns the arccosine of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"atan":{"doc":"Returns the arctangent of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"min":{"doc":"Returns the minimum value of the inputs.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"max":{"doc":"Returns the maximum value of the inputs.","group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"round":{"doc":"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\"round\\", -1.5]` evaluates to -2.","group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"abs":{"doc":"Returns the absolute value of the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"ceil":{"doc":"Returns the smallest integer that is greater than or equal to the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"floor":{"doc":"Returns the largest integer that is less than or equal to the input.","group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"distance":{"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.","group":"Math","sdk-support":{"basic functionality":{"android":"9.2.0","ios":"5.9.0","macos":"0.16.0"}}},"==":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},"!=":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},">":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},"<":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},">=":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},"<=":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}},"all":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"any":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"!":{"doc":"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.","group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"within":{"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.","group":"Decision","sdk-support":{"basic functionality":{"js":"1.9.0","android":"9.1.0","ios":"5.8.0","macos":"0.15.0"}}},"is-supported-script":{"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).","group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.6.0","ios":"4.1.0","macos":"0.8.0"}}},"upcase":{"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.","group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"downcase":{"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.","group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"concat":{"doc":"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.","group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"resolved-locale":{"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.","group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}}}},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"doc":"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.","example":[0.5,10],"sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.0"}}},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.0"}}},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.0"}}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{"doc":"The position of the light source is aligned to the rotation of the map."},"viewport":{"doc":"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"doc":"Whether extruded geometries are lit relative to the map or viewport.","example":"map","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"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).","example":[1.5,90,80],"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}}},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}}}},"projection":{"name":{"type":"enum","values":{"albers":{"doc":"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},"equalEarth":{"doc":"An Equal Earth projection."},"equirectangular":{"doc":"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},"lambertConformalConic":{"doc":"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},"mercator":{"doc":"The Mercator projection is the default projection."},"naturalEarth":{"doc":"A Natural Earth projection."},"winkelTripel":{"doc":"A Winkel Tripel projection."},"globe":{"doc":"A globe projection."}},"default":"mercator","doc":"The name of the projection to be used for rendering the map.","required":true,"sdk-support":{"basic functionality":{"js":"2.6.0"}}},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"doc":"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].","example":[-96,37.5],"requires":[{"name":["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{"js":"2.6.0"}}},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"doc":"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).","example":[29.5,45.5],"requires":[{"name":["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{"js":"2.6.0"}}}},"terrain":{"source":{"type":"string","doc":"Name of a source of `raster_dem` type to be used for terrain elevation.","required":true,"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","requires":["source"],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"doc":"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"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.","transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.21.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","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.","transition":true,"requires":[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.19.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","doc":"The outline color of the fill. Matches the value of `fill-color` if unspecified.","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.19.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","doc":"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{"doc":"The fill is translated relative to the map."},"viewport":{"doc":"The fill is translated relative to the viewport."}},"doc":"Controls the frame of reference for `fill-translate`.","default":"map","requires":["fill-translate"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"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.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.49.0","android":"6.5.0","macos":"0.11.0","ios":"4.4.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"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.","transition":true,"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","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.","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"},"data-driven styling":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","doc":"The geometry\'s offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{"doc":"The fill extrusion is translated relative to the map."},"viewport":{"doc":"The fill extrusion is translated relative to the viewport."}},"doc":"Controls the frame of reference for `fill-extrusion-translate`.","default":"map","requires":["fill-extrusion-translate"],"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"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.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"},"data-driven styling":{"js":"0.49.0","android":"6.5.0","macos":"0.11.0","ios":"4.4.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","doc":"The height with which to extrude this layer.","transition":true,"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"},"data-driven styling":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","doc":"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.","transition":true,"requires":["fill-extrusion-height"],"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"},"data-driven styling":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"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.","transition":false,"sdk-support":{"basic functionality":{"js":"0.50.0","android":"7.0.0","ios":"4.7.0","macos":"0.13.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.","sdk-support":{"basic functionality":{"js":"2.10.0","android":"10.7.0","ios":"10.7.0"}}},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.","requires":["fill-extrusion-edge-radius"],"sdk-support":{"basic functionality":{"js":"2.10.0","android":"10.7.0","ios":"10.7.0"}}}},"paint_line":{"line-opacity":{"type":"number","doc":"The opacity at which the line will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","doc":"The color with which the line will be drawn.","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.23.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","doc":"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{"doc":"The line is translated relative to the map."},"viewport":{"doc":"The line is translated relative to the viewport."}},"doc":"Controls the frame of reference for `line-translate`.","default":"map","requires":["line-translate"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","doc":"Stroke thickness.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"doc":"Draws a line casing outside of a line\'s actual path. Value indicates the width of the inner gap.","transition":true,"units":"pixels","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"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.","transition":true,"units":"pixels","sdk-support":{"basic functionality":{"js":"0.12.1","android":"3.0.0","ios":"3.1.0","macos":"0.1.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","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.","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"2.3.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"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.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.49.0","android":"6.5.0","macos":"0.11.0","ios":"4.4.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","doc":"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\"lineMetrics\\": true`.","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.4.0","macos":"0.11.0"},"data-driven styling":{}},"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","doc":"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.5.0","ios":"10.5.0","macos":"10.5.0"}},"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","doc":"Circle radius.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.18.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","doc":"The fill color of the circle.","transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.18.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"doc":"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.","transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.20.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","doc":"The opacity at which the circle will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.20.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","doc":"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{"doc":"The circle is translated relative to the map."},"viewport":{"doc":"The circle is translated relative to the viewport."}},"doc":"Controls the frame of reference for `circle-translate`.","default":"map","requires":["circle-translate"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{"doc":"Circles are scaled according to their apparent distance to the camera."},"viewport":{"doc":"Circles are not scaled."}},"default":"map","doc":"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0","macos":"0.2.1"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{"doc":"The circle is aligned to the plane of the map."},"viewport":{"doc":"The circle is aligned to the plane of the viewport."}},"default":"viewport","doc":"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"The width of the circle\'s stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","doc":"The stroke color of the circle.","transition":true,"sdk-support":{"basic functionality":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","doc":"The opacity of the circle\'s stroke.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","doc":"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"data-driven styling":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"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.","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"data-driven styling":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"doc":"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","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"],"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.","transition":false,"sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"},"data-driven styling":{}},"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","doc":"The global opacity at which the heatmap layer will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"doc":"The opacity at which the icon will be drawn.","type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"doc":"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"doc":"The color of the icon\'s halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"Distance of halo to the icon outline.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"Fade out the halo towards the outside.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","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.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{"doc":"Icons are translated relative to the map."},"viewport":{"doc":"Icons are translated relative to the viewport."}},"doc":"Controls the frame of reference for `icon-translate`.","default":"map","requires":["icon-image","icon-translate"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","doc":"The opacity at which the text will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","doc":"The color with which the text will be drawn.","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"doc":"The color of the text\'s halo, which helps it stand out from backgrounds.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","doc":"The halo\'s fadeout distance towards the outside.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0","macos":"0.4.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","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.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{"doc":"The text is translated relative to the map."},"viewport":{"doc":"The text is translated relative to the viewport."}},"doc":"Controls the frame of reference for `text-translate`.","default":"map","requires":["text-field","text-translate"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","doc":"The opacity at which the image will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","doc":"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","doc":"Increase or reduce the brightness of the image. The value is the minimum brightness.","default":0,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","doc":"Increase or reduce the brightness of the image. The value is the maximum brightness.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","doc":"Increase or reduce the saturation of the image.","default":0,"minimum":-1,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","doc":"Increase or reduce the contrast of the image.","default":0,"minimum":-1,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","doc":"The resampling/interpolation method to use for overscaling, also known as texture magnification filter","values":{"linear":{"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"},"nearest":{"doc":"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},"default":"linear","sdk-support":{"basic functionality":{"js":"0.47.0","android":"6.3.0","ios":"4.2.0","macos":"0.9.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","doc":"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"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`.","transition":false,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{"doc":"The hillshade illumination is relative to the north direction."},"viewport":{"doc":"The hillshade illumination is relative to the top of the viewport."}},"default":"viewport","doc":"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","doc":"Intensity of the hillshade","default":0.5,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","doc":"The shading color of areas that face away from the light source.","transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","doc":"The shading color of areas that faces towards the light source.","transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","doc":"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.","transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","doc":"The color with which the background will be drawn.","transition":true,"requires":[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"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.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"doc":"The opacity at which the background will be drawn.","transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{"doc":"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},"atmosphere":{"doc":"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},"default":"atmosphere","doc":"The type of the sky","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"doc":"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"doc":"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"doc":"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"doc":"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"doc":"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.","transition":false,"requires":[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"},"data-driven styling":{}},"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","doc":"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.","transition":false,"requires":[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","doc":"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.","transition":false,"requires":[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"doc":"The opacity of the entire sky layer.","transition":true,"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds","doc":"Time allotted for transitions to complete."},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds","doc":"Length of time before a transition begins."}},"property-type":{"data-driven":{"type":"property-type","doc":"Property is interpolable and can be represented using a property expression."},"color-ramp":{"type":"property-type","doc":"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{"type":"property-type","doc":"Property is interpolable but cannot be represented using a property expression."},"constant":{"type":"property-type","doc":"Property is constant across all zoom levels and property values."}},"promoteId":{"*":{"type":"string","doc":"A name of a feature property to use as ID for feature state."}}}'),gi=fi,mi=function(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};yi(t)||(t=Ei(t));const i=t;let n=!0;try{n=function(t){if(!xi(t))return t;let e=pi(t);return vi(e),e=_i(e),e}(i)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(i,null,2)}\n `)}const r=gi[`filter_${e}`],s=li(n,r);let o=null;if("error"===s.result)throw new Error(s.value.map((t=>`${t.key}: ${t.message}`)).join(", "));o=(t,e,i)=>s.value.evaluate(t,e,{},i);let a=null,l=null;if(n!==i){const t=li(i,r);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));a=(e,i,n,r,s)=>t.value.evaluate(e,i,{},n,void 0,void 0,r,s),l=!qt(t.value.expression)}return{filter:o,dynamicFilter:a||void 0,needGeometry:Ci(n),needFeature:!!l}};function yi(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!yi(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function _i(t){if(!Array.isArray(t))return t;const e=function(t){if(bi.has(t[0]))for(let e=1;e_i(t)))}function vi(t){let e=!1;const i=[];if("case"===t[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function wi(t,e){return te?1:0}function Ci(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e"===e||"<="===e||">="===e?Ti(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(Ei))):"all"===e?["all"].concat(t.slice(1).map(Ei)):"none"===e?["all"].concat(t.slice(1).map(Ei).map(ki)):"in"===e?Si(t[1],t.slice(2)):"!in"===e?ki(Si(t[1],t.slice(2))):"has"===e?Ri(t[1]):"!has"===e?ki(Ri(t[1])):"within"!==e||t;var i}function Ti(t,e,i){switch(t){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,t,e]}}function Si(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(wi)]]:["filter-in-small",t,["literal",e]]}}function Ri(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function ki(t){return["!",t]}const Ii=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Mi(t,e){const i={};for(const e in t)"ref"!==e&&(i[e]=t[e]);return Ii.forEach((t=>{t in e&&(i[t]=e[t])})),i}function Pi(t){t=t.slice();const e=Object.create(null);for(let i=0;i=1.5?"@2x":""}.webp?access_token=${e}`:`https://{a-d}.tiles.mapbox.com/v4/${s}/{z}/{x}/{y}.vector.pbf?access_token=${e}`:e?(r.searchParams.set(i,e),decodeURI(r.href)):decodeURI(r.href)}const Ji={},Qi={};let tn=0;function en(t){return t.id||(t.id=tn++),t.id}function nn(t){let e=Ji[t.id];return e||(e={},Ji[en(t)]=e),e}function rn(t){return t*Math.PI/180}const sn=function(){const t=[];for(let e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function on(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);const i=document.createElement("canvas");return i.width=t,i.height=e,i}function an(t,e){let i=0;const n=e.length;for(;i{const n=i.transformRequest&&i.transformRequest(e,"Tiles")||e;if(t instanceof Zi)t.setLoader(((e,i,r)=>{fetch(n).then((t=>t.arrayBuffer())).then((i=>{const n=t.getFormat().readFeatures(i,{extent:e,featureProjection:r});t.setFeatures(n)})).catch((e=>t.setState(Oi.Z.ERROR)))}));else{const e=t.getImage();n instanceof Request?fetch(n).then((t=>t.blob())).then((t=>{const i=URL.createObjectURL(t);e.addEventListener("load",(()=>URL.revokeObjectURL(i))),e.addEventListener("error",(()=>URL.revokeObjectURL(i))),e.src=i})).catch((e=>t.setState(Oi.Z.ERROR))):e.src=n}});const o=t.url;if(o&&!t.tiles){const n=$i(o,i.accessToken,i.accessTokenParam||"access_token",e||location.href);if(o.startsWith("mapbox://"))r=Promise.resolve({tileJson:Object.assign({},t,{url:void 0,tiles:Vi(n)}),tileLoadFunction:s});else{const t={};r=hn("Source",n,i,t).then((function(e){return e.tiles=e.tiles.map((function(n){return"tms"===e.scheme&&(n=n.replace("{y}","{-y}")),$i(n,i.accessToken,i.accessTokenParam||"access_token",t.request.url)})),Promise.resolve({tileJson:e,tileLoadFunction:s})}))}}else t=Object.assign({},t,{tiles:t.tiles.map((function(n){return"tms"===t.scheme&&(n=n.replace("{y}","{-y}")),$i(n,i.accessToken,i.accessTokenParam||"access_token",e||location.href)}))}),r=Promise.resolve({tileJson:Object.assign({},t),tileLoadFunction:s});un[n]=r}return r}function pn(t,e,i,n){const r=document.createElement("canvas"),s=[2*i*e.pixelRatio+e.width,2*i*e.pixelRatio+e.height];r.width=s[0],r.height=s[1];const o=r.getContext("2d");o.drawImage(t,e.x,e.y,e.width,e.height,i*e.pixelRatio,i*e.pixelRatio,e.width,e.height);const a=o.getImageData(0,0,s[0],s[1]);o.globalCompositeOperation="destination-over",o.fillStyle=`rgba(${255*n.r},${255*n.g},${255*n.b},${n.a})`;const l=a.data;for(let t=0,n=a.width;t0&&o.arc(t,r,i*e.pixelRatio,0,2*Math.PI);return o.fill(),r}function fn(t,e,i){const n=Math.max(0,Math.min(1,(i-t)/(e-t)));return n*n*(3-2*n)}function gn(t,e,i){const n=document.createElement("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(t,e.x,e.y,e.width,e.height,0,0,e.width,e.height);const s=r.getImageData(0,0,e.width,e.height),o=s.data;for(let t=0,e=s.width;t0?(o[r+0]=Math.round(255*i.r*l),o[r+1]=Math.round(255*i.g*l),o[r+2]=Math.round(255*i.b*l),o[r+3]=Math.round(255*l)):o[r+3]=0}return r.putImageData(s,0,0),n}const mn=Array(256).join(" ");function yn(t,e){if(e>=.05){let i="";const n=t.split("\n"),r=mn.slice(0,Math.round(e/.1));for(let t=0,e=n.length;t0&&(i+="\n"),i+=n[t].split("").join(r);return i}return t}let _n;function vn(){return _n||(_n=on(1,1).getContext("2d")),_n}function xn(t,e){return vn().measureText(t).width+(t.length-1)*e}const bn={};function wn(t,e,i,n){if(-1!==t.indexOf("\n")){const r=t.split("\n"),s=[];for(let t=0,o=r.length;t1){const t=vn();t.font=e;const r=t.measureText("M").width*i;let a="";const l=[];for(let t=0,e=o.length;t1;++t){const i=l[t];if(xn(i,n)<.35*r){const r=t>0?xn(l[t-1],n):1/0,s=t.7*r&&xn(s,n)<.6*r){const o=i.split(" "),a=o.pop();xn(a,n)<.2*r&&(l[t]=o.join(" "),l[t+1]=a+" "+s),e-=1}}s=l.join("\n")}else s=t;s=yn(s,n),bn[r]=s}return s}const Cn=/font-family: ?([^;]*);/,En=/("|')/g;let Tn;function Sn(t){if(!Tn){Tn={};const t=document.styleSheets;for(let e=0,i=t.length;e`${t.key}: ${t.message}`)).join(", "));return i.value},Ln={},An={zoom:0};let On,Fn;function jn(t,e,i,n,r,s,o){const a=t.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[a]||(s[a]={});const l=s[a];if(!l[i]){let n=(t[e]||Ln)[i];const r=fi[`${e}_${t.type}`][i];void 0===n&&(n=r.default);let s=(h=n,Array.isArray(h)&&h.length>0&&"string"==typeof h[0]&&h[0]in ni);if(!s&&oi(n)&&(n=function(t,e){let i=t.stops;if(!i)return function(t,e){const i=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",i]:i;if("enum"===e.type)return["match",i,Object.keys(e.values),i,t.default];{const n=["color"===e.type?"to-color":e.type,i,T(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}}(t,e);const n=i&&"object"==typeof i[0][0],r=n||void 0!==t.property,s=n||!r;return i=i.map((t=>!r&&e.tokens&&"string"==typeof t[1]?[t[0],L(t[1])]:[t[0],T(t[1])])),n?function(t,e,i){const n={},r={},s=[];for(let e=0;et.blob())).then((t=>{i=URL.createObjectURL(t),e.src=i})).catch((()=>{})):(e.crossOrigin="anonymous",e.src=l,i&&URL.revokeObjectURL(i)),e.onload=function(){u=e,d=[e.width,e.height],t.changed(),e.onload=null}}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){const t=self;t.postMessage({action:"loadImage",src:l}),t.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===l&&(u=t.data.image,d=[u.width,u.height])}))}const f=Pi(e.layers),g={},m=[],b={},w={},C=nn(e),E=function(t){let e=Qi[t.id];return e||(e={},Qi[en(t)]=e),e}(e);let T;for(let t=0,n=f.length;t=F.maxzoom)continue;const z=F.filter;if(!z||Dn(j,z,P,I,E)){let n,f,E,T,j,z;A=F;const N=g.index;if(3==M&&("fill"==F.type||"fill-extrusion"==F.type))if(f=jn(F,"paint",F.type+"-opacity",I,P,C,L),F.type+"-pattern"in D){const t=jn(F,"paint",F.type+"-pattern",I,P,C,L);if(t){const e="string"==typeof t?qn(t,m):t.toString();if(u&&a&&a[e]){++O,z=k[O],z&&z.getFill()&&!z.getStroke()&&!z.getText()||(z=new v.ZP({fill:new s.Z}),k[O]=z),E=z.getFill(),z.setZIndex(N);const t=e+"."+f;let i=w[t];if(!i){const n=a[e],r=on(n.width,n.height),s=r.getContext("2d");s.globalAlpha=f,s.drawImage(u,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i=s.createPattern(r,"repeat"),w[t]=i}E.setColor(i)}}}else n=Nn(jn(F,"paint",F.type+"-color",I,P,C,L),f),F.type+"-outline-color"in D&&(j=Nn(jn(F,"paint",F.type+"-outline-color",I,P,C,L),f)),j||(j=n),(n||j)&&(++O,z=k[O],(!z||n&&!z.getFill()||!n&&z.getFill()||j&&!z.getStroke()||!j&&z.getStroke()||z.getText())&&(z=new v.ZP({fill:n?new s.Z:void 0,stroke:j?new _.Z:void 0}),k[O]=z),n&&(E=z.getFill(),E.setColor(n)),j&&(T=z.getStroke(),T.setColor(j),T.setWidth(.5)),z.setZIndex(N));if(1!=M&&"line"==F.type){n=!("line-pattern"in D)&&"line-color"in D?Nn(jn(F,"paint","line-color",I,P,C,L),jn(F,"paint","line-opacity",I,P,C,L)):void 0;const t=jn(F,"paint","line-width",I,P,C,L);n&&t>0&&(++O,z=k[O],z&&z.getStroke()&&!z.getFill()&&!z.getText()||(z=new v.ZP({stroke:new _.Z}),k[O]=z),T=z.getStroke(),T.setLineCap(jn(F,"layout","line-cap",I,P,C,L)),T.setLineJoin(jn(F,"layout","line-join",I,P,C,L)),T.setMiterLimit(jn(F,"layout","line-miter-limit",I,P,C,L)),T.setColor(n),T.setWidth(t),T.setLineDash(D["line-dasharray"]?jn(F,"paint","line-dasharray",I,P,C,L).map((function(e){return e*t})):null),z.setZIndex(N))}let G,q,W,U,X,V,Y,B,K,H=!1,$=null,J=0;if((1==M||2==M)&&"icon-image"in Z){const e=jn(F,"layout","icon-image",I,P,C,L);if(e){let n;G="string"==typeof e?qn(e,m):e.toString();const r=c?c(t,G):void 0;if(u&&a&&a[G]||r){const t=jn(F,"layout","icon-rotation-alignment",I,P,C,L);if(2==M){const e=i.getGeometry();if(e.getFlatMidpoint||e.getFlatMidpoints){const i=e.getExtent();if(Math.sqrt(Math.max(Math.pow((i[2]-i[0])/l,2),Math.pow((i[3]-i[1])/l,2)))>150){const i="MultiLineString"===e.getType()?e.getFlatMidpoints():e.getFlatMidpoint();if(Fn||(On=[NaN,NaN],Fn=new y("Point",On,[],{},null)),n=Fn,On[0]=i[0],On[1]=i[1],"line"===jn(F,"layout","symbol-placement",I,P,C,L)&&"map"===t){const t=e.getStride(),n=e.getFlatCoordinates();for(let e=0,r=n.length-t;e=l&&i[0]<=c&&i[1]>=h&&i[1]<=u){J=Math.atan2(s-a,o-r);break}}}}}}if(2!==M||n){const e=jn(F,"layout","icon-size",I,P,C,L),i=void 0!==D["icon-color"]?jn(F,"paint","icon-color",I,P,C,L):null;if(!i||0!==i.a){const n=jn(F,"paint","icon-halo-color",I,P,C,L),s=jn(F,"paint","icon-halo-width",I,P,C,L);let l=`${G}.${e}.${s}.${n}`;if(null!==i&&(l+=`.${i}`),q=b[l],!q){const h=Zn(F,I,P,C);let c;"icon-offset"in Z&&(c=jn(F,"layout","icon-offset",I,P,C,L).slice(0),c[1]*=-1);let f=i?[255*i.r,255*i.g,255*i.b,i.a]:void 0;if(r){const e={color:f,rotateWithView:"map"===t,displacement:c,declutterMode:h};"string"==typeof r?e.src=r:(e.img=r,e.imgSize=[r.width,r.height]),q=new o.Z(e)}else{const r=a[G];let l,g,m;s?r.sdf?(l=pn(gn(u,r,i),{x:0,y:0,width:r.width,height:r.height,pixelRatio:r.pixelRatio},s,n),f=void 0):l=pn(u,r,s,n):(r.sdf?(p||(p=gn(u,{x:0,y:0,width:d[0],height:d[1]},{r:1,g:1,b:1,a:1})),l=p):l=u,g=[r.width,r.height],m=[r.x,r.y]),q=new o.Z({color:f,img:l,imgSize:d,size:g,offset:m,rotateWithView:"map"===t,scale:e/r.pixelRatio,displacement:c,declutterMode:h})}b[l]=q}}q&&(++O,z=k[O],z&&z.getImage()&&!z.getFill()&&!z.getStroke()||(z=new v.ZP,k[O]=z),z.setGeometry(n),q.setRotation(J+rn(jn(F,"layout","icon-rotate",I,P,C,L))),q.setOpacity(jn(F,"paint","icon-opacity",I,P,C,L)),q.setAnchor(Mn[jn(F,"layout","icon-anchor",I,P,C,L)]),z.setImage(q),$=z.getText(),z.setText(void 0),z.setZIndex(N),H=!0,W=!1)}else W=!0}}}if(1==M&&"circle"===F.type){++O,z=k[O],z&&z.getImage()&&!z.getFill()&&!z.getStroke()||(z=new v.ZP,k[O]=z);const t="circle-radius"in D?jn(F,"paint","circle-radius",I,P,C,L):5,e=Nn(jn(F,"paint","circle-stroke-color",I,P,C,L),jn(F,"paint","circle-stroke-opacity",I,P,C,L)),i=Nn(jn(F,"paint","circle-color",I,P,C,L),jn(F,"paint","circle-opacity",I,P,C,L)),n=jn(F,"paint","circle-stroke-width",I,P,C,L),o=t+"."+e+"."+i+"."+n;q=b[o],q||(q=new r.Z({radius:t,stroke:e&&n>0?new _.Z({width:n,color:e}):void 0,fill:i?new s.Z({color:i}):void 0,declutterMode:"none"}),b[o]=q),z.setImage(q),$=z.getText(),z.setText(void 0),z.setGeometry(void 0),z.setZIndex(N),H=!0}if("text-field"in Z){Y=Math.round(jn(F,"layout","text-size",I,P,C,L));const t=jn(F,"layout","text-font",I,P,C,L);V=jn(F,"layout","text-line-height",I,P,C,L),X=Li(h?h(t,e.metadata?e.metadata["ol:webfonts"]:void 0):t,Y,V),X.includes("sans-serif")||(X+=",sans-serif"),B=jn(F,"layout","text-letter-spacing",I,P,C,L),K=jn(F,"layout","text-max-width",I,P,C,L);const i=jn(F,"layout","text-field",I,P,C,L);U="object"==typeof i&&i.sections?1===i.sections.length?i.toString():i.sections.reduce(((e,i,n)=>{const r=i.fontStack?i.fontStack.split(","):t,s=Li(h?h(r):r,Y*(i.scale||1),V);let o=i.text;if("\n"===o)return e.push("\n",""),e;if(2!=M){o=wn(o,s,K,B).split("\n");for(let t=0,i=o.length;t0&&e.push("\n",""),e.push(o[t],s);return e}e.push(yn(o,B),s)}),[]):qn(i,m).trim(),f=jn(F,"paint","text-opacity",I,P,C,L)}if(U&&f&&!W){H||(++O,z=k[O],z&&z.getText()&&!z.getFill()&&!z.getStroke()||(z=new v.ZP,k[O]=z),z.setImage(void 0),z.setGeometry(void 0)),z.getText()||z.setText($||new x.Z({padding:[2,2,2,2]})),$=z.getText();const t=Z["text-transform"];"uppercase"==t?U=Array.isArray(U)?U.map(((t,e)=>e%2?t:t.toUpperCase())):U.toUpperCase():"lowercase"==t&&(U=Array.isArray(U)?U.map(((t,e)=>e%2?t:t.toLowerCase())):U.toLowerCase());const e=Array.isArray(U)?U:2==M?yn(U,B):wn(U,X,K,B);$.setText(e),$.setFont(X),$.setRotation(rn(jn(F,"layout","text-rotate",I,P,C,L)));const i=jn(F,"layout","text-anchor",I,P,C,L),n=H||1==M?"point":jn(F,"layout","symbol-placement",I,P,C,L);let r;if("line-center"===n?($.setPlacement("line"),r="center"):$.setPlacement(n),"line"===n&&"function"==typeof $.setRepeat){const t=jn(F,"layout","symbol-spacing",I,P,C,L);$.setRepeat(2*t)}$.setOverflow("point"===n);let s=jn(F,"paint","text-halo-width",I,P,C,L);const o=jn(F,"layout","text-offset",I,P,C,L),a=jn(F,"paint","text-translate",I,P,C,L);let l=0,h=0;if("point"==n){r="center",-1!==i.indexOf("left")?(r="left",h=s):-1!==i.indexOf("right")&&(r="right",h=-s);const t=jn(F,"layout","text-rotation-alignment",I,P,C,L);$.setRotateWithView("map"==t)}else $.setMaxAngle(rn(jn(F,"layout","text-max-angle",I,P,C,L))*U.length/e.length),$.setRotateWithView(!1);$.setTextAlign(r);let c="middle";0==i.indexOf("bottom")?(c="bottom",l=-s-.5*(V-1)*Y):0==i.indexOf("top")&&(c="top",l=s+.5*(V-1)*Y),$.setTextBaseline(c);const u=jn(F,"layout","text-justify",I,P,C,L);$.setJustify("auto"===u?void 0:u),$.setOffsetX(o[0]*Y+h+a[0]),$.setOffsetY(o[1]*Y+l+a[1]),R.setColor(Nn(jn(F,"paint","text-color",I,P,C,L),f)),$.setFill(R);const d=Nn(jn(F,"paint","text-halo-color",I,P,C,L),f);if(d){S.setColor(d),s*=2;const t=.5*Y;S.setWidth(s<=t?s:t),$.setStroke(S)}else $.setStroke(void 0);const p=jn(F,"layout","text-padding",I,P,C,L),g=$.getPadding();p!==g[0]&&(g[0]=p,g[1]=p,g[2]=p,g[3]=p),z.setZIndex(N)}}}return O>-1?(k.length=O+1,Wn&&("set"in i?i.set("mapbox-layer",A):i.getProperties()["mapbox-layer"]=A),k):void 0};return t.setStyle(I),t.set("mapbox-source",T),t.set("mapbox-layers",m),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),I}var Vn=i(9239),Yn=i(1295);class Bn extends Yn.Z{constructor(t){super(t=t||{})}}const Kn=Bn;var Hn=i(8015),$n=i(553),Jn=i(7755);class Qn extends Hn.Z{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,s=this.getLayer().getSource(),o=t.viewHints;let a=t.extent;if(void 0!==e.extent&&(a=(0,l.Ed)(a,(0,u.dY)(e.extent,n.projection))),!o[Jn.Z.ANIMATING]&&!o[Jn.Z.INTERACTING]&&!(0,l.xb)(a))if(s){const t=n.projection,e=s.getImage(a,r,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===$n.Z.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,a.nn)(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!(0,l.b8)(r,n))return null;const s=this.image_.getExtent(),o=this.image_.getImage(),h=(0,l.dz)(s),c=Math.floor(o.width*((n[0]-s[0])/h));if(c<0||c>=o.width)return null;const u=(0,l.Cr)(s),d=Math.floor(o.height*((s[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,c,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),r=i.getResolution(),[s,o]=Array.isArray(r)?r:[r,r],h=i.getPixelRatio(),c=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,p=t.viewState,f=p.center,g=p.resolution,m=d*s/(g*h),y=d*o/(g*h),_=t.extent,v=p.resolution,x=p.rotation,b=Math.round((0,l.dz)(_)/v*d),w=Math.round((0,l.Cr)(_)/v*d);(0,a.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/d,1/d,x,-b/2,-w/2),(0,a.nb)(this.inversePixelTransform,this.pixelTransform);const C=(0,a.BB)(this.pixelTransform);this.useContainer(e,C,this.getBackground(t));const E=this.context,T=E.canvas;T.width!=b||T.height!=w?(T.width=b,T.height=w):this.containerReused||E.clearRect(0,0,b,w);let S=!1,R=!0;if(c.extent){const e=(0,u.dY)(c.extent,p.projection);R=(0,l.kK)(e,t.extent),S=R&&!(0,l.r4)(e,t.extent),S&&this.clipUnrotated(E,t,e)}const k=i.getImage(),I=(0,a.qC)(this.tempTransform,b/2,w/2,m,y,0,h*(n[0]-f[0])/s,h*(f[1]-n[3])/o);this.renderedResolution=o*d/h;const M=k.width*I[0],P=k.height*I[3];if(this.getLayer().getSource().getInterpolate()||(E.imageSmoothingEnabled=!1),this.preRender(E,t),R&&M>=.5&&P>=.5){const t=I[4],e=I[5],i=c.opacity;let n;1!==i&&(n=E.globalAlpha,E.globalAlpha=i),E.drawImage(k,0,0,+k.width,+k.height,t,e,M,P),1!==i&&(E.globalAlpha=n)}return this.postRender(E,t),S&&E.restore(),E.imageSmoothingEnabled=!0,C!==T.style.transform&&(T.style.transform=C),this.container}}const tr=Qn,er=class extends Kn{constructor(t){super(t)}createRenderer(){return new tr(this)}getData(t){return super.getData(t)}};var ir=i(8734),nr=i(9646),rr=i(2083),sr=i(7403),or=i(6259),ar=i(5063),lr=i(3614),hr=i(188),cr=i(3083),ur=i(9619),dr=i(974);class pr extends nr.ZP{constructor(t){super(),t=t||{},this.dataProjection=new ur.Z({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:y,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,i,n){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,o=0,a=0,l=0,h=0,c=0;for(;t.pos>3}if(o--,1===s||2===s)a+=t.readSVarint(),l+=t.readSVarint(),1===s&&h>c&&(n.push(h),c=h),i.push(a,l),h+=2;else{if(7!==s)throw new Error("Invalid command found in the PBF");h>c&&(i.push(i[c],i[c+1]),h+=2)}}h>c&&(n.push(h),c=h)}createFeature_(t,e,i){const n=e.type;if(0===n)return null;let r;const s=e.properties;let o;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;const a=[],l=[];this.readRawGeometry_(t,e,a,l);const h=function(t,e){let i;return 1===t?i=1===e?"Point":"MultiPoint":2===t?i=1===e?"LineString":"MultiLineString":3===t&&(i="Polygon"),i}(n,l.length);if(this.featureClass_===y)r=new this.featureClass_(h,a,l,s,o),r.transform(i.dataProjection);else{let t;if("Polygon"==h){const e=(0,dr.Q3)(a,l);t=e.length>1?new ar.Z(a,"XY",e):new cr.ZP(a,"XY",l)}else t="Point"===h?new hr.Z(a,"XY"):"LineString"===h?new rr.Z(a,"XY"):"MultiPoint"===h?new or.Z(a,"XY"):"MultiLineString"===h?new sr.Z(a,"XY",l):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);const e=(0,nr.fI)(t,!1,i);r.setGeometry(e),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const i=this.layers_;e=this.adaptOptions(e);const n=(0,u.U2)(e.dataProjection);n.setWorldExtent(e.extent),e.dataProjection=n;const r=new lr(t),s=r.readFields(fr,{}),o=[];for(const t in s){if(i&&!i.includes(t))continue;const a=s[t],l=a?[0,0,a.extent,a.extent]:null;n.setExtent(l);for(let t=0,i=a.length;t>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function mr(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t){const t=i.readVarint()+i.pos;for(;i.posthis.getImageInternal(t,e,i,r)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const n=function(t,e,i,n){const r=e/i,s=(0,l.qg)(t),o=(0,zi.mD)((0,l.dz)(t)/r,4),a=(0,zi.mD)((0,l.Cr)(t)/r,4),h=o+2*(0,zi.mD)(0*o/2,4),c=a+2*(0,zi.mD)(0*a/2,4);return(0,l.p8)(s,r,0,[h,c])}(t,e,i),r=this.findNearestResolution(e);if(this.image&&(this.static_||(this.wantedExtent_&&(0,l.r4)(this.wantedExtent_,n)||(0,l.r4)(this.image.getExtent(),n))&&(this.wantedResolution_&&Ir(this.wantedResolution_)===r||Ir(this.image.getResolution())===r)))return this.image;this.wantedExtent_=n,this.wantedResolution_=r,this.image=new Cr.ZP(n,r,i,this.loader),this.image.addEventListener(wr.Z.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case $n.Z.LOADING:this.loading=!0,i="imageloadstart";break;case $n.Z.LOADED:this.loading=!1,i="imageloadend";break;case $n.Z.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new Or(i,e))}}const jr=Fr;var Zr=i(8280);class Dr extends Yn.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(Zr.Z.PRELOAD)}setPreload(t){this.set(Zr.Z.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Zr.Z.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Zr.Z.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const zr=Dr;var Nr=i(8845);const Gr=class extends zr{constructor(t){super(t)}createRenderer(){return new Nr.Z(this)}};var qr=i(2918);const Wr=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,Di.h)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,Di.h)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,Di.h)(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}},Ur=class extends Wr{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=Wi(this.peekFirstKey())[0];this.forEach((e=>{e.tileCoord[0]!==t&&(this.remove(qi(e.tileCoord)),e.release())}))}};var Xr=i(2519),Vr=i(4768),Yr=i(3746),Br=i(4307);const Kr=[0,0,0],Hr=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,Di.h)((0,h.pT)(this.resolutions_,(function(t,e){return e-t}),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t=this.minZoom;){if(2===this.zoomFactor_?(s=Math.floor(s/2),o=Math.floor(o/2),r=(0,Xr.T)(s,s,o,o,i)):r=this.getTileRangeForExtentAndZ(a,l,i),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e0?n:Math.max(s/i[0],r/i[1]);const o=e+1,a=new Array(o);for(let t=0;ti||i>e.getMaxZoom())return!1;const s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class is extends br.ZP{constructor(t,e){super(t),this.tile=e}}const ns=es;var rs=i(8326);let ss,os=!0;try{new ImageData(10,10)}catch(t){os=!1}function as(t){let e=!0;try{new ImageData(10,10)}catch(t){e=!1}function i(t,i,n){return e?new ImageData(t,i,n):{data:t,width:i,height:n}}return function(e){const n=e.buffers,r=e.meta,s=e.imageOps,o=e.width,a=e.height,l=n.length,h=n[0].byteLength;if(s){const e=new Array(l);for(let t=0;tthis._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||0===this._queue.length)return;const t=this._queue.shift();this._job=t;const e=t.inputs[0].width,i=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),r=this._workers.length;if(this._running=r,1===r)return void this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:i},n);const s=t.inputs[0].data.length,o=4*Math.ceil(s/4/r);for(let s=0;sthis.getTileInternal(t,e,i,n,s)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return g.key=c,l?(g.interimTile=l,g.refreshInterimChain(),o.replace(h,g)):o.set(h,g),g}getTileInternal(t,e,i,n,r){let s=null;const o=Gi(t,e,i),a=this.getKey();if(this.tileCache.containsKey(o)){if(s=this.tileCache.get(o),s.key!=a){const l=s;s=this.createTile_(t,e,i,n,r,a),l.getState()==Oi.Z.IDLE?s.interimTile=l.interimTile:s.interimTile=l,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.createTile_(t,e,i,n,r,a),this.tileCache.set(o,s);return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,u.U2)(t);if(i){const t=(0,Yi.sq)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}},ws=class extends bs{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,u.U2)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)!function(t,e,i,n){const r=document.createElement("script"),s="olc_"+(0,Yi.sq)(e);function o(){delete window[s],r.parentNode.removeChild(r)}r.async=!0,r.src=t+(t.includes("?")?"&":"?")+"callback="+s;const a=setTimeout((function(){o(),i&&i()}),1e4);window[s]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(r)}(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else{if(!t.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(t.tileJSON)}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,u.U2)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=(0,u.WO)(e,i);n=(0,l.Ne)(t.bounds,r)}const r=ts(i),s=t.minzoom||0,o=Jr({extent:r,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.tileSize_});if(this.tileGrid=o,this.tileUrlFunction=Xi(t.tiles,o),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:r;this.setAttributions((function(i){return(0,l.kK)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var Cs=i(6333),Es=i(3107),Ts=i(156);const Ss=[];class Rs extends Fi.Z{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=(0,Yi.sq)(t);return e in this.context_||(this.context_[e]=(0,rs.E4)(1,1,Ss)),this.context_[e]}hasContext(t){return(0,Yi.sq)(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=(0,Yi.sq)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];(0,rs.jy)(e),Ss.push(e.canvas),delete this.context_[t]}super.release()}}const ks=Rs;var Is=i(9374),Ms=i(7537);const Ps=class extends vs{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||ts(e),n=t.tileGrid||Jr({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Ls,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Ur(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:Zi,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=Wi(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==Oi.Z.LOADED)return;const s=i.getSourceTiles();for(let i=0,n=s.length;i{const n=function(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return Gi(e,i,n)}(e),r=i.peek(n);if(r){const e=r.sourceTiles;for(let i=0,n=e.length;i{const r=this.tileUrlFunction(n,t,e),s=this.sourceTileCache.containsKey(r)?this.sourceTileCache.get(r):new this.tileClass(n,r?Oi.Z.IDLE:Oi.Z.EMPTY,r,this.format_,this.tileLoadFunction);i.sourceTiles.push(s);const o=s.getState();if(o{this.handleTileChange(e);const n=s.getState();if(n===Oi.Z.LOADED||n===Oi.Z.ERROR){const e=s.getKey();e in i.errorTileKeys?s.getState()===Oi.Z.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,n===Oi.Z.ERROR?i.errorTileKeys[e]=!0:s.removeEventListener(wr.Z.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,Is.x)(i.errorTileKeys)?Oi.Z.LOADED:Oi.Z.ERROR)}};s.addEventListener(wr.Z.CHANGE,t),i.loadingSourceTiles++}o===Oi.Z.IDLE&&(s.extent=h.getTileCoordExtent(n),s.projection=e,s.resolution=h.getResolution(n[0]),this.sourceTileCache.set(r,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===Oi.Z.ERROR))?Oi.Z.ERROR:Oi.Z.LOADED)}return i.sourceTiles}getTile(t,e,i,n,r){const s=Gi(t,e,i),o=this.getKey();let a;if(this.tileCache.containsKey(s)&&(a=this.tileCache.get(s),a.key===o))return a;const h=[t,e,i];let c=this.getTileCoordForTileUrlFunction(h,r);const u=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(r);if(c&&u){const e=d.getTileCoordExtent(c);(0,l.f3)(e,-d.getResolution(t),e),(0,l.kK)(u,e)||(c=null)}let p=!0;if(null!==c){const e=this.tileGrid,i=d.getResolution(t),s=e.getZForResolution(i,1),o=d.getTileCoordExtent(c);(0,l.f3)(o,-i,o),e.forEachTileCoord(o,s,(t=>{p=p&&!this.tileUrlFunction(t,n,r)}))}const f=new ks(h,p?Oi.Z.EMPTY:Oi.Z.IDLE,c,this.getSourceTiles.bind(this,n,r));return f.key=o,a?(f.interimTile=a,f.refreshInterimChain(),this.tileCache.replace(s,f)):this.tileCache.set(s,f),f}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),r=n.map((function(e,i){return t.getOrigin(i)})),s=n.map((function(e,i){return t.getTileSize(i)})),o=Vr.e+1;for(let t=n.length;td?u-A+d:d-A,L=Math.atan(Math.sqrt(M*M+P*P)),q=m*Math.cos(L)+g*Math.sin(L)*Math.cos(f-A),O=Math.cos(L),F=255*q,z=Math.min(Math.max(2*e.sunEl,0),1),N=1.875-1.75*e.opacity,G=.5!==e.opacity?d*((Math.pow(N,L)-1)/(Math.pow(N,d)-1)):L,Z={r:(1-O)*v.r*z*255,g:(1-O)*v.g*z*255,b:(1-O)*v.b*z*255,a:(1-O)*v.a*z*255},j=Math.abs(((A+f)/Math.PI+.5)%2-1),D={r:(y.r*(1-j)+_.r*j)*F,g:(y.g*(1-j)+_.g*j)*F,b:(y.b*(1-j)+_.b*j)*F,a:(y.a*(1-j)+_.a*j)*F},R=4*(w*n+b),o[R]=Z.r*(1-j)+D.r,o[R+1]=Z.g*(1-j)+D.g,o[R+2]=Z.b*(1-j)+D.b,o[R+3]=s[R+3]*e.opacity*z*Math.sin(G);return new ImageData(o,n,r)}function js(t,e=512){return t.getExtent()?Jr({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():sn}function Zs(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach(((t,i)=>{e.accessToken=t,e.accessTokenParam=i}))),e}function Ds(t,e,i="",n={},r=undefined){let s,o,a,l,h=!0;return"string"==typeof i||Array.isArray(i)?l=i:(a=i,l=a.source||a.layers,n=a),"string"==typeof n?(s=n,a={}):(s=n.styleUrl,a=n),!1===a.updateSource&&(h=!1),r||(r=a.resolutions),s||"string"!=typeof e||e.trim().startsWith("{")||(s=e),s&&(s=s.startsWith("data:")?location.href:Hi(s,a.accessToken),a=Zs(s,a)),new Promise((function(i,n){cn(e,a).then((function(e){if(8!=e.version)return n(new Error("glStyle version 8 required."));if(!(t instanceof Cs.Z||t instanceof Ts.Z))return n(new Error("Can only apply to VectorLayer or VectorTileLayer"));const c=t instanceof Ts.Z?"vector":"geojson";if(l?o=Array.isArray(l)?e.layers.find((function(t){return t.id===l[0]})).source:l:(o=Object.keys(e.sources).find((function(t){return e.sources[t].type===c})),l=o),!o)return n(new Error(`No ${c} source found in the glStyle.`));function d(){if(!h)return Promise.resolve();if(t instanceof Ts.Z)return Xs(e.sources[o],s,a).then((function(e){const i=t.getSource();if(i?e!==i&&(i.setTileUrlFunction(e.getTileUrlFunction()),"function"==typeof i.setUrls&&"function"==typeof e.getUrls&&i.setUrls(e.getUrls()),i.format_||(i.format_=e.format_),i.getAttributions()||i.setAttributions(e.getAttributions()),i.getTileLoadFunction()===Ls&&i.setTileLoadFunction(e.getTileLoadFunction()),(0,u.OP)(i.getProjection(),e.getProjection())&&(i.tileGrid=e.getTileGrid())):t.setSource(e),!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())){const e=t.getSource().getTileGrid();t.setMaxResolution(e.getResolution(e.getMinZoom()))}}));const i=e.sources[o];let n=t.getSource();n&&n.get("mapbox-source")===i||(n=Bs(i,s,a));const r=t.getSource();return r?n!==r&&(r.getAttributions()||r.setAttributions(n.getAttributions()),r.format_||(r.format_=n.getFormat()),r.url_=n.getUrl()):t.setSource(n),Promise.resolve()}let p,f,g,m;function y(){if(m||e.sprite&&!f)m?(t.setStyle(m),d().then(i).catch(n)):n(new Error("Something went wrong trying to apply style."));else{if(a.projection&&!r){const t=(0,u.U2)(a.projection).getUnits();"m"!==t&&(r=sn.map((e=>e/u.Wm[t])))}m=Xn(t,e,l,r,f,g,kn,a.getImage),t.getStyle()?d().then(i).catch(n):n(new Error(`Nothing to show for source [${o}]`))}}if(e.sprite){const t=new URL(function(t,e,i){const n=Ki(t);if(!n)return decodeURI(new URL(t,i).href);const r="sprites/";if(0!==n.indexOf(r))throw new Error(`unexpected sprites url: ${t}`);const s=n.slice(r.length);return`${Bi}/styles/v1/${s}/sprite?access_token=${e}`}(e.sprite,a.accessToken,s||location.href));p=window.devicePixelRatio>=1.5?.5:1;const i=.5==p?"@2x":"";let r=t.origin+t.pathname+i+".json"+t.search;new Promise((function(e,i){hn("Sprite",r,a).then(e).catch((function(n){r=t.origin+t.pathname+".json"+t.search,hn("Sprite",r,a).then(e).catch(i)}))})).then((function(e){if(void 0===e&&n(new Error("No sprites found.")),f=e,g=t.origin+t.pathname+i+".png"+t.search,a.transformRequest){const t=a.transformRequest(g,"SpriteImage")||g;t instanceof Request&&(g=t)}y()})).catch((function(t){n(new Error(`Sprites cannot be loaded: ${r}: ${t.message}`))}))}else y()})).catch(n)}))}const zs={};function Ns(t,e,i={}){return cn(e,i).then((function(e){!function(t,e,i){e.layers.some((function(e){if("background"===e.type){if(t instanceof Yn.Z)return t.setBackground((function(t){return Ws(e,t,i,{})})),!0;if(t instanceof vr.Z||t instanceof ir.Z)return t.getLayers().push(Us(e,i,{})),!0}}))}(t,e,i)}))}function Gs(t,e){let i;return t.some((function(t){if(t.id==e)return i=t.source,!0})),i}function qs(t,e,i){const n=new ws({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),r=n.getTileJSON(),s=n.getTileGrid(),o=(0,u.U2)(i.projection||"EPSG:3857"),a=function(t,e){const i=t.bounds;if(i){const t=(0,u.mi)([i[0],i[1]],e),n=(0,u.mi)([i[2],i[3]],e);return[t[0],t[1],n[0],n[1]]}return(0,u.U2)(e).getExtent()}(r,o),h=o.getExtent(),c=r.minzoom||0,d=r.maxzoom||22,p={attributions:n.getAttributions(),projection:o,tileGrid:new Hr({origin:h?(0,l.rL)(h):s.getOrigin(0),extent:a||s.getExtent(),minZoom:c,resolutions:js(o,e.tileSize).slice(0,d+1),tileSize:s.getTileSize(0)})};return Array.isArray(r.tiles)?p.urls=r.tiles:p.url=r.tiles,p}function Ws(t,e,i,n){const r={id:t.id,type:t.type},s=t.layout||{},o=t.paint||{};r.paint=o;const a=an(e,i.resolutions||sn);let l,h;return void 0!==o["background-color"]&&(l=jn(r,"paint","background-color",a,zs,n)),void 0!==o["background-opacity"]&&(h=jn(r,"paint","background-opacity",a,zs,n)),"none"==s.visibility?void 0:Nn(l,h)}function Us(t,e,i){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new Yn.Z({source:new Ar.Z({}),render(r){const s=Ws(t,r.viewState.resolution,e,i);return n.style.backgroundColor=s,n}})}function Xs(t,e,i){return new Promise((function(n,r){dn(t,e,i).then((function({tileJson:e,tileLoadFunction:r}){const s=qs(t,e,i);s.tileLoadFunction=r,s.format=new _r,n(new Ps(s))})).catch(r)}))}function Vs(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function Ys(t,e,i){const n=new Gr;return dn(t,e,i).then((function({tileJson:e,tileLoadFunction:r}){const s=new ws({interpolate:void 0===i.interpolate||i.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:e});s.tileGrid=qs(t,e,i).tileGrid,i.projection&&(s.projection=(0,u.U2)(i.projection));const o=s.getTileUrlFunction();r&&s.setTileLoadFunction(r),s.setTileUrlFunction((function(t,e,i){const n=Vs(i);let r=o(t,e,i);if(-1!=r.indexOf(n)){const e=s.getTileGrid().getTileCoordExtent(t);r=r.replace(n,e.toString())}return r})),s.set("mapbox-source",t),n.setSource(s)})).catch((function(t){n.setSource(void 0)})),n}function Bs(t,e,i){const n=i.projection?new Vn.Z({dataProjection:i.projection}):new Vn.Z,r=t.data,s={};if("string"==typeof r){const s=$i(r,i.accessToken,i.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const e=(t,e,i)=>{const n=Vs(i);return s.replace(n,`${t.join(",")}`)},r=new Es.Z({attributions:t.attribution,format:n,loader:(t,n,s,o,a)=>{hn("GeoJSON","function"==typeof e?e(t,n,s):e,i).then((t=>{const e=r.getFormat().readFeatures(t,{featureProjection:s});r.addFeatures(e),o(e)})).catch((e=>{r.removeLoadedExtent(t),a()}))},strategy:Os.VW});return r.set("mapbox-source",t),r}const o=new Es.Z({attributions:t.attribution,format:n,url:s,loader:(t,e,n,r,a)=>{hn("GeoJSON",s,i).then((t=>{const e=o.getFormat().readFeatures(t,{featureProjection:n});o.addFeatures(e),r(e)})).catch((e=>{o.removeLoadedExtent(t),a()}))}});return o}s.features=n.readFeatures(r,{featureProjection:(0,u.Cs)()||"EPSG:3857"});const o=new Es.Z(Object.assign({attributions:t.attribution,format:n},s));return o.set("mapbox-source",t),o}function Ks(t,e,i,n){const r=nn(t),s=t.layers,o=i.type,a=i.source||Gs(s,i.ref),l=t.sources[a];let h;if("background"==o)h=Us(i,n,r);else if("vector"==l.type)h=function(t,e,i){const n=new Ts.Z({declutter:!0,visible:!1});return Xs(t,e,i).then((function(e){e.set("mapbox-source",t),n.setSource(e)})).catch((function(t){n.setSource(void 0)})),n}(l,e,n);else if("raster"==l.type)h=Ys(l,e,n),h.setVisible(!i.layout||"none"!==i.layout.visibility),h.on("prerender",function(t,e,i){let n=null;return function(r){t.paint&&"raster-opacity"in t.paint&&r.frameState.viewState.zoom!==n&&(n=r.frameState.viewState.zoom,delete i[t.id],function(t,e,i,n){const r=jn(t,"paint","raster-opacity",i,zs,n);e.setOpacity(r)}(t,e,n,i))}}(i,h,r));else if("geojson"==l.type)h=function(t,e,i){return new Cs.Z({declutter:!0,source:Bs(t,e,i),visible:!1})}(l,e,n);else if("raster-dem"==l.type&&"hillshade"==i.type){const t=function(t,e,i){const n=Ys(t,e,i);return new er({source:new gs({operationType:"image",operation:Fs,sources:[n]})})}(l,e,n);h=t,t.getSource().on("beforeoperations",(function(t){const e=t.data;e.resolution=t.resolution;const s=an(t.resolution,n.resolutions||sn);e.encoding=l.encoding,e.vert=5*jn(i,"paint","hillshade-exaggeration",s,zs,r),e.sunAz=jn(i,"paint","hillshade-illumination-direction",s,zs,r),e.sunEl=35,e.opacity=.3,e.highlightColor=jn(i,"paint","hillshade-highlight-color",s,zs,r),e.shadowColor=jn(i,"paint","hillshade-shadow-color",s,zs,r),e.accentColor=jn(i,"paint","hillshade-accent-color",s,zs,r)})),h.setVisible(!i.layout||"none"!==i.layout.visibility)}const c=a;return h&&h.set("mapbox-source",c),h}function Hs(t,e,i,n){const r=[];let s=null;if(e instanceof vr.Z){if(s=e.getView(),!s.isDef()&&!s.getRotation()&&!s.getResolutions()){const t=n.projection?(0,u.U2)(n.projection):s.getProjection();s=new As.ZP(Object.assign(s.getProperties(),{maxResolution:sn[0]/u.Wm[t.getUnits()],projection:n.projection||s.getProjection()})),e.setView(s)}"center"in t&&!s.getCenter()&&s.setCenter((0,u.mi)(t.center,s.getProjection())),"zoom"in t&&void 0===s.getZoom()&&s.setResolution(sn[0]/u.Wm[s.getProjection().getUnits()]/Math.pow(2,t.zoom)),s.getCenter()&&void 0!==s.getZoom()||s.fit(s.getProjection().getExtent(),{nearest:!0,size:e.getSize()})}e.set("mapbox-style",t),e.set("mapbox-metadata",{styleUrl:i,options:n});const o=t.layers;let a,l,h,c=[];for(let s=0,u=o.length;s0||i>0)&&t.setMaxResolution(Math.min(sn[o],e.getResolution(i))+1e-9),a<24&&t.setMinResolution(sn[a]+1e-9)}}else o>0&&t.setMaxResolution(sn[o]+1e-9);c instanceof Es.Z||c instanceof Ps?Ds(t,i,e,Object.assign({styleUrl:n},s)).then((function(){!function(t,e){function i(){const i=e.get("mapbox-style");if(!i)return;const n=Pi(i.layers),r=t.get("mapbox-layers"),s=n.filter((function(t){return r.includes(t.id)})).some((function(t){return!t.layout||!t.layout.visibility||"visible"===t.layout.visibility}));t.get("visible")!==s&&t.setVisible(s)}t.on("change",i),i()}(t,r),l()})).catch(h):l()}else h(new Error("Error accessing data for source "+t.get("mapbox-source")))};t.set("mapbox-layers",e);const u=r.getLayers();-1===u.getArray().indexOf(t)&&u.push(t),t.getSource()?c():t.once("change:source",c)}))}function Qs(t,e,i){const n="getLayers"in t?function(t,e){const i=[],n=t.getLayers().getArray();for(let t=0,r=n.length;t{if(!i){var o=1/0;for(c=0;c=s)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,s0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[i,r,s]},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={592:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,s,[o,a,l]=i,h=0;if(o.some((e=>0!==t[e]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var c=l(n)}for(e&&e(i);h */ diff --git a/dist/examples/common.js.map b/dist/examples/common.js.map new file mode 100644 index 00000000..71b731a2 --- /dev/null +++ b/dist/examples/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","mappings":";UAAIA,cC8BJ,SAASC,EAAWC,EAAKC,EAAKC,EAAKC,GAE/BC,KAAKC,GAAK,EAAML,EAChBI,KAAKE,GAAK,GAAOJ,EAAMF,GAAOI,KAAKC,GACnCD,KAAKG,GAAK,EAAMH,KAAKC,GAAKD,KAAKE,GAE/BF,KAAKI,GAAK,EAAMP,EAChBG,KAAKK,GAAK,GAAON,EAAMF,GAAOG,KAAKI,GACnCJ,KAAKM,GAAK,EAAMN,KAAKI,GAAKJ,KAAKK,GAE/BL,KAAKJ,IAAMA,EACXI,KAAKH,IAAME,EACXC,KAAKF,IAAMA,EACXE,KAAKD,IAAMA,CACf,CAhBAQ,EAAOC,QAAUb,EAkBjBA,EAAWc,UAAUC,aAAe,SAASC,GAEzC,QAASX,KAAKG,GAAKQ,EAAIX,KAAKE,IAAMS,EAAIX,KAAKC,IAAMU,CACrD,EAEAhB,EAAWc,UAAUG,aAAe,SAASD,GACzC,QAASX,KAAKM,GAAKK,EAAIX,KAAKK,IAAMM,EAAIX,KAAKI,IAAMO,CACrD,EAEAhB,EAAWc,UAAUI,uBAAyB,SAASF,GACnD,OAAQ,EAAMX,KAAKG,GAAKQ,EAAI,EAAMX,KAAKE,IAAMS,EAAIX,KAAKC,EAC1D,EAEAN,EAAWc,UAAUK,YAAc,SAASC,EAAGC,GAG3C,IAAIC,EAAIC,EAAIC,EAAIC,EAAIC,EAGpB,SALuB,IAAZL,IAAyBA,EAAU,MAKzCG,EAAKJ,EAAGM,EAAI,EAAGA,EAAI,EAAGA,IAAK,CAG5B,GADAD,EAAKpB,KAAKU,aAAaS,GAAMJ,EACzBO,KAAKC,IAAIH,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EACxB,OAEF,MACF,IAAK,UACL,IAAK,kBACHihD,EAAc,GACdziC,EACU,WAARlyC,EAC2D,EAErD4hD,6BACFrvC,EAASk1B,qBACfjsC,EAAS5D,KAAK88E,uBACZxiC,EACA,EACuG,EAErGgO,UACFxY,EACAitC,GAEF/8E,KAAK47E,aAAat0E,KAAK,CACrB,KAAkB+1E,OAClBH,EACAH,EACApiE,EACAmhB,EACA,OAEF97B,KAAK87E,yBAAyBx0E,KAAK,CACjC,KAAkB+1E,OAClBH,EACAH,EACApiE,EACAw7D,GAAwBr6C,EACxB,OAEF,MACF,IAAK,aACL,IAAK,SACHwe,EAAkB3/B,EAASk1B,qBAC3BmtC,EAAah9E,KAAKq8E,0BAChB/hC,EACA,EACAA,EAAgBr4C,OAChB6tC,GACA,GACA,GAEF9vC,KAAK47E,aAAat0E,KAAK,CACrB,KAAkB+1E,OAClBH,EACAF,EACAriE,EACAmhB,EACA,OAEF97B,KAAK87E,yBAAyBx0E,KAAK,CACjC,KAAkB+1E,OAClBH,EACAF,EACAriE,EACAw7D,GAAwBr6C,EACxB,OAEF,MACF,IAAK,aACHwe,EAAkB3/B,EAASk1B,qBAC3BmtC,EAAah9E,KAAKk8E,2BAA2B5hC,EAAiBxK,GAE1DktC,EAAaE,IACfl9E,KAAK47E,aAAat0E,KAAK,CACrB,KAAkB+1E,OAClBH,EACAF,EACAriE,EACAmhB,EACA,OAEF97B,KAAK87E,yBAAyBx0E,KAAK,CACjC,KAAkB+1E,OAClBH,EACAF,EACAriE,EACAw7D,GAAwBr6C,EACxB,QAGJ,MACF,IAAK,QACHwe,EAAkB3/B,EAASk1B,qBAC3B7vC,KAAK+b,YAAYzU,KAAKgzC,EAAgB,GAAIA,EAAgB,IAC1D0iC,EAAah9E,KAAK+b,YAAY9Z,OAE9BjC,KAAK47E,aAAat0E,KAAK,CACrB,KAAkB+1E,OAClBH,EACAF,EACAriE,EACAmhB,IAEF97B,KAAK87E,yBAAyBx0E,KAAK,CACjC,KAAkB+1E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AQzqG,YACN+qG,EACE,GACE9D,GACEh0G,EACA,SACA,cACAmO,EACA/mB,EACA8mH,EACAnS,KAIRyb,EAAQr+D,WACN66D,GACEh0G,EACA,QACA,eACAmO,EACA/mB,EACA8mH,EACAnS,IAGJyb,EAAQ5zD,UACN,GACEowD,GACEh0G,EACA,SACA,cACAmO,EACA/mB,EACA8mH,EACAnS,KAIN9vG,EAAM8P,SAASy7G,GACf/2D,EAAOx0D,EAAMkqF,UACblqF,EAAM00D,aAAQh/C,GACd1V,EAAMotD,UAAUphD,GAChB4/G,GAAW,EACXJ,GAAY,EAEhB,MACEA,GAAY,CAEhB,CACF,CACF,CAEA,GAAY,GAAR/pH,GAA4B,WAAfsS,EAAMtS,KAAmB,GACtCmpH,EACF5qH,EAAQy5C,EAAOmxE,GAEZ5qH,GACAA,EAAM4O,aACP5O,EAAMgpF,YACNhpF,EAAMkpF,cAENlpF,EAAQ,IAAI44D,EAAA,GACZnf,EAAOmxE,GAAgB5qH,GAEzB,MAAMusH,EACJ,kBAAmBzB,EACf/C,GACEh0G,EACA,QACA,gBACAmO,EACA/mB,EACA8mH,EACAnS,GAEF,EACA0c,EAAoBtD,GACxBnB,GACEh0G,EACA,QACA,sBACAmO,EACA/mB,EACA8mH,EACAnS,GAEFiY,GACEh0G,EACA,QACA,wBACAmO,EACA/mB,EACA8mH,EACAnS,IAGE2c,EAAcvD,GAClBnB,GACEh0G,EACA,QACA,eACAmO,EACA/mB,EACA8mH,EACAnS,GAEFiY,GACEh0G,EACA,QACA,iBACAmO,EACA/mB,EACA8mH,EACAnS,IAGE4c,EAAoB3E,GACxBh0G,EACA,QACA,sBACAmO,EACA/mB,EACA8mH,EACAnS,GAEI6c,EACJJ,EACA,IACAC,EACA,IACAC,EACA,IACAC,EACFnB,EAAUlB,EAAesC,GACpBpB,IACHA,EAAU,IAAIhzD,EAAA,EAAO,CACnBR,OAAQw0D,EACRxzD,OACEyzD,GAAqBE,EAAoB,EACrC,IAAIhzD,EAAA,EAAO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A,EAA2Br7H,GACrDxP,EAAImqI,EAASvpI,OAAQZ,IACzB2qI,EAAUR,EAASnqI,GAChB8pI,EAAoBx7H,EAAEo8H,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOb,EAAoBI,EAAEpgI,EAAO,EAGjCkhI,EAAqBr6E,KAAkC,4BAAIA,KAAkC,6BAAK,GACtGq6E,EAAmB34H,QAAQu4H,EAAqB9yH,KAAK,KAAM,IAC3DkzH,EAAmB/kI,KAAO2kI,EAAqB9yH,KAAK,KAAMkzH,EAAmB/kI,KAAK6R,KAAKkzH","sources":["webpack://ol-mapbox-style/webpack/runtime/chunk loaded","webpack://ol-mapbox-style/./node_modules/@mapbox/unitbezier/index.js","webpack://ol-mapbox-style/./node_modules/csscolorparser/csscolorparser.js","webpack://ol-mapbox-style/./node_modules/ieee754/index.js","webpack://ol-mapbox-style/./node_modules/mapbox-to-css-font/index.js","webpack://ol-mapbox-style/./node_modules/nanoassert/index.js","webpack://ol-mapbox-style/./node_modules/pbf/index.js","webpack://ol-mapbox-style/./node_modules/rbush/rbush.min.js","webpack://ol-mapbox-style/./node_modules/ol/Collection.js","webpack://ol-mapbox-style/./node_modules/ol/CollectionEventType.js","webpack://ol-mapbox-style/./node_modules/ol/Disposable.js","webpack://ol-mapbox-style/./node_modules/ol/Image.js","webpack://ol-mapbox-style/./node_modules/ol/ImageState.js","webpack://ol-mapbox-style/./node_modules/ol/ImageTile.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Map.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Composite.js","webpack://ol-mapbox-style/./node_modules/ol/MapEvent.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEvent.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEventType.js","webpack://ol-mapbox-style/./node_modules/ol/pointer/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEventHandler.js","webpack://ol-mapbox-style/./node_modules/ol/MapEventType.js","webpack://ol-mapbox-style/./node_modules/ol/MapProperty.js","webpack://ol-mapbox-style/./node_modules/ol/control/Control.js","webpack://ol-mapbox-style/./node_modules/ol/control/Attribution.js","webpack://ol-mapbox-style/./node_modules/ol/control/Rotate.js","webpack://ol-mapbox-style/./node_modules/ol/control/Zoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Property.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Interaction.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DoubleClickZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Pointer.js","webpack://ol-mapbox-style/./node_modules/ol/events/condition.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragPan.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragRotate.js","webpack://ol-mapbox-style/./node_modules/ol/render/Box.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragBox.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragZoom.js","webpack://ol-mapbox-style/./node_modules/ol/events/Key.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/KeyboardPan.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/KeyboardZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/MouseWheelZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/PinchRotate.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/PinchZoom.js","webpack://ol-mapbox-style/./node_modules/ol/Map.js","webpack://ol-mapbox-style/./node_modules/ol/control/defaults.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/defaults.js","webpack://ol-mapbox-style/./node_modules/ol/Kinetic.js","webpack://ol-mapbox-style/./node_modules/ol/Object.js","webpack://ol-mapbox-style/./node_modules/ol/ObjectEventType.js","webpack://ol-mapbox-style/./node_modules/ol/Observable.js","webpack://ol-mapbox-style/./node_modules/ol/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/structs/PriorityQueue.js","webpack://ol-mapbox-style/./node_modules/ol/TileQueue.js","webpack://ol-mapbox-style/./node_modules/ol/TileRange.js","webpack://ol-mapbox-style/./node_modules/ol/TileState.js","webpack://ol-mapbox-style/./node_modules/ol/ViewProperty.js","webpack://ol-mapbox-style/./node_modules/ol/centerconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/resolutionconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/View.js","webpack://ol-mapbox-style/./node_modules/ol/ViewHint.js","webpack://ol-mapbox-style/./node_modules/ol/array.js","webpack://ol-mapbox-style/./node_modules/ol/asserts.js","webpack://ol-mapbox-style/./node_modules/ol/color.js","webpack://ol-mapbox-style/./node_modules/ol/colorlike.js","webpack://ol-mapbox-style/./node_modules/ol/console.js","webpack://ol-mapbox-style/./node_modules/ol/coordinate.js","webpack://ol-mapbox-style/./node_modules/ol/css.js","webpack://ol-mapbox-style/./node_modules/ol/dom.js","webpack://ol-mapbox-style/./node_modules/ol/easing.js","webpack://ol-mapbox-style/./node_modules/ol/events.js","webpack://ol-mapbox-style/./node_modules/ol/events/Event.js","webpack://ol-mapbox-style/./node_modules/ol/events/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/events/Target.js","webpack://ol-mapbox-style/./node_modules/ol/extent.js","webpack://ol-mapbox-style/./node_modules/ol/extent/Relationship.js","webpack://ol-mapbox-style/./node_modules/ol/featureloader.js","webpack://ol-mapbox-style/./node_modules/ol/format/Feature.js","webpack://ol-mapbox-style/./node_modules/ol/Feature.js","webpack://ol-mapbox-style/./node_modules/ol/geom/GeometryCollection.js","webpack://ol-mapbox-style/./node_modules/ol/format/JSONFeature.js","webpack://ol-mapbox-style/./node_modules/ol/format/GeoJSON.js","webpack://ol-mapbox-style/./node_modules/ol/functions.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Geometry.js","webpack://ol-mapbox-style/./node_modules/ol/geom/LineString.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiLineString.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiPoint.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiPolygon.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Point.js","webpack://ol-mapbox-style/./node_modules/ol/geom/LinearRing.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Polygon.js","webpack://ol-mapbox-style/./node_modules/ol/geom/SimpleGeometry.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/area.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/center.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/closest.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/contains.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/deflate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/inflate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/interiorpoint.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/interpolate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/intersectsextent.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/length.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/reverse.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/orient.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/segments.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/simplify.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/transform.js","webpack://ol-mapbox-style/./node_modules/ol/has.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Base.js","webpack://ol-mapbox-style/./node_modules/ol/expr/expression.js","webpack://ol-mapbox-style/./node_modules/ol/expr/cpu.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/style.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseVector.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Group.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Property.js","webpack://ol-mapbox-style/./node_modules/ol/layer/TileProperty.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/VectorLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Vector.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/VectorTileLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/VectorTile.js","webpack://ol-mapbox-style/./node_modules/ol/loadingstrategy.js","webpack://ol-mapbox-style/./node_modules/ol/math.js","webpack://ol-mapbox-style/./node_modules/ol/obj.js","webpack://ol-mapbox-style/./node_modules/ol/proj/epsg3857.js","webpack://ol-mapbox-style/./node_modules/ol/proj/epsg4326.js","webpack://ol-mapbox-style/./node_modules/ol/proj/projections.js","webpack://ol-mapbox-style/./node_modules/ol/proj/transforms.js","webpack://ol-mapbox-style/./node_modules/ol/sphere.js","webpack://ol-mapbox-style/./node_modules/ol/proj.js","webpack://ol-mapbox-style/./node_modules/ol/proj/Projection.js","webpack://ol-mapbox-style/./node_modules/ol/proj/Units.js","webpack://ol-mapbox-style/./node_modules/ol/render/Event.js","webpack://ol-mapbox-style/./node_modules/ol/render/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/render/VectorContext.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Builder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/ImageBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/LineStringBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/PolygonBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/BuilderGroup.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/textpath.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Executor.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/ExecutorGroup.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Instruction.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/linechunk.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/straightchunk.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/TextBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Immediate.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/hitdetect.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/TileLayer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/vector.js","webpack://ol-mapbox-style/./node_modules/ol/reproj.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Triangulation.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/common.js","webpack://ol-mapbox-style/./node_modules/ol/rotationconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/size.js","webpack://ol-mapbox-style/./node_modules/ol/source/Source.js","webpack://ol-mapbox-style/./node_modules/ol/structs/RBush.js","webpack://ol-mapbox-style/./node_modules/ol/source/VectorEventType.js","webpack://ol-mapbox-style/./node_modules/ol/source/Vector.js","webpack://ol-mapbox-style/./node_modules/ol/style/Circle.js","webpack://ol-mapbox-style/./node_modules/ol/style/Fill.js","webpack://ol-mapbox-style/./node_modules/ol/style/IconImage.js","webpack://ol-mapbox-style/./node_modules/ol/style/Icon.js","webpack://ol-mapbox-style/./node_modules/ol/style/IconImageCache.js","webpack://ol-mapbox-style/./node_modules/ol/style/Image.js","webpack://ol-mapbox-style/./node_modules/ol/style/RegularShape.js","webpack://ol-mapbox-style/./node_modules/ol/style/Stroke.js","webpack://ol-mapbox-style/./node_modules/ol/style/Style.js","webpack://ol-mapbox-style/./node_modules/ol/style/Text.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid/common.js","webpack://ol-mapbox-style/./node_modules/ol/transform.js","webpack://ol-mapbox-style/./node_modules/ol/util.js","webpack://ol-mapbox-style/./node_modules/ol/render/Feature.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/color.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/function/convert.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_error.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/scope.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/collator.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/formatted.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/resolved_image.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/values.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/literal.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/runtime_error.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/assertion.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/format.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/image.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coercion.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/evaluation_context.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/compound_expression.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/collator.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/within.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/is_constant.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/var.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_context.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/stops.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/step.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/interpolate.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/color_spaces.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coalesce.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/let.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/at.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/in.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index_of.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/match.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/case.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/slice.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/comparison.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/number_format.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/length.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/result.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/function/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/properties.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/unbundle_jsonlint.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/reference/latest.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/feature_filter/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/ref_properties.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/deref.js","webpack://ol-mapbox-style/./node_modules/ol/VectorTile.js","webpack://ol-mapbox-style/./node_modules/ol/tilecoord.js","webpack://ol-mapbox-style/./node_modules/ol/tileurlfunction.js","webpack://ol-mapbox-style/./src/mapbox.js","webpack://ol-mapbox-style/./src/util.js","webpack://ol-mapbox-style/./src/text.js","webpack://ol-mapbox-style/./src/stylefunction.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseImage.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/ImageLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Image.js","webpack://ol-mapbox-style/./node_modules/ol/format/MVT.js","webpack://ol-mapbox-style/./node_modules/ol/ImageCanvas.js","webpack://ol-mapbox-style/./node_modules/ol/resolution.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Image.js","webpack://ol-mapbox-style/./node_modules/ol/source/Image.js","webpack://ol-mapbox-style/./node_modules/ol/source/common.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseTile.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/structs/LRUCache.js","webpack://ol-mapbox-style/./node_modules/ol/TileCache.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid/TileGrid.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid.js","webpack://ol-mapbox-style/./node_modules/ol/source/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/source/Raster.js","webpack://ol-mapbox-style/./node_modules/ol/source/UrlTile.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileEventType.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileImage.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileJSON.js","webpack://ol-mapbox-style/./node_modules/ol/net.js","webpack://ol-mapbox-style/./node_modules/ol/VectorRenderTile.js","webpack://ol-mapbox-style/./node_modules/ol/source/VectorTile.js","webpack://ol-mapbox-style/./src/shaders.js","webpack://ol-mapbox-style/./src/apply.js","webpack://ol-mapbox-style/webpack/bootstrap","webpack://ol-mapbox-style/webpack/runtime/define property getters","webpack://ol-mapbox-style/webpack/runtime/hasOwnProperty shorthand","webpack://ol-mapbox-style/webpack/runtime/make namespace object","webpack://ol-mapbox-style/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\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\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = 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') epsilon = 1e-6;\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) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\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) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\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","// (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/\nvar 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\nfunction clamp_css_byte(i) { // 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\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction 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) return kCSSColorTable[str].slice(); // 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)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 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)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), 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) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\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),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\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","var 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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp)\n .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","module.exports = assert\n\nclass AssertionError extends Error {}\nAssertionError.prototype.name = 'AssertionError'\n\n/**\n * Minimal assert function\n * @param {any} t Value to check if falsy\n * @param {string=} m Optional assertion error message\n * @throws {AssertionError}\n */\nfunction assert (t, m) {\n if (!t) {\n var err = new AssertionError(m)\n if (Error.captureStackTrace) Error.captureStackTrace(err, assert)\n throw err\n }\n}\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos;\n var pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return readUtf8TextDecoder(this.buf, pos, end);\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return ti?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","/**\n * @module ol/Collection\n */\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n * @template T\n */\nexport class CollectionEvent extends Event {\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {T} element Element.\n * @param {number} index The index of the added or removed element.\n */\n constructor(type, element, index) {\n super(type);\n\n /**\n * The element that is added to or removed from the collection.\n * @type {T}\n * @api\n */\n this.element = element;\n\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n this.index = index;\n }\n}\n\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature<'add'|'remove', CollectionEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature} CollectionOnSignature\n */\n\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/**\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 */\nclass Collection extends BaseObject {\n /**\n * @param {Array} [array] Array.\n * @param {Options} [options] Collection options.\n */\n constructor(array, options) {\n super();\n\n /***\n * @type {CollectionOnSignature}\n */\n this.on;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.once;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.un;\n\n options = options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array}\n */\n this.array_ = array ? array : [];\n\n if (this.unique_) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n this.assertUnique_(this.array_[i], i);\n }\n }\n\n this.updateLength_();\n }\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n clear() {\n while (this.getLength() > 0) {\n this.pop();\n }\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 extend(arr) {\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n }\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 forEach(f) {\n const array = this.array_;\n for (let i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\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 getArray() {\n return this.array_;\n }\n\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n item(index) {\n return this.array_[index];\n }\n\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n getLength() {\n return this.get(Property.LENGTH);\n }\n\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n insertAt(index, elem) {\n if (index < 0 || index > this.getLength()) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n );\n }\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 pop() {\n return this.removeAt(this.getLength() - 1);\n }\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 push(elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n const n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n }\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 remove(elem) {\n const arr = this.array_;\n for (let 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 /**\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 removeAt(index) {\n if (index < 0 || index >= this.getLength()) {\n return undefined;\n }\n const prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n return prev;\n }\n\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n setAt(index, elem) {\n const n = this.getLength();\n if (index >= n) {\n this.insertAt(index, elem);\n return;\n }\n if (index < 0) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n const prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n )\n );\n }\n\n /**\n * @private\n */\n updateLength_() {\n this.set(Property.LENGTH, this.array_.length);\n }\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number} [except] Optional index to ignore.\n */\n assertUnique_(elem, except) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== except) {\n throw new Error('Duplicate item added to a unique collection');\n }\n }\n }\n}\n\nexport default Collection;\n","/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\nexport 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","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n constructor() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n\n /**\n * Clean up.\n */\n dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n }\n\n /**\n * Extension point for disposable objects.\n * @protected\n */\n disposeInternal() {}\n}\n\nexport default Disposable;\n","/**\n * @module ol/Image\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport ImageState from './ImageState.js';\nimport {CREATE_IMAGE_BITMAP, IMAGE_DECODE} from './has.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport {toPromise} from './functions.js';\n\n/**\n * A function that takes an {@link module:ol/Image~ImageWrapper} 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~ImageWrapper#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(import(\"./Image.js\").default, string): void} LoadFunction\n * @api\n */\n\n/**\n * @typedef {Object} ImageObject\n * @property {import(\"./extent.js\").Extent} [extent] Extent, if different from the requested one.\n * @property {import(\"./resolution.js\").ResolutionLike} [resolution] Resolution, if different from the requested one.\n * When x and y resolution are different, use the array type (`[xResolution, yResolution]`).\n * @property {number} [pixelRatio] Pixel ratio, if different from the requested one.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * For images that cover any extent and resolution (static images), the loader function should not accept\n * any arguments. The function returns an {@link import(\"./DataTile.js\").ImageLike image}, an\n * {@link import(\"./Image.js\").ImageObject image object}, or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * If the returned image does not match the extent, resolution or pixel ratio passed to the loader,\n * it has to return an {@link import(\"./Image.js\").ImageObject image object} with the `image` and the\n * correct `extent`, `resolution` and `pixelRatio`.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise} Loader\n * @api\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * The function returns a promise for an {@link import(\"./Image.js\").ImageObject image object}.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise} ImageObjectPromiseLoader\n */\n\nclass ImageWrapper extends EventTarget {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|Array|undefined} resolution Resolution. If provided as array, x and y\n * resolution will be assumed.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./ImageState.js\").default|import(\"./Image.js\").Loader} stateOrLoader State.\n */\n constructor(extent, resolution, pixelRatio, stateOrLoader) {\n super();\n\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = extent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @protected\n * @type {number|Array|undefined}\n */\n this.resolution = resolution;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state =\n typeof stateOrLoader === 'function' ? ImageState.IDLE : stateOrLoader;\n\n /**\n * @private\n * @type {import('./DataTile.js').ImageLike|null}\n */\n this.image_ = null;\n\n /**\n * @protected\n * @type {import(\"./Image.js\").Loader}\n */\n this.loader = typeof stateOrLoader === 'function' ? stateOrLoader : null;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n getExtent() {\n return this.extent;\n }\n\n /**\n * @return {import('./DataTile.js').ImageLike} Image.\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * @return {number} PixelRatio.\n */\n getPixelRatio() {\n return this.pixelRatio_;\n }\n\n /**\n * @return {number|Array} Resolution.\n */\n getResolution() {\n return /** @type {number} */ (this.resolution);\n }\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == ImageState.IDLE) {\n if (this.loader) {\n this.state = ImageState.LOADING;\n this.changed();\n const resolution = this.getResolution();\n const requestResolution = Array.isArray(resolution)\n ? resolution[0]\n : resolution;\n toPromise(() =>\n this.loader(this.getExtent(), requestResolution, this.getPixelRatio())\n )\n .then((image) => {\n if ('image' in image) {\n this.image_ = image.image;\n }\n if ('extent' in image) {\n this.extent = image.extent;\n }\n if ('resolution' in image) {\n this.resolution = image.resolution;\n }\n if ('pixelRatio' in image) {\n this.pixelRatio_ = image.pixelRatio;\n }\n if (\n image instanceof HTMLImageElement ||\n image instanceof ImageBitmap ||\n image instanceof HTMLCanvasElement ||\n image instanceof HTMLVideoElement\n ) {\n this.image_ = image;\n }\n this.state = ImageState.LOADED;\n })\n .catch((error) => {\n this.state = ImageState.ERROR;\n console.error(error); // eslint-disable-line no-console\n })\n .finally(() => this.changed());\n }\n }\n }\n\n /**\n * @param {import('./DataTile.js').ImageLike} image The image.\n */\n setImage(image) {\n this.image_ = image;\n }\n\n /**\n * @param {number|Array} resolution Resolution.\n */\n setResolution(resolution) {\n this.resolution = resolution;\n }\n}\n\n/**\n * @param {import('./DataTile.js').ImageLike} 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 */\nexport function listenImage(image, loadHandler, errorHandler) {\n const img = /** @type {HTMLImageElement} */ (image);\n let listening = true;\n let decoding = false;\n let loaded = false;\n\n const listenerKeys = [\n listenOnce(img, EventType.LOAD, function () {\n loaded = true;\n if (!decoding) {\n loadHandler();\n }\n }),\n ];\n\n if (img.src && IMAGE_DECODE) {\n decoding = true;\n img\n .decode()\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n if (loaded) {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n } else {\n listenerKeys.push(listenOnce(img, EventType.ERROR, errorHandler));\n }\n\n return function unlisten() {\n listening = false;\n listenerKeys.forEach(unlistenByKey);\n };\n}\n\n/**\n * Loads an image.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `HTMLImageElement`.\n * @api\n */\nexport function load(image, src) {\n return new Promise((resolve, reject) => {\n function handleLoad() {\n unlisten();\n resolve(image);\n }\n function handleError() {\n unlisten();\n reject(new Error('Image load error'));\n }\n function unlisten() {\n image.removeEventListener('load', handleLoad);\n image.removeEventListener('error', handleError);\n }\n image.addEventListener('load', handleLoad);\n image.addEventListener('error', handleError);\n if (src) {\n image.src = src;\n }\n });\n}\n\n/**\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `HTMLImageElement`.\n */\nexport function decodeFallback(image, src) {\n if (src) {\n image.src = src;\n }\n return IMAGE_DECODE\n ? new Promise((resolve, reject) =>\n image.decode().then(() => resolve(image), reject)\n )\n : load(image);\n}\n\n/**\n * Loads an image and decodes it to an `ImageBitmap` if `createImageBitmap()` is supported. Returns\n * the loaded image otherwise.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `ImageBitmap` or an\n * `HTMLImageElement` if `createImageBitmap()` is not supported.\n * @api\n */\nexport function decode(image, src) {\n if (src) {\n image.src = src;\n }\n return IMAGE_DECODE && CREATE_IMAGE_BITMAP\n ? image.decode().then(() => createImageBitmap(image))\n : decodeFallback(image);\n}\n\nexport default ImageWrapper;\n","/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3,\n EMPTY: 4,\n};\n","/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenImage} from './Image.js';\n\nclass ImageTile extends Tile {\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} [options] Tile options.\n */\n constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\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 /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\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 getImage() {\n return this.image_;\n }\n\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n setImage(element) {\n this.image_ = element;\n this.state = TileState.LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }\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 *\n * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n * that checks for error status codes and reloads only when the status code is\n * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n * made already:\n *\n * ```js\n * const retryCodes = [408, 429, 500, 502, 503, 504];\n * const retries = {};\n * source.setTileLoadFunction((tile, src) => {\n * const image = tile.getImage();\n * fetch(src)\n * .then((response) => {\n * if (retryCodes.includes(response.status)) {\n * retries[src] = (retries[src] || 0) + 1;\n * if (retries[src] <= 3) {\n * setTimeout(() => tile.load(), retries[src] * 1000);\n * }\n * return Promise.reject();\n * }\n * return response.blob();\n * })\n * .then((blob) => {\n * const imageUrl = URL.createObjectURL(blob);\n * image.src = imageUrl;\n * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n * })\n * .catch(() => tile.setState(3)); // error\n * });\n * ```\n *\n * @api\n */\n load() {\n if (this.state == TileState.ERROR) {\n this.state = TileState.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\n","/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport {TRUE} from '../functions.js';\nimport {abstract} from '../util.js';\nimport {compose as composeTransform, makeInverse} from '../transform.js';\nimport {getWidth} from '../extent.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {inView} from '../layer/Layer.js';\nimport {wrapX} from '../coordinate.js';\n\n/**\n * @template T\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback} callback Callback.\n */\n\n/**\n * @abstract\n */\nclass MapRenderer extends Disposable {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super();\n\n /**\n * @private\n * @type {import(\"../Map.js\").default}\n */\n this.map_ = map;\n }\n\n /**\n * @abstract\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @protected\n */\n calculateMatrices2D(frameState) {\n const viewState = frameState.viewState;\n const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(\n coordinateToPixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / viewState.resolution,\n -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0],\n -viewState.center[1]\n );\n\n makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {import(\"./vector.js\").FeatureCallback} callback Feature callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n let result;\n const viewState = frameState.viewState;\n\n /**\n * @param {boolean} managed Managed layer.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @return {T|undefined} Callback result.\n */\n function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n return callback.call(thisArg, feature, managed ? layer : null, geometry);\n }\n\n const projection = viewState.projection;\n\n const translatedCoordinate = wrapX(coordinate.slice(), projection);\n const offsets = [[0, 0]];\n if (projection.canWrapX() && checkWrapped) {\n const projectionExtent = projection.getExtent();\n const worldWidth = getWidth(projectionExtent);\n offsets.push([-worldWidth, 0], [worldWidth, 0]);\n }\n\n const layerStates = frameState.layerStatesArray;\n const numLayers = layerStates.length;\n\n const matches = /** @type {Array>} */ ([]);\n const tmpCoord = [];\n for (let i = 0; i < offsets.length; i++) {\n for (let j = numLayers - 1; j >= 0; --j) {\n const layerState = layerStates[j];\n const layer = layerState.layer;\n if (\n layer.hasRenderer() &&\n inView(layerState, viewState) &&\n layerFilter.call(thisArg2, layer)\n ) {\n const layerRenderer = layer.getRenderer();\n const source = layer.getSource();\n if (layerRenderer && source) {\n const coordinates = source.getWrapX()\n ? translatedCoordinate\n : coordinate;\n const callback = forEachFeatureAtCoordinate.bind(\n null,\n layerState.managed\n );\n tmpCoord[0] = coordinates[0] + offsets[i][0];\n tmpCoord[1] = coordinates[1] + offsets[i][1];\n result = layerRenderer.forEachFeatureAtCoordinate(\n tmpCoord,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n }\n if (result) {\n return result;\n }\n }\n }\n }\n if (matches.length === 0) {\n return undefined;\n }\n const order = 1 / matches.length;\n matches.forEach((m, i) => (m.distanceSq += i * order));\n matches.sort((a, b) => a.distanceSq - b.distanceSq);\n matches.some((m) => {\n return (result = m.callback(m.feature, m.layer, m.geometry));\n });\n return result;\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n * @return {boolean} Is there a feature at the given coordinate?\n * @template U\n */\n hasFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n layerFilter,\n thisArg\n ) {\n const hasFeature = this.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n TRUE,\n this,\n layerFilter,\n thisArg\n );\n\n return hasFeature !== undefined;\n }\n\n /**\n * @return {import(\"../Map.js\").default} Map.\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n flushDeclutterItems(frameState) {}\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n scheduleExpireIconCache(frameState) {\n if (iconImageCache.canExpireCache()) {\n frameState.postRenderFunctions.push(expireIconCache);\n }\n }\n}\n\n/**\n * @param {import(\"../Map.js\").default} map Map.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n iconImageCache.expire();\n}\n\nexport default MapRenderer;\n","/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {checkedFonts} from '../render/canvas.js';\nimport {inView} from '../layer/Layer.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {replaceChildren} from '../dom.js';\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nclass CompositeMapRenderer extends MapRenderer {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super(map);\n\n /**\n * @type {import(\"../events.js\").EventsKey}\n */\n this.fontChangeListenerKey_ = listen(\n checkedFonts,\n ObjectEventType.PROPERTYCHANGE,\n map.redrawText.bind(map)\n );\n\n /**\n * @private\n * @type {HTMLDivElement}\n */\n this.element_ = document.createElement('div');\n const style = this.element_.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n style.zIndex = '0';\n\n this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n\n const container = map.getViewport();\n container.insertBefore(this.element_, container.firstChild || null);\n\n /**\n * @private\n * @type {Array}\n */\n this.children_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n\n /**\n * @type {Array}\n */\n this.declutterLayers_ = [];\n }\n\n /**\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n const map = this.getMap();\n if (map.hasListener(type)) {\n const event = new RenderEvent(type, undefined, frameState);\n map.dispatchEvent(event);\n }\n }\n\n disposeInternal() {\n unlistenByKey(this.fontChangeListenerKey_);\n this.element_.parentNode.removeChild(this.element_);\n super.disposeInternal();\n }\n\n /**\n * Render.\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n this.calculateMatrices2D(frameState);\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n const layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n return a.zIndex - b.zIndex;\n });\n const viewState = frameState.viewState;\n\n this.children_.length = 0;\n\n const declutterLayers = this.declutterLayers_;\n declutterLayers.length = 0;\n\n let previousElement = null;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n frameState.layerIndex = i;\n\n const layer = layerState.layer;\n const sourceState = layer.getSourceState();\n if (\n !inView(layerState, viewState) ||\n (sourceState != 'ready' && sourceState != 'undefined')\n ) {\n layer.unrender();\n continue;\n }\n\n const element = layer.render(frameState, previousElement);\n if (!element) {\n continue;\n }\n if (element !== previousElement) {\n this.children_.push(element);\n previousElement = element;\n }\n if ('getDeclutter' in layer) {\n declutterLayers.push(\n /** @type {import(\"../layer/BaseVector.js\").default} */ (layer)\n );\n }\n }\n this.flushDeclutterItems(frameState);\n\n replaceChildren(this.element_, this.children_);\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.element_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleExpireIconCache(frameState);\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n flushDeclutterItems(frameState) {\n const layers = this.declutterLayers_;\n for (let i = layers.length - 1; i >= 0; --i) {\n layers[i].renderDeclutter(frameState);\n }\n layers.length = 0;\n }\n}\n\nexport default CompositeMapRenderer;\n","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map event.\n */\nclass MapEvent extends Event {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {?import(\"./Map.js\").FrameState} [frameState] Frame state.\n */\n constructor(type, map, frameState) {\n super(type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./Map.js\").default}\n * @api\n */\n this.map = map;\n\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./Map.js\").FrameState}\n * @api\n */\n this.frameState = frameState !== undefined ? frameState : null;\n }\n}\n\nexport default MapEvent;\n","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nclass MapBrowserEvent extends MapEvent {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean} [dragging] Is the map currently being dragged?\n * @param {import(\"./Map.js\").FrameState} [frameState] Frame state.\n * @param {Array} [activePointers] Active pointers.\n */\n constructor(type, map, originalEvent, dragging, frameState, activePointers) {\n super(type, map, frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n this.originalEvent = originalEvent;\n\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 /**\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 /**\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 = dragging !== undefined ? dragging : false;\n\n /**\n * @type {Array|undefined}\n */\n this.activePointers = activePointers;\n }\n\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 pixel() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n }\n set pixel(pixel) {\n this.pixel_ = pixel;\n }\n\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 coordinate() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n }\n set coordinate(coordinate) {\n this.coordinate_ = coordinate;\n }\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 preventDefault() {\n super.preventDefault();\n if ('preventDefault' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n }\n }\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 stopPropagation() {\n super.stopPropagation();\n if ('stopPropagation' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n }\n }\n}\n\nexport default MapBrowserEvent;\n","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport 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 /**\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: EventType.CLICK,\n\n /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: EventType.DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\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\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n","/**\n * @module ol/pointer/EventType\n */\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\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","/**\n * @module ol/MapBrowserEventHandler\n */\n\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport Target from './events/Target.js';\nimport {PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {listen, unlistenByKey} from './events.js';\n\nclass MapBrowserEventHandler extends Target {\n /**\n * @param {import(\"./Map.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 constructor(map, moveTolerance) {\n super(map);\n\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./Map.js\").default}\n * @private\n */\n this.map_ = map;\n\n /**\n * @type {ReturnType}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n * @type {boolean}\n */\n this.emulateClicks_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent|null}\n * @private\n */\n this.down_ = null;\n\n const element = this.map_.getViewport();\n\n /**\n * @type {Array}\n * @private\n */\n this.activePointers_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.trackedTouches_ = {};\n\n this.element_ = element;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(\n element,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_,\n this\n );\n\n /**\n * @type {PointerEvent}\n * @private\n */\n this.originalPointerMoveEvent_;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(\n element,\n PointerEventType.POINTERMOVE,\n this.relayMoveEvent_,\n this\n );\n\n /**\n * @private\n */\n this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n this.element_.addEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n emulateClick_(pointerEvent) {\n let newEvent = new MapBrowserEvent(\n MapBrowserEventType.CLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new MapBrowserEvent(\n MapBrowserEventType.DBLCLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(() => {\n this.clickTimeoutId_ = undefined;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.SINGLECLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n }, 250);\n }\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 updateActivePointers_(pointerEvent) {\n const event = pointerEvent;\n const id = event.pointerId;\n\n if (\n event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL\n ) {\n delete this.trackedTouches_[id];\n for (const pointerId in this.trackedTouches_) {\n if (this.trackedTouches_[pointerId].target !== event.target) {\n // Some platforms assign a new pointerId when the target changes.\n // If this happens, delete one tracked pointer. If there is more\n // than one tracked pointer for the old target, it will be cleared\n // by subsequent POINTERUP events from other pointers.\n delete this.trackedTouches_[pointerId];\n break;\n }\n }\n } else if (\n event.type == MapBrowserEventType.POINTERDOWN ||\n event.type == MapBrowserEventType.POINTERMOVE\n ) {\n this.trackedTouches_[id] = event;\n }\n this.activePointers_ = Object.values(this.trackedTouches_);\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerUp_(pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERUP,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\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.preventDefault().\n if (\n this.emulateClicks_ &&\n !newEvent.defaultPrevented &&\n !this.dragging_ &&\n this.isMouseActionButton_(pointerEvent)\n ) {\n this.emulateClick_(this.down_);\n }\n\n if (this.activePointers_.length === 0) {\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n isMouseActionButton_(pointerEvent) {\n return pointerEvent.button === 0;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerDown_(pointerEvent) {\n this.emulateClicks_ = this.activePointers_.length === 0;\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDOWN,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\n this.down_ = new PointerEvent(pointerEvent.type, pointerEvent);\n Object.defineProperty(this.down_, 'target', {\n writable: false,\n value: pointerEvent.target,\n });\n\n if (this.dragListenerKeys_.length === 0) {\n const doc = this.map_.getOwnerDocument();\n this.dragListenerKeys_.push(\n listen(\n doc,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_,\n this\n ),\n listen(doc, MapBrowserEventType.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 listen(\n this.element_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_,\n this\n )\n );\n if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n this.dragListenerKeys_.push(\n listen(\n this.element_.getRootNode(),\n MapBrowserEventType.POINTERUP,\n this.handlePointerUp_,\n this\n )\n );\n }\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerMove_(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.updateActivePointers_(pointerEvent);\n this.dragging_ = true;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDRAG,\n this.map_,\n pointerEvent,\n this.dragging_,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n }\n }\n\n /**\n * Wrap and relay a pointermove event.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n relayMoveEvent_(pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(\n new MapBrowserEvent(\n MapBrowserEventType.POINTERMOVE,\n this.map_,\n pointerEvent,\n dragging\n )\n );\n }\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 handleTouchMove_(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 // when elm-pep is used as pointer events polyfill.\n const originalEvent = this.originalPointerMoveEvent_;\n if (\n (!originalEvent || originalEvent.defaultPrevented) &&\n (typeof event.cancelable !== 'boolean' || event.cancelable === true)\n ) {\n event.preventDefault();\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n isMoving_(pointerEvent) {\n return (\n this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) >\n this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_\n );\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_\n );\n\n if (this.pointerdownListenerKey_) {\n unlistenByKey(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n this.element_ = null;\n super.disposeInternal();\n }\n}\n\nexport default MapBrowserEventHandler;\n","/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport 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 /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n};\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view',\n};\n","/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport {VOID} from '../functions.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {removeNode} from '../dom.js';\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/**\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 * const 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 */\nclass Control extends BaseObject {\n /**\n * @param {Options} options Control options.\n */\n constructor(options) {\n super();\n\n const element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = element ? element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array}\n */\n this.listenerKeys = [];\n\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.target) {\n this.setTarget(options.target);\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n removeNode(this.element);\n super.disposeInternal();\n }\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n */\n setMap(map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (let i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n unlistenByKey(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (map) {\n const target = this.target_\n ? this.target_\n : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(\n listen(map, MapEventType.POSTRENDER, this.render, this)\n );\n }\n map.render();\n }\n }\n\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n render(mapEvent) {}\n\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 setTarget(target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n }\n}\n\nexport default Control;\n","/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {equals} from '../array.js';\nimport {removeChildren, replaceNode} from '../dom.js';\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|HTMLElement} [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} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\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 {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\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/**\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 */\nclass Attribution extends Control {\n /**\n * @param {Options} [options] Attribution options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.userCollapsed_ = this.collapsed_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n const className =\n options.className !== undefined ? options.className : 'ol-attribution';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n const expandClassName =\n options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n\n const collapseClassName =\n options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collapse';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n this.collapseLabel_.className = collapseClassName;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : 'i';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n this.label_.className = expandClassName;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.toggleButton_ = document.createElement('button');\n this.toggleButton_.setAttribute('type', 'button');\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n this.toggleButton_.title = tipLabel;\n this.toggleButton_.appendChild(activeLabel);\n\n this.toggleButton_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.toggleButton_);\n element.appendChild(this.ulElement_);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n collectSourceAttributions_(frameState) {\n const visibleAttributions = Array.from(\n new Set(\n this.getMap()\n .getAllLayers()\n .flatMap((layer) => layer.getAttributions(frameState))\n )\n );\n\n const collapsible = !this.getMap()\n .getAllLayers()\n .some(\n (layer) =>\n layer.getSource() &&\n layer.getSource().getAttributionsCollapsible() === false\n );\n if (!this.overrideCollapsible_) {\n this.setCollapsible(collapsible);\n }\n return visibleAttributions;\n }\n\n /**\n * @private\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n updateElement_(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const attributions = this.collectSourceAttributions_(frameState);\n\n const visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n\n removeChildren(this.ulElement_);\n\n // append the attributions\n for (let i = 0, ii = attributions.length; i < ii; ++i) {\n const element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n }\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 getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (this.userCollapsed_) {\n this.handleToggle_();\n }\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 setCollapsed(collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\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 getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n }\n}\n\nexport default Attribution;\n","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\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 {string} [compassClassName='ol-compass'] CSS class name for the compass.\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/**\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 */\nclass Rotate extends Control {\n /**\n * @param {Options} [options] Rotate options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-rotate';\n\n const label = options.label !== undefined ? options.label : '\\u21E7';\n\n const compassClassName =\n options.compassClassName !== undefined\n ? options.compassClassName\n : 'ol-compass';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = compassClassName;\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add(compassClassName);\n }\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n const button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(CLASS_HIDDEN);\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n }\n\n /**\n * @private\n */\n resetNorth_() {\n const map = this.getMap();\n const 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 const 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: easeOut,\n });\n } else {\n view.setRotation(0);\n }\n }\n }\n\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n const rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n const transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n const contains = this.element.classList.contains(CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(CLASS_HIDDEN);\n }\n }\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n }\n}\n\nexport default Rotate;\n","/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\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} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\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/**\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 */\nclass Zoom extends Control {\n /**\n * @param {Options} [options] Zoom options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom';\n\n const delta = options.delta !== undefined ? options.delta : 1;\n\n const zoomInClassName =\n options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n\n const zoomOutClassName =\n options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n\n const zoomInLabel =\n options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n const zoomOutLabel =\n options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n\n const zoomInTipLabel =\n options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n const zoomOutTipLabel =\n options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n\n const inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel\n );\n\n inElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, delta),\n false\n );\n\n const outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel\n );\n\n outElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, -delta),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n zoomByDelta_(delta) {\n const map = this.getMap();\n const 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 const currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n const 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: easeOut,\n });\n } else {\n view.setZoom(newZoom);\n }\n }\n }\n}\n\nexport default Zoom;\n","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active',\n};\n","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport {easeOut, linear} from '../easing.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} InteractionOnSignature\n */\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nclass Interaction extends BaseObject {\n /**\n * @param {InteractionOptions} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {InteractionOnSignature}\n */\n this.on;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.once;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.un;\n\n if (options && options.handleEvent) {\n this.handleEvent = options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\n\n /**\n * Return whether the interaction is currently active.\n * @return {boolean} `true` if the interaction is active, `false` otherwise.\n * @observable\n * @api\n */\n getActive() {\n return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n }\n\n /**\n * Get the map associated with this interaction.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event}.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n return true;\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n this.set(InteractionProperty.ACTIVE, active);\n }\n\n /**\n * Remove the interaction 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(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n this.map_ = map;\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [duration] Duration.\n */\nexport function pan(view, delta, duration) {\n const currentCenter = view.getCenterInternal();\n if (currentCenter) {\n const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n view.animateInternal({\n duration: duration !== undefined ? duration : 250,\n easing: linear,\n center: view.getConstrainedCenter(center),\n });\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] Anchor coordinate in the user projection.\n * @param {number} [duration] Duration.\n */\nexport function zoomByDelta(view, delta, anchor, duration) {\n const currentZoom = view.getZoom();\n\n if (currentZoom === undefined) {\n return;\n }\n\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n const newResolution = view.getResolutionForZoom(newZoom);\n\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n anchor: anchor,\n duration: duration !== undefined ? duration : 250,\n easing: easeOut,\n });\n}\n\nexport default Interaction;\n","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a\n * doubleclick) and eventually zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n const browserEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const map = mapBrowserEvent.map;\n const anchor = mapBrowserEvent.coordinate;\n const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, anchor, this.duration_);\n browserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n }\n}\n\nexport default DoubleClickZoom;\n","/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n * Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nclass PointerInteraction extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {Array}\n * @protected\n */\n this.targetPointers = [];\n }\n\n /**\n * Returns the current number of pointers involved in the interaction,\n * e.g. `2` when two fingers are used.\n * @return {number} The number of pointers.\n * @api\n */\n getPointerCount() {\n return this.targetPointers.length;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleDownEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleDragEvent(mapBrowserEvent) {}\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into\n * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n * detected.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n\n let stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n // prevent page scrolling during dragging\n mapBrowserEvent.originalEvent.preventDefault();\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n const handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence =\n handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n const handled = this.handleDownEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleMoveEvent(mapBrowserEvent) {}\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleUpEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * This function is used to determine if \"down\" events should be propagated\n * to other interactions or should be stopped.\n * @param {boolean} handled Was the event handled by the interaction?\n * @return {boolean} Should the `down` event be stopped?\n */\n stopDown(handled) {\n return handled;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n updateTrackedPointers_(mapBrowserEvent) {\n if (mapBrowserEvent.activePointers) {\n this.targetPointers = mapBrowserEvent.activePointers;\n }\n }\n}\n\n/**\n * @param {Array} pointerEvents List of events.\n * @return {{clientX: number, clientY: number}} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n const length = pointerEvents.length;\n let clientX = 0;\n let clientY = 0;\n for (let i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return {clientX: clientX / length, clientY: clientY / length};\n}\n\nexport default PointerInteraction;\n","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {MAC, WEBKIT} from '../has.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent~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/**\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 */\nexport function all(var_args) {\n const conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n let pass = true;\n for (let 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/**\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 */\nexport const altKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\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 */\nexport const altShiftKeysOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\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 */\nexport const focus = function (event) {\n const targetElement = event.map.getTargetElement();\n const activeElement = event.map.getOwnerDocument().activeElement;\n return targetElement.contains(activeElement);\n};\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 */\nexport const focusWithTabindex = function (event) {\n return event.map.getTargetElement().hasAttribute('tabindex')\n ? focus(event)\n : true;\n};\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport const always = TRUE;\n\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 */\nexport const click = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\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 */\nexport const mouseActionButton = function (mapBrowserEvent) {\n const originalEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport const never = FALSE;\n\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 */\nexport const pointerMove = function (mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\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 */\nexport const singleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\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 */\nexport const doubleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\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 */\nexport const noModifierKeys = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\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 */\nexport const platformModifierKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKey = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return MAC ? originalEvent.metaKey : originalEvent.ctrlKey;\n};\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 */\nexport const shiftKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not an `input`,\n * `select`, or `textarea` element and no `contenteditable` attribute is\n * set or inherited, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport const targetNotEditable = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA' &&\n // `isContentEditable` is only available on `HTMLElement`, but it may also be a\n // different type like `SVGElement`.\n // @ts-ignore\n !originalEvent.target.isContentEditable\n );\n};\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport const mouseOnly = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(\n pointerEvent !== undefined,\n 'mapBrowserEvent must originate from a pointer event'\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\n\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport const touchOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(\n pointerEvt !== undefined,\n 'mapBrowserEvent must originate from a pointer event'\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'touch';\n};\n\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport const penOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(\n pointerEvt !== undefined,\n 'mapBrowserEvent must originate from a pointer event'\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'pen';\n};\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See https://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport const primaryAction = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(\n pointerEvent !== undefined,\n 'mapBrowserEvent must originate from a pointer event'\n );\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n","/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n all,\n focusWithTabindex,\n noModifierKeys,\n primaryAction,\n} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport {\n rotate as rotateCoordinate,\n scale as scaleCoordinate,\n} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super({\n stopDown: FALSE,\n });\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n */\n this.panning_ = false;\n\n const condition = options.condition\n ? options.condition\n : all(noModifierKeys, primaryAction);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n if (!this.panning_) {\n this.panning_ = true;\n map.getView().beginInteraction();\n }\n const targetPointers = this.targetPointers;\n const centroid = map.getEventPixel(centroidFromPointers(targetPointers));\n if (targetPointers.length == this.lastPointersCount_) {\n if (this.kinetic_) {\n this.kinetic_.update(centroid[0], centroid[1]);\n }\n if (this.lastCentroid) {\n const delta = [\n this.lastCentroid[0] - centroid[0],\n centroid[1] - this.lastCentroid[1],\n ];\n const map = mapBrowserEvent.map;\n const view = map.getView();\n scaleCoordinate(delta, view.getResolution());\n rotateCoordinate(delta, view.getRotation());\n view.adjustCenterInternal(delta);\n }\n } else if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger down, tiny drag, second finger down\n this.kinetic_.begin();\n }\n this.lastCentroid = centroid;\n this.lastPointersCount_ = targetPointers.length;\n mapBrowserEvent.originalEvent.preventDefault();\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n const distance = this.kinetic_.getDistance();\n const angle = this.kinetic_.getAngle();\n const center = view.getCenterInternal();\n const centerpx = map.getPixelFromCoordinateInternal(center);\n const dest = map.getCoordinateFromPixelInternal([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle),\n ]);\n view.animateInternal({\n center: view.getConstrainedCenter(dest),\n duration: 500,\n easing: easeOut,\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.endInteraction();\n }\n return false;\n }\n if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger up, tiny drag, second finger up\n this.kinetic_.begin();\n }\n this.lastCentroid = null;\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n if (this.kinetic_) {\n this.kinetic_.begin();\n }\n // No kinetic as soon as more than one pointer on the screen is\n // detected. This is to prevent nasty pans after pinch.\n this.noKinetic_ = this.targetPointers.length > 1;\n return true;\n }\n return false;\n }\n}\n\nexport default DragPan;\n","/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n altShiftKeysOnly,\n mouseActionButton,\n mouseOnly,\n} from '../events/condition.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nclass DragRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n stopDown: FALSE,\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n const delta = theta - this.lastAngle_;\n view.adjustRotationInternal(-delta);\n }\n this.lastAngle_ = theta;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (\n mouseActionButton(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)\n ) {\n const map = mapBrowserEvent.map;\n map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n return true;\n }\n return false;\n }\n}\n\nexport default DragRotate;\n","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nclass RenderBox extends Disposable {\n /**\n * @param {string} className CSS class name.\n */\n constructor(className) {\n super();\n\n /**\n * @type {import(\"../geom/Polygon.js\").default}\n * @private\n */\n this.geometry_ = null;\n\n /**\n * @type {HTMLDivElement}\n * @private\n */\n this.element_ = document.createElement('div');\n this.element_.style.position = 'absolute';\n this.element_.style.pointerEvents = 'auto';\n this.element_.className = 'ol-box ' + className;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.endPixel_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setMap(null);\n }\n\n /**\n * @private\n */\n render_() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const px = 'px';\n const style = this.element_.style;\n style.left = Math.min(startPixel[0], endPixel[0]) + px;\n style.top = Math.min(startPixel[1], endPixel[1]) + px;\n style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n }\n\n /**\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n const style = this.element_.style;\n style.left = 'inherit';\n style.top = 'inherit';\n style.width = 'inherit';\n style.height = 'inherit';\n }\n this.map_ = map;\n if (this.map_) {\n this.map_.getOverlayContainer().appendChild(this.element_);\n }\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n */\n setPixels(startPixel, endPixel) {\n this.startPixel_ = startPixel;\n this.endPixel_ = endPixel;\n this.createOrUpdateGeometry();\n this.render_();\n }\n\n /**\n * Creates or updates the cached geometry.\n */\n createOrUpdateGeometry() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]],\n ];\n const coordinates = pixels.map(\n this.map_.getCoordinateFromPixelInternal,\n this.map_\n );\n // close the polygon\n coordinates[4] = coordinates[0].slice();\n if (!this.geometry_) {\n this.geometry_ = new Polygon([coordinates]);\n } else {\n this.geometry_.setCoordinates([coordinates]);\n }\n }\n\n /**\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n */\n getGeometry() {\n return this.geometry_;\n }\n}\n\nexport default RenderBox;\n","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport {mouseActionButton} from '../events/condition.js';\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n\n/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend',\n\n /**\n * Triggered upon drag box canceled.\n * @event DragBoxEvent#boxcancel\n * @api\n */\n BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nexport class DragBoxEvent extends Event {\n /**\n * @param {string} type The event type.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n */\n constructor(type, coordinate, mapBrowserEvent) {\n super(type);\n\n /**\n * The coordinate of the drag event.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = coordinate;\n\n /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature} DragBoxOnSignature\n */\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom~DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.on;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.once;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.un;\n\n options = options ? options : {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n if (options.onBoxEnd) {\n this.onBoxEnd = options.onBoxEnd;\n }\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : mouseActionButton;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition\n ? options.boxEndCondition\n : this.defaultBoxEndCondition;\n }\n\n /**\n * The default condition for determining whether the boxend event\n * should fire.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n * leading to the box end.\n * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n * @return {boolean} Whether or not the boxend condition should be fired.\n */\n defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n const width = endPixel[0] - startPixel[0];\n const height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n }\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n getGeometry() {\n return this.box_.getGeometry();\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n this.box_.setMap(null);\n\n const completeBox = this.boxEndCondition_(\n mapBrowserEvent,\n this.startPixel_,\n mapBrowserEvent.pixel\n );\n if (completeBox) {\n this.onBoxEnd(mapBrowserEvent);\n }\n this.dispatchEvent(\n new DragBoxEvent(\n completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.condition_(mapBrowserEvent)) {\n this.startPixel_ = mapBrowserEvent.pixel;\n this.box_.setMap(mapBrowserEvent.map);\n this.box_.setPixels(this.startPixel_, this.startPixel_);\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return true;\n }\n return false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {}\n}\n\nexport default DragBox;\n","/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nclass DragZoom extends DragBox {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const condition = options.condition ? options.condition : shiftKeyOnly;\n\n super({\n condition: condition,\n className: options.className || 'ol-dragzoom',\n minArea: options.minArea,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {\n const map = this.getMap();\n const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n let geometry = this.getGeometry();\n\n if (this.out_) {\n const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n const factor = view.getResolution() / resolution;\n geometry = geometry.clone();\n geometry.scale(factor * factor);\n }\n\n view.fitInternal(geometry, {\n duration: this.duration_,\n easing: easeOut,\n });\n }\n}\n\nexport default DragZoom;\n","/**\n * @module ol/events/Key\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n DOWN: 'ArrowDown',\n};\n","/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {pan} from './Interaction.js';\nimport Key from '../events/Key.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport {rotate as rotateCoordinate} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.noModifierKeys} and\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nclass KeyboardPan extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /**\n * @private\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n * @return {boolean} Combined condition result.\n */\n this.defaultCondition_ = function (mapBrowserEvent) {\n return (\n noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ =\n options.condition !== undefined\n ? options.condition\n : this.defaultCondition_;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ =\n options.pixelDelta !== undefined ? options.pixelDelta : 128;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n * pressed).\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const key = keyEvent.key;\n if (\n this.condition_(mapBrowserEvent) &&\n (key == Key.DOWN ||\n key == Key.LEFT ||\n key == Key.RIGHT ||\n key == Key.UP)\n ) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n let deltaX = 0,\n deltaY = 0;\n if (key == Key.DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (key == Key.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (key == Key.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n const delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardPan;\n","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {platformModifierKey, targetNotEditable} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. The default condition is\n * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that\n * the platform modifier key isn't pressed\n * (!{@link module:ol/events/condition.platformModifierKey}).\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nclass KeyboardZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition\n ? options.condition\n : function (mapBrowserEvent) {\n return (\n !platformModifierKey(mapBrowserEvent) &&\n targetNotEditable(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n * key pressed was '+' or '-').\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (\n mapBrowserEvent.type == EventType.KEYDOWN ||\n mapBrowserEvent.type == EventType.KEYPRESS\n ) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const key = keyEvent.key;\n if (this.condition_(mapBrowserEvent) && (key === '+' || key === '-')) {\n const map = mapBrowserEvent.map;\n const delta = key === '+' ? this.delta_ : -this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, undefined, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardZoom;\n","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n /**\n * @private\n * @type {number}\n */\n this.totalDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.lastDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ =\n options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ =\n options.constrainResolution !== undefined\n ? options.constrainResolution\n : false;\n\n const condition = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {?import(\"../coordinate.js\").Coordinate}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @private\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.deltaPerZoom_ = 300;\n }\n\n /**\n * @private\n */\n endInteraction_() {\n this.trackpadTimeoutId_ = undefined;\n const map = this.getMap();\n if (!map) {\n return;\n }\n const view = map.getView();\n view.endInteraction(\n undefined,\n this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,\n this.lastAnchor_\n );\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n * zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const wheelEvent = /** @type {WheelEvent} */ (\n mapBrowserEvent.originalEvent\n );\n wheelEvent.preventDefault();\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.coordinate;\n }\n\n // Delta normalisation inspired by\n // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n let delta;\n if (mapBrowserEvent.type == EventType.WHEEL) {\n delta = wheelEvent.deltaY;\n if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n delta /= DEVICE_PIXEL_RATIO;\n }\n if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n delta *= 40;\n }\n }\n\n if (delta === 0) {\n return false;\n }\n this.lastDelta_ = delta;\n\n const now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n }\n\n const view = map.getView();\n if (\n this.mode_ === 'trackpad' &&\n !(view.getConstrainResolution() || this.constrainResolution_)\n ) {\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.beginInteraction();\n }\n this.trackpadTimeoutId_ = setTimeout(\n this.endInteraction_.bind(this),\n this.timeout_\n );\n view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n this.startTime_ = now;\n return false;\n }\n\n this.totalDelta_ += delta;\n\n const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(\n this.handleWheelZoom_.bind(this, map),\n timeLeft\n );\n\n return false;\n }\n\n /**\n * @private\n * @param {import(\"../Map.js\").default} map Map.\n */\n handleWheelZoom_(map) {\n const view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n let delta =\n -clamp(\n this.totalDelta_,\n -this.maxDelta_ * this.deltaPerZoom_,\n this.maxDelta_ * this.deltaPerZoom_\n ) / this.deltaPerZoom_;\n if (view.getConstrainResolution() || this.constrainResolution_) {\n // view has a zoom constraint, zoom by 1\n delta = delta ? (delta > 0 ? 1 : -1) : 0;\n }\n zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n\n this.mode_ = undefined;\n this.totalDelta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n }\n\n /**\n * Enable or disable using the mouse's location as an anchor when zooming\n * @param {boolean} useAnchor true to zoom to the mouse's location, false\n * to zoom to the center of the map\n * @api\n */\n setMouseAnchor(useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n }\n}\n\nexport default MouseWheelZoom;\n","/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let rotationDelta = 0.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n\n // angle between touches\n const angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX\n );\n\n if (this.lastAngle_ !== undefined) {\n const delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n\n // rotate anchor point.\n // FIXME: should be the intersection point between the lines:\n // touch0,touch1 and previousTouch0,previousTouch1\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // rotate\n if (this.rotating_) {\n map.render();\n view.adjustRotationInternal(rotationDelta, this.anchor_);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastAngle_ = undefined;\n this.rotating_ = false;\n this.rotationDelta_ = 0.0;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\nexport default PinchRotate;\n","/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchZoom extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let scaleDelta = 1.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n const dx = touch0.clientX - touch1.clientX;\n const dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // scale, bypass the resolution constraint\n map.render();\n view.adjustResolutionInternal(scaleDelta, this.anchor_);\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\nexport default PinchZoom;\n","/**\n * @module ol/Map\n */\nimport BaseObject from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport EventType from './events/EventType.js';\nimport Layer from './layer/Layer.js';\nimport LayerGroup, {GroupEvent} from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, {getTilePriority} from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {TRUE} from './functions.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n} from './transform.js';\nimport {assert} from './asserts.js';\nimport {\n clone,\n createOrUpdateEmpty,\n equals as equalsExtent,\n getForViewAndSize,\n isEmpty,\n} from './extent.js';\nimport {defaults as defaultControls} from './control/defaults.js';\nimport {defaults as defaultInteractions} from './interaction/defaults.js';\nimport {equals} from './array.js';\nimport {fromUserCoordinate, toUserCoordinate} from './proj.js';\nimport {getUid} from './util.js';\nimport {hasArea} from './size.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {removeNode} from './dom.js';\nimport {warn} from './console.js';\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 Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {import(\"rbush\").default} declutterTree DeclutterTree.\n * @property {null|import(\"./extent.js\").Extent} extent Extent (in view projection coordinates).\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object>} usedTiles UsedTiles.\n * @property {Array} viewHints ViewHints.\n * @property {!Object>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object} renderTargets Identifiers of previously rendered elements.\n */\n\n/**\n * @typedef {function(Map, ?FrameState): any} PostRenderFunction\n */\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 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 css 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 wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection} [controls] Controls.\n * @property {Collection} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection} overlays Overlays.\n * @property {Object} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} MapEventHandler\n */\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.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.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. If passed by element, the container can be in a secondary document.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise} [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/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n */\nfunction removeLayerMapProperty(layer) {\n if (layer instanceof Layer) {\n layer.setMapInternal(null);\n return;\n }\n if (layer instanceof LayerGroup) {\n layer.getLayers().forEach(removeLayerMapProperty);\n }\n}\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */\nfunction setLayerMapProperty(layer, map) {\n if (layer instanceof Layer) {\n layer.setMapInternal(map);\n return;\n }\n if (layer instanceof LayerGroup) {\n const layers = layer.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n setLayerMapProperty(layers[i], map);\n }\n }\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.js';\n * import View from 'ol/View.js';\n * import TileLayer from 'ol/layer/Tile.js';\n * import OSM from 'ol/source/OSM.js';\n *\n * const 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~TileLayer} 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~LayerGroup}\n * is a subclass of {@link module:ol/layer/Base~BaseLayer}, 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 * @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 */\nclass Map extends BaseObject {\n /**\n * @param {MapOptions} [options] Map options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /***\n * @type {MapEventHandler}\n */\n this.on;\n\n /***\n * @type {MapEventHandler}\n */\n this.once;\n\n /***\n * @type {MapEventHandler}\n */\n this.un;\n\n const optionsInternal = createOptionsInternal(options);\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.renderComplete_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.loaded_ = true;\n\n /** @private */\n this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ =\n options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ =\n options.pixelRatio !== undefined\n ? options.pixelRatio\n : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.postRenderTimeoutHandle_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = this.animationDelay_.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = createTransform();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {?Array}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.viewport_ = document.createElement('div');\n this.viewport_.className =\n '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 /**\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 /**\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 /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.moveTolerance_ = options.moveTolerance;\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {?Array}\n */\n this.targetChangeHandlerKeys_ = null;\n\n /**\n * @private\n * @type {HTMLElement|null}\n */\n this.targetElement_ = null;\n\n /**\n * @type {ResizeObserver}\n */\n this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n\n /**\n * @type {Collection}\n * @protected\n */\n this.controls = optionsInternal.controls || defaultControls();\n\n /**\n * @type {Collection}\n * @protected\n */\n this.interactions =\n optionsInternal.interactions ||\n defaultInteractions({\n onFocusOnly: true,\n });\n\n /**\n * @type {Collection}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default|null}\n * @private\n */\n this.renderer_ = null;\n\n /**\n * @private\n * @type {!Array}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new TileQueue(\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this)\n );\n\n this.addChangeListener(\n MapProperty.LAYERGROUP,\n this.handleLayerGroupChanged_\n );\n this.addChangeListener(MapProperty.VIEW, this.handleViewChanged_);\n this.addChangeListener(MapProperty.SIZE, this.handleSizeChanged_);\n this.addChangeListener(MapProperty.TARGET, this.handleTargetChanged_);\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\n const map = this;\n if (options.view && !(options.view instanceof View)) {\n options.view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\n\n this.controls.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.controls.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n this.addOverlayInternal_(event.element);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n const id = event.element.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }\n );\n\n this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n */\n (control) => {\n control.setMap(this);\n }\n );\n\n this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n */\n (interaction) => {\n interaction.setMap(this);\n }\n );\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n }\n\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n addControl(control) {\n this.getControls().push(control);\n }\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 `getInteractions()` 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 addInteraction(interaction) {\n this.getInteractions().push(interaction);\n }\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 addLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n * @private\n */\n handleLayerAdd_(event) {\n setLayerMapProperty(event.layer, this);\n }\n\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n addOverlay(overlay) {\n this.getOverlays().push(overlay);\n }\n\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n addOverlayInternal_(overlay) {\n const id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n }\n\n /**\n *\n * Clean up.\n */\n disposeInternal() {\n this.controls.clear();\n this.interactions.clear();\n this.overlays_.clear();\n this.resizeObserver_.disconnect();\n this.setTarget(null);\n super.disposeInternal();\n }\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 `options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.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 feature} or\n * {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is\n * the {@link module:ol/layer/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} [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 T\n * @api\n */\n forEachFeatureAtPixel(pixel, callback, options) {\n if (!this.frameState_ || !this.renderer_) {\n return;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n callback,\n null,\n layerFilter,\n null\n );\n }\n\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {Array} The detected features or\n * an empty array if none were found.\n * @api\n */\n getFeaturesAtPixel(pixel, options) {\n const features = [];\n this.forEachFeatureAtPixel(\n pixel,\n function (feature) {\n features.push(feature);\n },\n options\n );\n return features;\n }\n\n /**\n * Get all layers from all layer groups.\n * @return {Array} Layers.\n * @api\n */\n getAllLayers() {\n const layers = [];\n function addLayersFrom(layerGroup) {\n layerGroup.forEach(function (layer) {\n if (layer instanceof LayerGroup) {\n addLayersFrom(layer.getLayers());\n } else {\n layers.push(layer);\n }\n });\n }\n addLayersFrom(this.getLayers());\n return layers;\n }\n\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through the `layerFilter` option.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n hasFeatureAtPixel(pixel, options) {\n if (!this.frameState_ || !this.renderer_) {\n return false;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n layerFilter,\n null\n );\n }\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 getEventCoordinate(event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n }\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 getEventCoordinateInternal(event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n }\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent|{clientX: number, clientY: number}} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n getEventPixel(event) {\n const viewport = this.viewport_;\n const viewportPosition = viewport.getBoundingClientRect();\n const viewportSize = this.getSize();\n const scaleX = viewportPosition.width / viewportSize[0];\n const scaleY = viewportPosition.height / viewportSize[1];\n const eventPosition =\n //FIXME Are we really calling this with a TouchEvent anywhere?\n 'changedTouches' in event\n ? /** @type {TouchEvent} */ (event).changedTouches[0]\n : /** @type {MouseEvent} */ (event);\n\n return [\n (eventPosition.clientX - viewportPosition.left) / scaleX,\n (eventPosition.clientY - viewportPosition.top) / scaleY,\n ];\n }\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 getTarget() {\n return /** @type {HTMLElement|string|undefined} */ (\n this.get(MapProperty.TARGET)\n );\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 getTargetElement() {\n return this.targetElement_;\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 getCoordinateFromPixel(pixel) {\n return toUserCoordinate(\n this.getCoordinateFromPixelInternal(pixel),\n this.getView().getProjection()\n );\n }\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 getCoordinateFromPixelInternal(pixel) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return applyTransform(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 getControls() {\n return this.controls;\n }\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 getOverlays() {\n return this.overlays_;\n }\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 getOverlayById(id) {\n const overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n }\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 getInteractions() {\n return this.interactions;\n }\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 getLayerGroup() {\n return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n }\n\n /**\n * Clear any existing layers and add layers to the map.\n * @param {Array|Collection} layers The layers to be added to the map.\n * @api\n */\n setLayers(layers) {\n const group = this.getLayerGroup();\n if (layers instanceof Collection) {\n group.setLayers(layers);\n return;\n }\n\n const collection = group.getLayers();\n collection.clear();\n collection.extend(layers);\n }\n\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection} Layers.\n * @api\n */\n getLayers() {\n const layers = this.getLayerGroup().getLayers();\n return layers;\n }\n\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n getLoadingOrNotReady() {\n const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const state = layerStatesArray[i];\n if (!state.visible) {\n continue;\n }\n const renderer = state.layer.getRenderer();\n if (renderer && !renderer.ready) {\n return true;\n }\n const source = state.layer.getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n }\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 getPixelFromCoordinate(coordinate) {\n const viewCoordinate = fromUserCoordinate(\n coordinate,\n this.getView().getProjection()\n );\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n }\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 getPixelFromCoordinateInternal(coordinate) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(0, 2)\n );\n }\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default|null} Renderer\n */\n getRenderer() {\n return this.renderer_;\n }\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 getSize() {\n return /** @type {import(\"./size.js\").Size|undefined} */ (\n this.get(MapProperty.SIZE)\n );\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 getView() {\n return /** @type {View} */ (this.get(MapProperty.VIEW));\n }\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n getViewport() {\n return this.viewport_;\n }\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 getOverlayContainer() {\n return this.overlayContainer_;\n }\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 getOverlayContainerStopEvent() {\n return this.overlayContainerStopEvent_;\n }\n\n /**\n * @return {!Document} The document where the map is displayed.\n */\n getOwnerDocument() {\n const targetElement = this.getTargetElement();\n return targetElement ? targetElement.ownerDocument : document;\n }\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 getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n return getTilePriority(\n this.frameState_,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n );\n }\n\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string} [type] Type.\n */\n handleBrowserEvent(browserEvent, type) {\n type = type || browserEvent.type;\n const mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n }\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n handleMapBrowserEvent(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 const originalEvent = /** @type {PointerEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const eventType = originalEvent.type;\n if (\n eventType === PointerEventType.POINTERDOWN ||\n eventType === EventType.WHEEL ||\n eventType === EventType.KEYDOWN\n ) {\n const doc = this.getOwnerDocument();\n const rootNode = this.viewport_.getRootNode\n ? this.viewport_.getRootNode()\n : doc;\n const target = /** @type {Node} */ (originalEvent.target);\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 === doc ? doc.documentElement : rootNode).contains(target)\n ) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n const interactionsArray = this.getInteractions().getArray().slice();\n for (let i = interactionsArray.length - 1; i >= 0; i--) {\n const interaction = interactionsArray[i];\n if (\n interaction.getMap() !== this ||\n !interaction.getActive() ||\n !this.getTargetElement()\n ) {\n continue;\n }\n const cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont || mapBrowserEvent.propagationStopped) {\n break;\n }\n }\n }\n }\n\n /**\n * @protected\n */\n handlePostRender() {\n const frameState = this.frameState_;\n\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 const tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n let maxTotalLoading = this.maxTilesLoading_;\n let maxNewLoads = maxTotalLoading;\n if (frameState) {\n const hints = frameState.viewHints;\n if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n const lowOnFrameBudget = 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\n if (frameState && this.renderer_ && !frameState.animate) {\n if (this.renderComplete_ === true) {\n if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {\n this.renderer_.dispatchRenderEvent(\n RenderEventType.RENDERCOMPLETE,\n frameState\n );\n }\n if (this.loaded_ === false) {\n this.loaded_ = true;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADEND, this, frameState)\n );\n }\n } else if (this.loaded_ === true) {\n this.loaded_ = false;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADSTART, this, frameState)\n );\n }\n }\n\n const postRenderFunctions = this.postRenderFunctions_;\n for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n }\n\n /**\n * @private\n */\n handleSizeChanged_() {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n handleTargetChanged_() {\n if (this.mapBrowserEventHandler_) {\n for (let i = 0, ii = this.targetChangeHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.targetChangeHandlerKeys_[i]);\n }\n this.targetChangeHandlerKeys_ = null;\n this.viewport_.removeEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_\n );\n this.viewport_.removeEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_\n );\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n removeNode(this.viewport_);\n }\n\n if (this.targetElement_) {\n this.resizeObserver_.unobserve(this.targetElement_);\n const rootNode = this.targetElement_.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.unobserve(rootNode.host);\n }\n this.setSize(undefined);\n }\n\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\n const target = this.getTarget();\n const targetElement =\n typeof target === 'string' ? document.getElementById(target) : target;\n this.targetElement_ = targetElement;\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderTimeoutHandle_ = undefined;\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_ = new CompositeMapRenderer(this);\n }\n\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n this,\n this.moveTolerance_\n );\n for (const key in MapBrowserEventType) {\n this.mapBrowserEventHandler_.addEventListener(\n MapBrowserEventType[key],\n this.handleMapBrowserEvent.bind(this)\n );\n }\n this.viewport_.addEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n false\n );\n this.viewport_.addEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n\n const keyboardEventTarget = !this.keyboardEventTarget_\n ? targetElement\n : this.keyboardEventTarget_;\n this.targetChangeHandlerKeys_ = [\n listen(\n keyboardEventTarget,\n EventType.KEYDOWN,\n this.handleBrowserEvent,\n this\n ),\n listen(\n keyboardEventTarget,\n EventType.KEYPRESS,\n this.handleBrowserEvent,\n this\n ),\n ];\n const rootNode = targetElement.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.observe(rootNode.host);\n }\n this.resizeObserver_.observe(targetElement);\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n }\n\n /**\n * @private\n */\n handleTileChange_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewPropertyChanged_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewChanged_() {\n if (this.viewPropertyListenerKey_) {\n unlistenByKey(this.viewPropertyListenerKey_);\n this.viewPropertyListenerKey_ = null;\n }\n if (this.viewChangeListenerKey_) {\n unlistenByKey(this.viewChangeListenerKey_);\n this.viewChangeListenerKey_ = null;\n }\n const view = this.getView();\n if (view) {\n this.updateViewportSize_();\n\n this.viewPropertyListenerKey_ = listen(\n view,\n ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n this.viewChangeListenerKey_ = listen(\n view,\n EventType.CHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n\n view.resolveConstraints(0);\n }\n this.render();\n }\n\n /**\n * @private\n */\n handleLayerGroupChanged_() {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n const layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.handleLayerAdd_(new GroupEvent('addlayer', layerGroup));\n this.layerGroupPropertyListenerKeys_ = [\n listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n listen(layerGroup, EventType.CHANGE, this.render, this),\n listen(layerGroup, 'addlayer', this.handleLayerAdd_, this),\n listen(layerGroup, 'removelayer', this.handleLayerRemove_, this),\n ];\n }\n this.render();\n }\n\n /**\n * @return {boolean} Is rendered.\n */\n isRendered() {\n return !!this.frameState_;\n }\n\n /**\n * @private\n */\n animationDelay_() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n renderSync() {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n }\n\n /**\n * Redraws all text after new fonts have loaded\n */\n redrawText() {\n const layerStates = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n const layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n }\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n render() {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\n }\n\n /**\n * This method is meant to be called in a layer's `prerender` listener. It causes all collected\n * declutter items to be decluttered and rendered on the map immediately. This is useful for\n * layers that need to appear entirely above the decluttered items of layers lower in the layer\n * stack.\n * @api\n */\n flushDeclutterItems() {\n const frameState = this.frameState_;\n if (!frameState) {\n return;\n }\n this.renderer_.flushDeclutterItems(frameState);\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 removeControl(control) {\n return this.getControls().remove(control);\n }\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 removeInteraction(interaction) {\n return this.getInteractions().remove(interaction);\n }\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 removeLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n * @private\n */\n handleLayerRemove_(event) {\n removeLayerMapProperty(event.layer);\n }\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 removeOverlay(overlay) {\n return this.getOverlays().remove(overlay);\n }\n\n /**\n * @param {number} time Time.\n * @private\n */\n renderFrame_(time) {\n const size = this.getSize();\n const view = this.getView();\n const previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n let frameState = null;\n if (size !== undefined && hasArea(size) && view && view.isDef()) {\n const viewHints = view.getHints(\n this.frameState_ ? this.frameState_.viewHints : undefined\n );\n const viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutterTree: null,\n extent: getForViewAndSize(\n viewState.center,\n viewState.resolution,\n viewState.rotation,\n size\n ),\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 mapId: getUid(this),\n renderTargets: {},\n };\n if (viewState.nextCenter && viewState.nextResolution) {\n const rotation = isNaN(viewState.nextRotation)\n ? viewState.rotation\n : viewState.nextRotation;\n\n frameState.nextExtent = getForViewAndSize(\n viewState.nextCenter,\n viewState.nextResolution,\n rotation,\n size\n );\n }\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(\n this.postRenderFunctions_,\n frameState.postRenderFunctions\n );\n\n if (previousFrameState) {\n const moveStart =\n !this.previousExtent_ ||\n (!isEmpty(this.previousExtent_) &&\n !equalsExtent(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVESTART, this, previousFrameState)\n );\n this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n const idle =\n this.previousExtent_ &&\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING] &&\n !equalsExtent(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVEEND, this, frameState)\n );\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n this.renderComplete_ =\n this.hasListener(MapEventType.LOADSTART) ||\n this.hasListener(MapEventType.LOADEND) ||\n this.hasListener(RenderEventType.RENDERCOMPLETE)\n ? !this.tileQueue_.getTilesLoading() &&\n !this.tileQueue_.getCount() &&\n !this.getLoadingOrNotReady()\n : undefined;\n\n if (!this.postRenderTimeoutHandle_) {\n this.postRenderTimeoutHandle_ = setTimeout(() => {\n this.postRenderTimeoutHandle_ = undefined;\n this.handlePostRender();\n }, 0);\n }\n }\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 setLayerGroup(layerGroup) {\n const oldLayerGroup = this.getLayerGroup();\n if (oldLayerGroup) {\n this.handleLayerRemove_(new GroupEvent('removelayer', oldLayerGroup));\n }\n this.set(MapProperty.LAYERGROUP, layerGroup);\n }\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 setSize(size) {\n this.set(MapProperty.SIZE, size);\n }\n\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string} [target] The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n setTarget(target) {\n this.set(MapProperty.TARGET, target);\n }\n\n /**\n * Set the view for this map.\n * @param {View|Promise} view The view that controls this map.\n * It is also possible to pass a promise that resolves to options for constructing a view. This\n * alternative allows view properties to be resolved by sources or other components that load\n * view-related metadata.\n * @observable\n * @api\n */\n setView(view) {\n if (!view || view instanceof View) {\n this.set(MapProperty.VIEW, view);\n return;\n }\n this.set(MapProperty.VIEW, new View());\n\n const map = this;\n view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\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 updateSize() {\n const targetElement = this.getTargetElement();\n\n let size = undefined;\n if (targetElement) {\n const computedStyle = getComputedStyle(targetElement);\n const width =\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']);\n const height =\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth']);\n if (!isNaN(width) && !isNaN(height)) {\n size = [width, height];\n if (\n !hasArea(size) &&\n !!(\n targetElement.offsetWidth ||\n targetElement.offsetHeight ||\n targetElement.getClientRects().length\n )\n ) {\n warn(\n \"No map visible because the map container's width or height are 0.\"\n );\n }\n }\n }\n\n const oldSize = this.getSize();\n if (size && (!oldSize || !equals(size, oldSize))) {\n this.setSize(size);\n this.updateViewportSize_();\n }\n }\n\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @private\n */\n updateViewportSize_() {\n const view = this.getView();\n if (view) {\n let size = undefined;\n const computedStyle = getComputedStyle(this.viewport_);\n if (computedStyle.width && computedStyle.height) {\n size = [\n parseInt(computedStyle.width, 10),\n parseInt(computedStyle.height, 10),\n ];\n }\n view.setViewportSize(size);\n }\n }\n}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n let keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget =\n typeof options.keyboardEventTarget === 'string'\n ? document.getElementById(options.keyboardEventTarget)\n : options.keyboardEventTarget;\n }\n\n /**\n * @type {Object}\n */\n const values = {};\n\n const layerGroup =\n options.layers &&\n typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n ? /** @type {LayerGroup} */ (options.layers)\n : new LayerGroup({\n layers:\n /** @type {Collection|Array} */ (\n options.layers\n ),\n });\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] =\n options.view instanceof View ? options.view : new View();\n\n /** @type {Collection} */\n let controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n 'Expected `controls` to be an array or an `ol/Collection.js`'\n );\n controls = options.controls;\n }\n }\n\n /** @type {Collection} */\n let interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.interactions).getArray) ===\n 'function',\n 'Expected `interactions` to be an array or an `ol/Collection.js`'\n );\n interactions = options.interactions;\n }\n }\n\n /** @type {Collection} */\n let overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n 'Expected `overlays` to be an array or an `ol/Collection.js`'\n );\n overlays = options.overlays;\n }\n } else {\n overlays = new Collection();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values,\n };\n}\nexport default Map;\n","/**\n * @module ol/control/defaults\n */\nimport Attribution from './Attribution.js';\nimport Collection from '../Collection.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./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(\"./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(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n */\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} [options] Options for the default controls.\n * @return {Collection} A collection of controls\n * to be used with the {@link module:ol/Map~Map} constructor's `controls` option.\n * @api\n */\nexport function defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const controls = new Collection();\n\n const zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n const rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n const attributionControl =\n options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n","/**\n * @module ol/interaction/defaults\n */\nimport Collection from '../Collection.js';\nimport DoubleClickZoom from './DoubleClickZoom.js';\nimport DragPan from './DragPan.js';\nimport DragRotate from './DragRotate.js';\nimport DragZoom from './DragZoom.js';\nimport KeyboardPan from './KeyboardPan.js';\nimport KeyboardZoom from './KeyboardZoom.js';\nimport Kinetic from '../Kinetic.js';\nimport MouseWheelZoom from './MouseWheelZoom.js';\nimport PinchRotate from './PinchRotate.js';\nimport PinchZoom from './PinchZoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed. If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction~Interaction} instances and insert\n * them into a {@link module:ol/Collection~Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions} [options] Defaults options.\n * @return {Collection}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const interactions = new Collection();\n\n const kinetic = new Kinetic(-0.005, 0.05, 100);\n\n const altShiftDragRotate =\n options.altShiftDragRotate !== undefined\n ? options.altShiftDragRotate\n : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n const doubleClickZoom =\n options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(\n new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(\n new DragPan({\n onFocusOnly: options.onFocusOnly,\n kinetic: kinetic,\n })\n );\n }\n\n const pinchRotate =\n options.pinchRotate !== undefined ? options.pinchRotate : true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(\n new PinchZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new KeyboardPan());\n interactions.push(\n new KeyboardZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const mouseWheelZoom =\n options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(\n new MouseWheelZoom({\n onFocusOnly: options.onFocusOnly,\n duration: options.zoomDuration,\n })\n );\n }\n\n const shiftDragZoom =\n options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(\n new DragZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n return interactions;\n}\n","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\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 constructor(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n begin() {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n update(x, y) {\n this.points_.push(x, y, Date.now());\n }\n\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n end() {\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 const delay = Date.now() - this.delay_;\n const 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\n // get the first point which still falls into the delay time\n let firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n const 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\n const dx = this.points_[lastIndex] - this.points_[firstIndex];\n const 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 /**\n * @return {number} Total distance travelled (pixels).\n */\n getDistance() {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n }\n\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n getAngle() {\n return this.angle_;\n }\n}\n\nexport default Kinetic;\n","/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport {getUid} from './util.js';\nimport {isEmpty} from './obj.js';\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\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 constructor(type, key, oldValue) {\n super(type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\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 }\n}\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\n */\n\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~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 */\nclass BaseObject extends Observable {\n /**\n * @param {Object} [values] An object with key-value pairs.\n */\n constructor(values) {\n super();\n\n /***\n * @type {ObjectOnSignature}\n */\n this.on;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.once;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.un;\n\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 getUid(this);\n\n /**\n * @private\n * @type {Object}\n */\n this.values_ = null;\n\n if (values !== undefined) {\n this.setProperties(values);\n }\n }\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n get(key) {\n let value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n }\n\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n getKeys() {\n return (this.values_ && Object.keys(this.values_)) || [];\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && Object.assign({}, this.values_)) || {};\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object?} Object.\n */\n getPropertiesInternal() {\n return this.values_;\n }\n\n /**\n * @return {boolean} The object has properties.\n */\n hasProperties() {\n return !!this.values_;\n }\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n notify(key, oldValue) {\n let eventType;\n eventType = `change:${key}`;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = ObjectEventType.PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n addChangeListener(key, listener) {\n this.addEventListener(`change:${key}`, listener);\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n removeChangeListener(key, listener) {\n this.removeEventListener(`change:${key}`, listener);\n }\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n set(key, value, silent) {\n const values = this.values_ || (this.values_ = {});\n if (silent) {\n values[key] = value;\n } else {\n const oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\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} [silent] Update without triggering an event.\n * @api\n */\n setProperties(values, silent) {\n for (const key in values) {\n this.set(key, values[key], silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n Object.assign(this.values_ || (this.values_ = {}), source.values_);\n }\n\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [silent] Unset without triggering an event.\n * @api\n */\n unset(key, silent) {\n if (this.values_ && key in this.values_) {\n const oldValue = this.values_[key];\n delete this.values_[key];\n if (isEmpty(this.values_)) {\n this.values_ = null;\n }\n if (!silent) {\n this.notify(key, oldValue);\n }\n }\n }\n}\n\nexport default BaseObject;\n","/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange',\n};\n\n/**\n * @typedef {'propertychange'} Types\n */\n","/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {listen, listenOnce, unlistenByKey} from './events.js';\n\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\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 */\nclass Observable extends EventTarget {\n constructor() {\n super();\n\n this.on =\n /** @type {ObservableOnSignature} */ (\n this.onInternal\n );\n\n this.once =\n /** @type {ObservableOnSignature} */ (\n this.onceInternal\n );\n\n this.un = /** @type {ObservableOnSignature} */ (this.unInternal);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n }\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n changed() {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n }\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 getRevision() {\n return this.revision_;\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onInternal(type, listener) {\n if (Array.isArray(type)) {\n const len = type.length;\n const keys = new Array(len);\n for (let i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n }\n return listen(this, /** @type {string} */ (type), listener);\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onceInternal(type, listener) {\n let key;\n if (Array.isArray(type)) {\n const len = type.length;\n key = new Array(len);\n for (let i = 0; i < len; ++i) {\n key[i] = listenOnce(this, type[i], listener);\n }\n } else {\n key = listenOnce(this, /** @type {string} */ (type), listener);\n }\n /** @type {Object} */ (listener).ol_key = key;\n return key;\n }\n\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n unInternal(type, listener) {\n const key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (let 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}\n\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} 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 */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} 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 */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\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 */\nexport function unByKey(key) {\n if (Array.isArray(key)) {\n for (let i = 0, ii = key.length; i < ii; ++i) {\n unlistenByKey(key[i]);\n }\n } else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\nexport default Observable;\n","/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport {abstract} from './util.js';\nimport {easeIn} from './easing.js';\n\n/**\n * A function that takes an {@link module:ol/Tile~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.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const 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/**\n * {@link module:ol/source/Tile~TileSource} 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~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/**\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 * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\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 /**\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 /**\n * The duration for the opacity transition.\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\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\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n if (this.state === TileState.ERROR) {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(TileState.EMPTY);\n }\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\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 getInterimTile() {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n let tile = this.interimTile;\n\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() == TileState.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\n // we can not find a better tile\n return this;\n }\n\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n refreshInterimChain() {\n if (!this.interimTile) {\n return;\n }\n\n let tile = this.interimTile;\n\n /**\n * @type {Tile}\n */\n let prev = this;\n\n do {\n if (tile.getState() == TileState.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() == TileState.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() == TileState.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 /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\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 setState(state) {\n if (this.state !== TileState.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n }\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 load() {\n abstract();\n }\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 getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let 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\n const delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n }\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 inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n}\n\nexport default Tile;\n","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n/**\n * @type {number}\n */\nexport const DROP = Infinity;\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js\n * and https://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nclass PriorityQueue {\n /**\n * @param {function(T): number} priorityFunction Priority function.\n * @param {function(T): string} keyFunction Key function.\n */\n constructor(priorityFunction, keyFunction) {\n /**\n * @type {function(T): number}\n * @private\n */\n this.priorityFunction_ = priorityFunction;\n\n /**\n * @type {function(T): string}\n * @private\n */\n this.keyFunction_ = keyFunction;\n\n /**\n * @type {Array}\n * @private\n */\n this.elements_ = [];\n\n /**\n * @type {Array}\n * @private\n */\n this.priorities_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.queuedElements_ = {};\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.elements_.length = 0;\n this.priorities_.length = 0;\n clear(this.queuedElements_);\n }\n\n /**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\n dequeue() {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[0];\n if (elements.length == 1) {\n elements.length = 0;\n priorities.length = 0;\n } else {\n elements[0] = elements.pop();\n priorities[0] = priorities.pop();\n this.siftUp_(0);\n }\n const elementKey = this.keyFunction_(element);\n delete this.queuedElements_[elementKey];\n return element;\n }\n\n /**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n assert(\n !(this.keyFunction_(element) in this.queuedElements_),\n 'Tried to enqueue an `element` that was already added to the queue'\n );\n const priority = this.priorityFunction_(element);\n if (priority != DROP) {\n this.elements_.push(element);\n this.priorities_.push(priority);\n this.queuedElements_[this.keyFunction_(element)] = true;\n this.siftDown_(0, this.elements_.length - 1);\n return true;\n }\n return false;\n }\n\n /**\n * @return {number} Count.\n */\n getCount() {\n return this.elements_.length;\n }\n\n /**\n * Gets the index of the left child of the node at the given index.\n * @param {number} index The index of the node to get the left child for.\n * @return {number} The index of the left child.\n * @private\n */\n getLeftChildIndex_(index) {\n return index * 2 + 1;\n }\n\n /**\n * Gets the index of the right child of the node at the given index.\n * @param {number} index The index of the node to get the right child for.\n * @return {number} The index of the right child.\n * @private\n */\n getRightChildIndex_(index) {\n return index * 2 + 2;\n }\n\n /**\n * Gets the index of the parent of the node at the given index.\n * @param {number} index The index of the node to get the parent for.\n * @return {number} The index of the parent.\n * @private\n */\n getParentIndex_(index) {\n return (index - 1) >> 1;\n }\n\n /**\n * Make this a heap. O(N).\n * @private\n */\n heapify_() {\n let i;\n for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n this.siftUp_(i);\n }\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.elements_.length === 0;\n }\n\n /**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\n isKeyQueued(key) {\n return key in this.queuedElements_;\n }\n\n /**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\n isQueued(element) {\n return this.isKeyQueued(this.keyFunction_(element));\n }\n\n /**\n * @param {number} index The index of the node to move down.\n * @private\n */\n siftUp_(index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const count = elements.length;\n const element = elements[index];\n const priority = priorities[index];\n const startIndex = index;\n\n while (index < count >> 1) {\n const lIndex = this.getLeftChildIndex_(index);\n const rIndex = this.getRightChildIndex_(index);\n\n const smallerChildIndex =\n rIndex < count && priorities[rIndex] < priorities[lIndex]\n ? rIndex\n : lIndex;\n\n elements[index] = elements[smallerChildIndex];\n priorities[index] = priorities[smallerChildIndex];\n index = smallerChildIndex;\n }\n\n elements[index] = element;\n priorities[index] = priority;\n this.siftDown_(startIndex, index);\n }\n\n /**\n * @param {number} startIndex The index of the root.\n * @param {number} index The index of the node to move up.\n * @private\n */\n siftDown_(startIndex, index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[index];\n const priority = priorities[index];\n\n while (index > startIndex) {\n const parentIndex = this.getParentIndex_(index);\n if (priorities[parentIndex] > priority) {\n elements[index] = elements[parentIndex];\n priorities[index] = priorities[parentIndex];\n index = parentIndex;\n } else {\n break;\n }\n }\n elements[index] = element;\n priorities[index] = priority;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n reprioritize() {\n const priorityFunction = this.priorityFunction_;\n const elements = this.elements_;\n const priorities = this.priorities_;\n let index = 0;\n const n = elements.length;\n let element, i, priority;\n for (i = 0; i < n; ++i) {\n element = elements[i];\n priority = priorityFunction(element);\n if (priority == DROP) {\n delete this.queuedElements_[this.keyFunction_(element)];\n } else {\n priorities[index] = priority;\n elements[index++] = element;\n }\n }\n elements.length = index;\n priorities.length = index;\n this.heapify_();\n }\n}\n\nexport default PriorityQueue;\n","/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\nclass TileQueue extends PriorityQueue {\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n constructor(tilePriorityFunction, tileChangeCallback) {\n super(\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 );\n\n /** @private */\n this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.tilesLoadingKeys_ = {};\n }\n\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n const added = super.enqueue(element);\n if (added) {\n const tile = element[0];\n tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n return added;\n }\n\n /**\n * @return {number} Number of tiles loading.\n */\n getTilesLoading() {\n return this.tilesLoading_;\n }\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n const state = tile.getState();\n if (\n state === TileState.LOADED ||\n state === TileState.ERROR ||\n state === TileState.EMPTY\n ) {\n if (state !== TileState.ERROR) {\n tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n const 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 /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n loadMoreTiles(maxTotalLoading, maxNewLoads) {\n let newLoads = 0;\n let state, tile, tileKey;\n while (\n this.tilesLoading_ < maxTotalLoading &&\n newLoads < maxNewLoads &&\n this.getCount() > 0\n ) {\n tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n tileKey = tile.getKey();\n state = tile.getState();\n if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n }\n}\n\nexport default TileQueue;\n\n/**\n * @param {import('./Map.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 */\nexport function getTilePriority(\n frameState,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n) {\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 DROP;\n }\n if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n return 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 const center = frameState.viewState.center;\n const deltaX = tileCenter[0] - center[0];\n const deltaY = tileCenter[1] - center[1];\n return (\n 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n );\n}\n","/**\n * @module ol/TileRange\n */\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 */\nclass TileRange {\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 constructor(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n contains(tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n containsTileRange(tileRange) {\n return (\n this.minX <= tileRange.minX &&\n tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY &&\n tileRange.maxY <= this.maxY\n );\n }\n\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n containsXY(x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n equals(tileRange) {\n return (\n this.minX == tileRange.minX &&\n this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX &&\n this.maxY == tileRange.maxY\n );\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n */\n extend(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 /**\n * @return {number} Height.\n */\n getHeight() {\n return this.maxY - this.minY + 1;\n }\n\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n getSize() {\n return [this.getWidth(), this.getHeight()];\n }\n\n /**\n * @return {number} Width.\n */\n getWidth() {\n return this.maxX - this.minX + 1;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n intersects(tileRange) {\n return (\n this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY\n );\n }\n}\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 */\nexport function 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 }\n return new TileRange(minX, maxX, minY, maxY);\n}\n\nexport default TileRange;\n","/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport 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","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n};\n","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\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 */\nexport function createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number|undefined} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @param {Array} [centerShift] Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, isMoving, centerShift) {\n if (!center) {\n return undefined;\n }\n if (!resolution && !onlyCenter) {\n return center;\n }\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = centerShift ? centerShift[0] : 0;\n const shiftY = centerShift ? centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\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\n let x = clamp(center[0], minX, maxX);\n let y = clamp(center[1], minY, maxY);\n\n // during an interaction, allow some overscroll\n if (isMoving && smooth && resolution) {\n const ratio = 30 * resolution;\n x +=\n -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y +=\n -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n }\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n return center;\n}\n","/**\n * @module ol/resolutionconstraint\n */\nimport {clamp} from './math.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {linearFindNearest} from './array.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(\n resolution,\n maxExtent,\n viewportSize,\n showFullExtent\n) {\n const xResolution = getWidth(maxExtent) / viewportSize[0];\n const yResolution = getHeight(maxExtent) / viewportSize[1];\n\n if (showFullExtent) {\n return Math.min(resolution, Math.max(xResolution, yResolution));\n }\n return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n * - at 1, ln(x) is 0\n * - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n let result = Math.min(resolution, maxResolution);\n const ratio = 50;\n\n result *=\n Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n 1;\n if (minResolution) {\n result = Math.max(result, minResolution);\n result /=\n Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n ratio +\n 1;\n }\n return clamp(result, minResolution / 2, maxResolution * 2);\n}\n\n/**\n * @param {Array} resolutions Resolutions.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n resolutions,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const maxResolution = resolutions[0];\n const minResolution = resolutions[resolutions.length - 1];\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const capped = Math.min(cappedMaxRes, resolution);\n const z = Math.floor(linearFindNearest(resolutions, capped, direction));\n if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n return resolutions[z + 1];\n }\n return resolutions[z];\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [minResolution] Minimum resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n power,\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n minResolution = minResolution !== undefined ? minResolution : 0;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const tolerance = 1e-9;\n const minZoomLevel = Math.ceil(\n Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance\n );\n const offset = -direction * (0.5 - tolerance) + 0.5;\n const capped = Math.min(cappedMaxRes, resolution);\n const cappedZoomLevel = Math.floor(\n Math.log(maxResolution / capped) / Math.log(power) + offset\n );\n const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n const newResolution = maxResolution / Math.pow(power, zoomLevel);\n return clamp(newResolution, minResolution, cappedMaxRes);\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n if (!smooth || !isMoving) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {\n METERS_PER_UNIT,\n createProjection,\n disableCoordinateWarning,\n fromUserCoordinate,\n fromUserExtent,\n getUserProjection,\n toUserCoordinate,\n toUserExtent,\n} from './proj.js';\nimport {VOID} from './functions.js';\nimport {\n add as addCoordinate,\n equals as coordinatesEqual,\n equals,\n rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {assert} from './asserts.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {clamp, modulo} from './math.js';\nimport {\n createMinMaxResolution,\n createSnapToPower,\n createSnapToResolutions,\n} from './resolutionconstraint.js';\nimport {\n createSnapToN,\n createSnapToZero,\n disable,\n none as rotationNone,\n} from './rotationconstraint.js';\nimport {easeOut, inAndOut} from './easing.js';\nimport {\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n isEmpty,\n} from './extent.js';\nimport {linearFindNearest} from './array.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\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/**\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 that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `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 * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\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/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center (in view projection coordinates).\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {import(\"./coordinate.js\").Coordinate} [nextCenter] The next center during an animation series.\n * @property {number} [nextResolution] The next resolution during an animation series.\n * @property {number} [nextRotation] The next rotation during an animation series.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n\n/**\n * Like {@link import(\"./Map.js\").FrameState}, but just `viewState` and `extent`.\n * @typedef {Object} ViewStateLayerStateExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent (in user projection coordinates).\n * @property {Array} [layerStatesArray] Layer states.\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ViewOnSignature\n */\n\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 * Web 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 `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 */\nclass View extends BaseObject {\n /**\n * @param {ViewOptions} [options] View options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {ViewOnSignature}\n */\n this.on;\n\n /***\n * @type {ViewOnSignature}\n */\n this.once;\n\n /***\n * @type {ViewOnSignature}\n */\n this.un;\n\n options = Object.assign({}, options);\n\n /**\n * @private\n * @type {Array}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n this.viewportSize_ = [100, 100];\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.targetCenter_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetResolution_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.nextCenter_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.nextResolution_;\n\n /**\n * @private\n * @type {number}\n */\n this.nextRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.cancelAnchor_ = undefined;\n\n if (options.projection) {\n disableCoordinateWarning();\n }\n if (options.center) {\n options.center = fromUserCoordinate(options.center, this.projection_);\n }\n if (options.extent) {\n options.extent = fromUserExtent(options.extent, this.projection_);\n }\n\n this.applyOptions_(options);\n }\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n applyOptions_(options) {\n const properties = Object.assign({}, options);\n for (const key in ViewProperty) {\n delete properties[key];\n }\n this.setProperties(properties, true);\n\n const resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * @type {Array|undefined}\n * @private\n */\n this.padding_ = options.padding;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n const centerConstraint = createCenterConstraint(options);\n const resolutionConstraint = resolutionConstraintInfo.constraint;\n const rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint,\n };\n\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(\n options.center !== undefined ? options.center : null\n );\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n }\n\n /**\n * Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from that\n * content. The order of the values in the array is top, right, bottom, left.\n * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n * @type {Array|undefined}\n * @api\n */\n get padding() {\n return this.padding_;\n }\n set padding(padding) {\n let oldPadding = this.padding_;\n this.padding_ = padding;\n const center = this.getCenterInternal();\n if (center) {\n const newPadding = padding || [0, 0, 0, 0];\n oldPadding = oldPadding || [0, 0, 0, 0];\n const resolution = this.getResolution();\n const offsetX =\n (resolution / 2) *\n (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n const offsetY =\n (resolution / 2) *\n (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n }\n }\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 getUpdatedOptions_(newOptions) {\n const options = this.getProperties();\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenterInternal();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return Object.assign({}, options, newOptions);\n }\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 animate(var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n const args = new Array(arguments.length);\n for (let i = 0; i < args.length; ++i) {\n let options = arguments[i];\n if (options.center) {\n options = Object.assign({}, options);\n options.center = fromUserCoordinate(\n options.center,\n this.getProjection()\n );\n }\n if (options.anchor) {\n options = Object.assign({}, options);\n options.anchor = fromUserCoordinate(\n options.anchor,\n this.getProjection()\n );\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n }\n\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n animateInternal(var_args) {\n let animationCount = arguments.length;\n let callback;\n if (\n animationCount > 1 &&\n typeof arguments[animationCount - 1] === 'function'\n ) {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n\n let i = 0;\n for (; i < animationCount && !this.isDef(); ++i) {\n // if view properties are not yet set, shortcut to the final state\n const state = arguments[i];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n } else if (state.resolution) {\n this.setResolution(state.resolution);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n }\n if (i === animationCount) {\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n\n let start = Date.now();\n let center = this.targetCenter_.slice();\n let resolution = this.targetResolution_;\n let rotation = this.targetRotation_;\n const series = [];\n for (; i < animationCount; ++i) {\n const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n const animation = {\n start: start,\n complete: false,\n anchor: options.anchor,\n duration: options.duration !== undefined ? options.duration : 1000,\n easing: options.easing || inAndOut,\n callback: callback,\n };\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\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\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n const delta =\n modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\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(ViewHint.ANIMATING, 1);\n this.updateAnimations_();\n }\n\n /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n getAnimating() {\n return this.hints_[ViewHint.ANIMATING] > 0;\n }\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 getInteracting() {\n return this.hints_[ViewHint.INTERACTING] > 0;\n }\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n cancelAnimations() {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n let anchor;\n for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n const series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const 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 this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n }\n\n /**\n * Update all animations.\n */\n updateAnimations_() {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n const now = Date.now();\n let more = false;\n for (let i = this.animations_.length - 1; i >= 0; --i) {\n const series = this.animations_[i];\n let seriesComplete = true;\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (animation.complete) {\n continue;\n }\n const elapsed = now - animation.start;\n let fraction =\n 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 const progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n const x0 = animation.sourceCenter[0];\n const y0 = animation.sourceCenter[1];\n const x1 = animation.targetCenter[0];\n const y1 = animation.targetCenter[1];\n this.nextCenter_ = animation.targetCenter;\n const x = x0 + progress * (x1 - x0);\n const y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n const resolution =\n progress === 1\n ? animation.targetResolution\n : animation.sourceResolution +\n progress *\n (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n const size = this.getViewportSize_(this.getRotation());\n const constrainedResolution = this.constraints_.resolution(\n resolution,\n 0,\n size,\n true\n );\n this.targetCenter_ = this.calculateCenterZoom(\n constrainedResolution,\n animation.anchor\n );\n }\n this.nextResolution_ = animation.targetResolution;\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (\n animation.sourceRotation !== undefined &&\n animation.targetRotation !== undefined\n ) {\n const rotation =\n progress === 1\n ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n Math.PI\n : animation.sourceRotation +\n progress *\n (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n const constrainedRotation = this.constraints_.rotation(\n rotation,\n true\n );\n this.targetCenter_ = this.calculateCenterRotate(\n constrainedRotation,\n animation.anchor\n );\n }\n this.nextRotation_ = animation.targetRotation;\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(ViewHint.ANIMATING, -1);\n this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n const 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(\n this.updateAnimations_.bind(this)\n );\n }\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 calculateCenterRotate(rotation, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n rotateCoordinate(center, rotation - this.getRotation());\n addCoordinate(center, anchor);\n }\n return center;\n }\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 calculateCenterZoom(resolution, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n const currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n const x =\n anchor[0] -\n (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n const y =\n anchor[1] -\n (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n center = [x, y];\n }\n return center;\n }\n\n /**\n * Returns the current viewport size.\n * @private\n * @param {number} [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 getViewportSize_(rotation) {\n const size = this.viewportSize_;\n if (rotation) {\n const w = size[0];\n const h = size[1];\n return [\n Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),\n Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),\n ];\n }\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} [size] Viewport size; if undefined, [100, 100] is assumed\n */\n setViewportSize(size) {\n this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\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 getCenter() {\n const center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return toUserCoordinate(center, this.getProjection());\n }\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 getCenterInternal() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(ViewProperty.CENTER)\n );\n }\n\n /**\n * @return {Constraints} Constraints.\n */\n getConstraints() {\n return this.constraints_;\n }\n\n /**\n * @return {boolean} Resolution constraint is set\n */\n getConstrainResolution() {\n return this.get('constrainResolution');\n }\n\n /**\n * @param {Array} [hints] Destination array.\n * @return {Array} Hint.\n */\n getHints(hints) {\n if (hints !== undefined) {\n hints[0] = this.hints_[0];\n hints[1] = this.hints_[1];\n return hints;\n }\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} [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 calculateExtent(size) {\n const extent = this.calculateExtentInternal(size);\n return toUserExtent(extent, this.getProjection());\n }\n\n /**\n * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided,\n * the map's last known viewport size will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n calculateExtentInternal(size) {\n size = size || this.getViewportSizeMinusPadding_();\n const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n assert(center, 'The view center is not defined');\n const resolution = /** @type {!number} */ (this.getResolution());\n assert(resolution !== undefined, 'The view resolution is not defined');\n const rotation = /** @type {!number} */ (this.getRotation());\n assert(rotation !== undefined, 'The view rotation is not defined');\n\n return getForViewAndSize(center, resolution, rotation, size);\n }\n\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n getMaxResolution() {\n return this.maxResolution_;\n }\n\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n getMinResolution() {\n return this.minResolution_;\n }\n\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.minResolution_)\n );\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 setMaxZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n }\n\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.maxResolution_)\n );\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 setMinZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n }\n\n /**\n * Set whether the view should allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n setConstrainResolution(enabled) {\n this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n }\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n getResolution() {\n return /** @type {number|undefined} */ (this.get(ViewProperty.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 getResolutions() {\n return this.resolutions_;\n }\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} [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 getResolutionForExtent(extent, size) {\n return this.getResolutionForExtentInternal(\n fromUserExtent(extent, this.getProjection()),\n size\n );\n }\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} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n getResolutionForExtentInternal(extent, size) {\n size = size || this.getViewportSizeMinusPadding_();\n const xResolution = getWidth(extent) / size[0];\n const yResolution = getHeight(extent) / size[1];\n return Math.max(xResolution, yResolution);\n }\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} [power] Power.\n * @return {function(number): number} Resolution for value function.\n */\n getResolutionForValueFunction(power) {\n power = power || 2;\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const 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 const resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\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 getRotation() {\n return /** @type {number} */ (this.get(ViewProperty.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} [power] Power.\n * @return {function(number): number} Value for resolution function.\n */\n getValueForResolutionFunction(power) {\n const logPower = Math.log(power || 2);\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n const value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n }\n\n /**\n * Returns the size of the viewport minus padding.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n */\n getViewportSizeMinusPadding_(rotation) {\n let size = this.getViewportSize_(rotation);\n const padding = this.padding_;\n if (padding) {\n size = [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ];\n }\n return size;\n }\n\n /**\n * @return {State} View state.\n */\n getState() {\n const projection = this.getProjection();\n const resolution = this.getResolution();\n const rotation = this.getRotation();\n let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n const padding = this.padding_;\n if (padding) {\n const reducedSize = this.getViewportSizeMinusPadding_();\n center = calculateCenterOn(\n center,\n this.getViewportSize_(),\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n }\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n nextCenter: this.nextCenter_,\n nextResolution: this.nextResolution_,\n nextRotation: this.nextRotation_,\n rotation: rotation,\n zoom: this.getZoom(),\n };\n }\n\n /**\n * @return {ViewStateLayerStateExtent} Like `FrameState`, but just `viewState` and `extent`.\n */\n getViewStateAndExtent() {\n return {\n viewState: this.getState(),\n extent: this.calculateExtent(),\n };\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 getZoom() {\n let zoom;\n const resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n }\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 getZoomForResolution(resolution) {\n let offset = this.minZoom_ || 0;\n let max, zoomFactor;\n if (this.resolutions_) {\n const nearest = 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 /**\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 getResolutionForZoom(zoom) {\n if (this.resolutions_) {\n if (this.resolutions_.length <= 1) {\n return 0;\n }\n const baseLevel = clamp(\n Math.floor(zoom),\n 0,\n this.resolutions_.length - 2\n );\n const zoomFactor =\n this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return (\n this.resolutions_[baseLevel] /\n Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1))\n );\n }\n return (\n this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n );\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} [options] Options.\n * @api\n */\n fit(geometryOrExtent, options) {\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n let geometry;\n assert(\n Array.isArray(geometryOrExtent) ||\n typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n 'function',\n 'Invalid extent or geometry provided as `geometry`'\n );\n if (Array.isArray(geometryOrExtent)) {\n assert(\n !isEmpty(geometryOrExtent),\n 'Cannot fit empty extent provided as `geometry`'\n );\n const extent = fromUserExtent(geometryOrExtent, this.getProjection());\n geometry = polygonFromExtent(extent);\n } else if (geometryOrExtent.getType() === 'Circle') {\n const extent = fromUserExtent(\n geometryOrExtent.getExtent(),\n this.getProjection()\n );\n geometry = polygonFromExtent(extent);\n geometry.rotate(this.getRotation(), getCenter(extent));\n } else {\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometryOrExtent\n .clone()\n .transform(userProjection, this.getProjection())\n );\n } else {\n geometry = geometryOrExtent;\n }\n }\n\n this.fitInternal(geometry, options);\n }\n\n /**\n * Calculate rotated extent\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @return {import(\"./extent\").Extent} The rotated extent for the geometry.\n */\n rotatedExtentForGeometry(geometry) {\n const rotation = this.getRotation();\n const cosAngle = Math.cos(rotation);\n const sinAngle = Math.sin(-rotation);\n const coords = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n let minRotX = +Infinity;\n let minRotY = +Infinity;\n let maxRotX = -Infinity;\n let maxRotY = -Infinity;\n for (let i = 0, ii = coords.length; i < ii; i += stride) {\n const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n const 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 return [minRotX, minRotY, maxRotX, maxRotY];\n }\n\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions} [options] Options.\n */\n fitInternal(geometry, options) {\n options = options || {};\n let size = options.size;\n if (!size) {\n size = this.getViewportSizeMinusPadding_();\n }\n const padding =\n options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n const nearest = options.nearest !== undefined ? options.nearest : false;\n let 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\n const rotatedExtent = this.rotatedExtentForGeometry(geometry);\n\n // calculate resolution\n let resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ]);\n resolution = isNaN(resolution)\n ? minResolution\n : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n // calculate center\n const rotation = this.getRotation();\n const sinAngle = Math.sin(rotation);\n const cosAngle = Math.cos(rotation);\n const centerRot = getCenter(rotatedExtent);\n centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n const centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n const centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n const center = this.getConstrainedCenter([centerX, centerY], resolution);\n const callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animateInternal(\n {\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing,\n },\n callback\n );\n } else {\n this.targetResolution_ = resolution;\n this.targetCenter_ = center;\n this.applyTargetState_(false, true);\n animationCallback(callback, true);\n }\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 centerOn(coordinate, size, position) {\n this.centerOnInternal(\n fromUserCoordinate(coordinate, this.getProjection()),\n size,\n position\n );\n }\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 centerOnInternal(coordinate, size, position) {\n this.setCenterInternal(\n calculateCenterOn(\n coordinate,\n size,\n position,\n this.getResolution(),\n this.getRotation()\n )\n );\n }\n\n /**\n * Calculates the shift between map and viewport center.\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array|undefined} Center shift.\n */\n calculateCenterShift(center, resolution, rotation, size) {\n let centerShift;\n const padding = this.padding_;\n if (padding && center) {\n const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n const shiftedCenter = calculateCenterOn(\n center,\n size,\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n centerShift = [\n center[0] - shiftedCenter[0],\n center[1] - shiftedCenter[1],\n ];\n }\n return centerShift;\n }\n\n /**\n * @return {boolean} Is defined.\n */\n isDef() {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\n }\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 adjustCenter(deltaCoordinates) {\n const center = toUserCoordinate(this.targetCenter_, this.getProjection());\n this.setCenter([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\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 adjustCenterInternal(deltaCoordinates) {\n const center = this.targetCenter_;\n this.setCenterInternal([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\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} [anchor] The origin of the transformation.\n * @api\n */\n adjustResolution(ratio, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\n }\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} [anchor] The origin of the transformation.\n */\n adjustResolutionInternal(ratio, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const size = this.getViewportSize_(this.getRotation());\n const newResolution = this.constraints_.resolution(\n this.targetResolution_ * ratio,\n 0,\n size,\n isMoving\n );\n\n if (anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);\n }\n\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n }\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} [anchor] The origin of the transformation.\n * @api\n */\n adjustZoom(delta, anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);\n }\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} [anchor] The rotation center.\n * @api\n */\n adjustRotation(delta, anchor) {\n if (anchor) {\n anchor = fromUserCoordinate(anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, anchor);\n }\n\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n */\n adjustRotationInternal(delta, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const newRotation = this.constraints_.rotation(\n this.targetRotation_ + delta,\n isMoving\n );\n if (anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n }\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 setCenter(center) {\n this.setCenterInternal(\n center ? fromUserCoordinate(center, this.getProjection()) : center\n );\n }\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 setCenterInternal(center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n }\n\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n setHint(hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n }\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 setResolution(resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n }\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 setRotation(rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n }\n\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n setZoom(zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n }\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} [doNotCancelAnims] Do not cancel animations.\n * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n * @private\n */\n applyTargetState_(doNotCancelAnims, forceMoving) {\n const isMoving =\n this.getAnimating() || this.getInteracting() || forceMoving;\n\n // compute rotation\n const newRotation = this.constraints_.rotation(\n this.targetRotation_,\n isMoving\n );\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n 0,\n size,\n isMoving\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n isMoving,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\n if (this.get(ViewProperty.ROTATION) !== newRotation) {\n this.set(ViewProperty.ROTATION, newRotation);\n }\n if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n this.set(ViewProperty.RESOLUTION, newResolution);\n this.set('zoom', this.getZoom(), true);\n }\n if (\n !newCenter ||\n !this.get(ViewProperty.CENTER) ||\n !equals(this.get(ViewProperty.CENTER), newCenter)\n ) {\n this.set(ViewProperty.CENTER, newCenter);\n }\n\n if (this.getAnimating() && !doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n }\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} [duration] The animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n resolveConstraints(duration, resolutionDirection, anchor) {\n duration = duration !== undefined ? duration : 200;\n const direction = resolutionDirection || 0;\n\n const newRotation = this.constraints_.rotation(this.targetRotation_);\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n direction,\n size\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n false,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\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\n anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n\n if (\n this.getResolution() !== newResolution ||\n this.getRotation() !== newRotation ||\n !this.getCenterInternal() ||\n !equals(this.getCenterInternal(), newCenter)\n ) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n\n this.animateInternal({\n rotation: newRotation,\n center: newCenter,\n resolution: newResolution,\n duration: duration,\n easing: easeOut,\n anchor: anchor,\n });\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 beginInteraction() {\n this.resolveConstraints(0);\n\n this.setHint(ViewHint.INTERACTING, 1);\n }\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} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n endInteraction(duration, resolutionDirection, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.endInteractionInternal(duration, resolutionDirection, anchor);\n }\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} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n endInteractionInternal(duration, resolutionDirection, anchor) {\n if (!this.getInteracting()) {\n return;\n }\n this.setHint(ViewHint.INTERACTING, -1);\n this.resolveConstraints(duration, resolutionDirection, anchor);\n }\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} [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 getConstrainedCenter(targetCenter, targetResolution) {\n const size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(\n targetCenter,\n targetResolution || this.getResolution(),\n size\n );\n }\n\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number} [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 getConstrainedZoom(targetZoom, direction) {\n const targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(\n this.getConstrainedResolution(targetRes, direction)\n );\n }\n\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number} [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 getConstrainedResolution(targetResolution, direction) {\n direction = direction || 0;\n const size = this.getViewportSize_(this.getRotation());\n\n return this.constraints_.resolution(targetResolution, direction, size);\n }\n}\n\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/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n if (options.extent !== undefined) {\n const smooth =\n options.smoothExtentConstraint !== undefined\n ? options.smoothExtentConstraint\n : true;\n return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n }\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n const extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return createExtent(extent, false, false);\n }\n\n return centerNone;\n}\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 */\nexport function createResolutionConstraint(options) {\n let resolutionConstraint;\n let maxResolution;\n let minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n const defaultMaxZoom = 28;\n const defaultZoomFactor = 2;\n\n let minZoom =\n options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n let maxZoom =\n options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n const zoomFactor =\n options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n const multiWorld =\n options.multiWorld !== undefined ? options.multiWorld : false;\n\n const smooth =\n options.smoothResolutionConstraint !== undefined\n ? options.smoothResolutionConstraint\n : true;\n\n const showFullExtent =\n options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n const projExtent = projection.getExtent();\n let constrainOnlyCenter = options.constrainOnlyCenter;\n let extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n\n if (options.resolutions !== undefined) {\n const resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution =\n resolutions[maxZoom] !== undefined\n ? resolutions[maxZoom]\n : resolutions[resolutions.length - 1];\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToResolutions(\n resolutions,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n } else {\n // calculate the default min and max resolution\n const size = !projExtent\n ? // use an extent that can fit the whole world if need be\n (360 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit()\n : Math.max(getWidth(projExtent), getHeight(projExtent));\n\n const defaultMaxResolution =\n size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n const defaultMinResolution =\n defaultMaxResolution /\n Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\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\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\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom =\n minZoom +\n Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor)\n );\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToPower(\n zoomFactor,\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor,\n };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n const enableRotation =\n options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n const constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return createSnapToZero();\n }\n if (constrainRotation === false) {\n return rotationNone;\n }\n if (typeof constrainRotation === 'number') {\n return createSnapToN(constrainRotation);\n }\n return rotationNone;\n }\n return 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 */\nexport function isNoopAnimation(animation) {\n if (animation.sourceCenter && animation.targetCenter) {\n if (!coordinatesEqual(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}\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 * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n // calculate rotated position\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n const centerX = rotX * cosAngle - rotY * sinAngle;\n const centerY = rotY * cosAngle + rotX * sinAngle;\n\n return [centerX, centerY];\n}\n\nexport default View;\n","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1,\n};\n","/**\n * @module ol/array\n */\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} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, comparator) {\n let mid, cmp;\n comparator = comparator || ascending;\n let low = 0;\n let high = haystack.length;\n let found = false;\n\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\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\n /* Key not found. */\n return found ? low : ~low;\n}\n\n/**\n * Compare function sorting arrays in ascending order. Safe to use for numeric values.\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 */\nexport function ascending(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * Compare function sorting arrays in descending order. Safe to use for numeric values.\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 greater than, equal to, or less than the second.\n */\nexport function descending(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n if (arr[0] <= target) {\n return 0;\n }\n\n const n = arr.length;\n if (target <= arr[n - 1]) {\n return n - 1;\n }\n\n if (typeof direction === 'function') {\n for (let i = 1; i < n; ++i) {\n const candidate = arr[i];\n if (candidate === target) {\n return i;\n }\n if (candidate < target) {\n if (direction(target, arr[i - 1], candidate) > 0) {\n return i - 1;\n }\n return i;\n }\n }\n return n - 1;\n }\n\n if (direction > 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n return n - 1;\n }\n\n if (direction < 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n return n - 1;\n }\n\n for (let i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n }\n if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n return i;\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 */\nexport function reverseSubArray(arr, begin, end) {\n while (begin < end) {\n const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\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 */\nexport function extend(arr, data) {\n const extension = Array.isArray(data) ? data : [data];\n const length = extension.length;\n for (let i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\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 */\nexport function remove(arr, obj) {\n const i = arr.indexOf(obj);\n const found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\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 */\nexport function equals(arr1, arr2) {\n const len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (let i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\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 */\nexport function stableSort(arr, compareFnc) {\n const length = arr.length;\n const tmp = Array(arr.length);\n let 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/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, func, strict) {\n const compare = func || ascending;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (strict && res === 0));\n });\n}\n","/**\n * @module ol/asserts\n */\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {string} errorMessage Error message.\n */\nexport function assert(assertion, errorMessage) {\n if (!assertion) {\n throw new Error(errorMessage);\n }\n}\n","/**\n * @module ol/color\n */\nimport {clamp} from './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/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nconst HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nconst NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n if (typeof color === 'string') {\n return color;\n }\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 const el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n const rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n }\n return '';\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport const 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 /**\n * @const\n * @type {number}\n */\n const MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object}\n */\n const cache = {};\n\n /**\n * @type {number}\n */\n let cacheSize = 0;\n\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function (s) {\n let color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n let i = 0;\n for (const 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/**\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 */\nexport function asArray(color) {\n if (Array.isArray(color)) {\n return color;\n }\n return fromString(color);\n}\n\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n let r, g, b, a, color;\n\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n\n if (HEX_COLOR_RE_.exec(s)) {\n // hex\n const n = s.length - 1; // number of hex digits\n let d; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n const 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.startsWith('rgba(')) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.startsWith('rgb(')) {\n // rgb()\n color = s.slice(4, -1).split(',').map(Number);\n color.push(1);\n normalize(color);\n } else {\n throw new Error('Invalid color');\n }\n return color;\n}\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 */\nexport function normalize(color) {\n color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n color[3] = clamp(color[3], 0, 1);\n return color;\n}\n\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n let r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n let g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n let b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n const a = color[3] === undefined ? 1 : Math.round(color[3] * 100) / 100;\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n if (NAMED_COLOR_RE_.test(s)) {\n s = fromNamed(s);\n }\n return HEX_COLOR_RE_.test(s) || s.startsWith('rgba(') || s.startsWith('rgb(');\n}\n","/**\n * @module ol/colorlike\n */\nimport {toString} from './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/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n if (Array.isArray(color)) {\n return toString(color);\n }\n return color;\n}\n","/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object}\n */\nconst levels = {\n info: 1,\n warn: 2,\n error: 3,\n none: 4,\n};\n\n/**\n * @type {number}\n */\nlet level = levels.info;\n\n/**\n * Set the logging level. By default, the level is set to 'info' and all\n * messages will be logged. Set to 'warn' to only display warnings and errors.\n * Set to 'error' to only display errors. Set to 'none' to silence all messages.\n *\n * @param {Level} l The new level.\n */\nexport function setLevel(l) {\n level = levels[l];\n}\n\nexport function log(...args) {\n if (level > levels.info) {\n return;\n }\n console.log(...args); // eslint-disable-line no-console\n}\n\nexport function warn(...args) {\n if (level > levels.warn) {\n return;\n }\n console.warn(...args); // eslint-disable-line no-console\n}\n\nexport function error(...args) {\n if (level > levels.error) {\n return;\n }\n console.error(...args); // eslint-disable-line no-console\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {modulo, toFixed} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an `xy`, `xyz` or `xyzm` coordinate.\n * Example: `[16, 48]`.\n * @typedef {Array} Coordinate\n * @api\n */\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/**\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.js';\n *\n * const 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 */\nexport function add(coordinate, delta) {\n coordinate[0] += +delta[0];\n coordinate[1] += +delta[1];\n return coordinate;\n}\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 */\nexport function closestOnCircle(coordinate, circle) {\n const r = circle.getRadius();\n const center = circle.getCenter();\n const x0 = center[0];\n const y0 = center[1];\n const x1 = coordinate[0];\n const y1 = coordinate[1];\n\n let dx = x1 - x0;\n const dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n const d = Math.sqrt(dx * dx + dy * dy);\n\n const x = x0 + (r * dx) / d;\n const y = y0 + (r * dy) / d;\n\n return [x, y];\n}\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 */\nexport function closestOnSegment(coordinate, segment) {\n const x0 = coordinate[0];\n const y0 = coordinate[1];\n const start = segment[0];\n const end = segment[1];\n const x1 = start[0];\n const y1 = start[1];\n const x2 = end[0];\n const y2 = end[1];\n const dx = x2 - x1;\n const dy = y2 - y1;\n const along =\n dx === 0 && dy === 0\n ? 0\n : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n let 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/**\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY();\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY(2);\n * const out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, fractionDigits);\n }\n );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, fractionDigits) {\n const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n const x = Math.abs(3600 * normalizedDegrees);\n const decimals = fractionDigits || 0;\n\n let deg = Math.floor(x / 3600);\n let min = Math.floor((x - deg * 3600) / 60);\n let sec = toFixed(x - deg * 3600 - min * 60, decimals);\n\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n\n let hdms = deg + '\\u00b0';\n if (min !== 0 || sec !== 0) {\n hdms += ' ' + padNumber(min, 2) + '\\u2032';\n }\n if (sec !== 0) {\n hdms += ' ' + padNumber(sec, 2, decimals) + '\\u2033';\n }\n if (normalizedDegrees !== 0) {\n hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n }\n\n return hdms;\n}\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const 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} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, fractionDigits) {\n if (coordinate) {\n return template\n .replace('{x}', coordinate[0].toFixed(fractionDigits))\n .replace('{y}', coordinate[1].toFixed(fractionDigits));\n }\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 */\nexport function equals(coordinate1, coordinate2) {\n let equals = true;\n for (let 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/**\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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 */\nexport function rotate(coordinate, angle) {\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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 */\nexport function scale(coordinate, scale) {\n coordinate[0] *= scale;\n coordinate[1] *= scale;\n return coordinate;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n const dx = coord1[0] - coord2[0];\n const dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n return Math.sqrt(squaredDistance(coord1, coord2));\n}\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 */\nexport function squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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} [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 */\nexport function toStringHDMS(coordinate, fractionDigits) {\n if (coordinate) {\n return (\n degreesToStringHDMS('NS', coordinate[1], fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], fractionDigits)\n );\n }\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, fractionDigits) {\n return format(coordinate, '{x}, {y}', fractionDigits);\n}\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 */\nexport function wrapX(coordinate, projection) {\n if (projection.canWrapX()) {\n const worldWidth = getWidth(projection.getExtent());\n const 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} [sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, sourceExtentWidth) {\n const projectionExtent = projection.getExtent();\n let worldsAway = 0;\n if (\n projection.canWrapX() &&\n (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n ) {\n sourceExtentWidth = sourceExtentWidth || getWidth(projectionExtent);\n worldsAway = Math.floor(\n (coordinate[0] - projectionExtent[0]) / sourceExtentWidth\n );\n }\n return worldsAway;\n}\n","/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array} families Families.\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\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 */\nexport const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n [\n '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n ].join(''),\n 'i'\n);\nconst fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n\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|null} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n const match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n const style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal',\n });\n for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n const 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","import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\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} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(width, height, canvasPool, settings) {\n /** @type {HTMLCanvasElement|OffscreenCanvas} */\n let canvas;\n if (canvasPool && canvasPool.length) {\n canvas = canvasPool.shift();\n } else if (WORKER_OFFSCREEN_CANVAS) {\n canvas = new OffscreenCanvas(width || 300, height || 300);\n } else {\n canvas = document.createElement('canvas');\n }\n if (width) {\n canvas.width = width;\n }\n if (height) {\n canvas.height = height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d', settings)\n );\n}\n\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D} context Context.\n */\nexport function releaseCanvas(context) {\n const canvas = context.canvas;\n canvas.width = 1;\n canvas.height = 1;\n context.clearRect(0, 0, 1, 1);\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 */\nexport function outerWidth(element) {\n let width = element.offsetWidth;\n const style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n return width;\n}\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 */\nexport function outerHeight(element) {\n let height = element.offsetHeight;\n const style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n const parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n\n/**\n * @param {Node} node The node to remove.\n * @return {Node|null} The node that was removed or null.\n */\nexport function removeNode(node) {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\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 */\nexport function replaceChildren(node, children) {\n const oldChildren = node.childNodes;\n\n for (let i = 0; true; ++i) {\n const oldChild = oldChildren[i];\n const newChild = children[i];\n\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n","/**\n * @module ol/easing\n */\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 */\nexport function easeIn(t) {\n return Math.pow(t, 3);\n}\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 */\nexport function easeOut(t) {\n return 1 - easeIn(1 - t);\n}\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 */\nexport function inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\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 */\nexport function linear(t) {\n return t;\n}\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 */\nexport function upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n }\n return 1 - inAndOut(2 * (t - 0.5));\n}\n","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\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/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\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} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, thisArg, once) {\n if (thisArg && thisArg !== target) {\n listener = listener.bind(thisArg);\n }\n if (once) {\n const originalListener = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(this, arguments);\n };\n }\n const eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\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} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, thisArg) {\n return listen(target, type, listener, thisArg, true);\n}\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 */\nexport function unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n clear(key);\n }\n}\n","/**\n * @module ol/events/Event\n */\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 */\nclass BaseEvent {\n /**\n * @param {string} type Type.\n */\n constructor(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n\n /**\n * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n stopPropagation() {\n this.propagationStopped = true;\n }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default BaseEvent;\n","/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport 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 /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n\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","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\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 */\nclass Target extends Disposable {\n /**\n * @param {*} [target] Default event target for dispatched events.\n */\n constructor(target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = target;\n\n /**\n * @private\n * @type {Object}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object>}\n */\n this.listeners_ = null;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n addEventListener(type, listener) {\n if (!type || !listener) {\n return;\n }\n const listeners = this.listeners_ || (this.listeners_ = {});\n const listenersForType = listeners[type] || (listeners[type] = []);\n if (!listenersForType.includes(listener)) {\n listenersForType.push(listener);\n }\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 dispatchEvent(event) {\n const isString = typeof event === 'string';\n const type = isString ? event : event.type;\n const listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n\n const evt = isString ? new Event(event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n const dispatching = this.dispatching_ || (this.dispatching_ = {});\n const pendingRemovals =\n this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n let propagate;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n listeners[i]\n ).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n listeners[i]\n ).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n if (--dispatching[type] === 0) {\n let pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.listeners_ && clear(this.listeners_);\n }\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 getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\n\n /**\n * @param {string} [type] Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n hasListener(type) {\n if (!this.listeners_) {\n return false;\n }\n return type\n ? type in this.listeners_\n : Object.keys(this.listeners_).length > 0;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n removeEventListener(type, listener) {\n const listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n const 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] = 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}\n\nexport default Target;\n","/**\n * @module ol/extent\n */\nimport Relationship from './extent/Relationship.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array} Extent\n * @api\n */\n\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n const extent = createEmpty();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Array} xs Xs.\n * @param {Array} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, dest) {\n const minX = Math.min.apply(null, xs);\n const minY = Math.min.apply(null, ys);\n const maxX = Math.max.apply(null, xs);\n const maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, dest);\n}\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, dest) {\n if (dest) {\n dest[0] = extent[0] - value;\n dest[1] = extent[1] - value;\n dest[2] = extent[2] + value;\n dest[3] = extent[3] + value;\n return dest;\n }\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value,\n ];\n}\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [dest] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent.slice();\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n let dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n } else if (extent[2] < x) {\n dx = x - extent[2];\n } else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n } else if (extent[3] < y) {\n dy = y - extent[3];\n } else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n * first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n return (\n extent1[0] <= extent2[0] &&\n extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] &&\n extent2[3] <= extent1[3]\n );\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n * import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const x = coordinate[0];\n const y = coordinate[1];\n let relationship = Relationship.UNKNOWN;\n if (x < minX) {\n relationship = relationship | Relationship.LEFT;\n } else if (x > maxX) {\n relationship = relationship | Relationship.RIGHT;\n }\n if (y < minY) {\n relationship = relationship | Relationship.BELOW;\n } else if (y > maxY) {\n relationship = relationship | Relationship.ABOVE;\n }\n if (relationship === Relationship.UNKNOWN) {\n relationship = Relationship.INTERSECTING;\n }\n return relationship;\n}\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, dest) {\n if (dest) {\n dest[0] = minX;\n dest[1] = minY;\n dest[2] = maxX;\n dest[3] = maxY;\n return dest;\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(dest) {\n return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, dest) {\n const x = coordinate[0];\n const y = coordinate[1];\n return createOrUpdate(x, y, x, y, dest);\n}\n\n/**\n * @param {Array} coordinates Coordinates.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n dest\n) {\n const extent = createOrUpdateEmpty(dest);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array>} rings Rings.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendRings(extent, rings);\n}\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n return (\n extent1[0] == extent2[0] &&\n extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] &&\n extent1[3] == extent2[3]\n );\n}\n\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n return (\n Math.abs(extent1[0] - extent2[0]) < tolerance &&\n Math.abs(extent1[2] - extent2[2]) < tolerance &&\n Math.abs(extent1[1] - extent2[1]) < tolerance &&\n Math.abs(extent1[3] - extent2[3]) < tolerance\n );\n}\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n if (extent2[0] < extent1[0]) {\n extent1[0] = extent2[0];\n }\n if (extent2[2] > extent1[2]) {\n extent1[2] = extent2[2];\n }\n if (extent2[1] < extent1[1]) {\n extent1[1] = extent2[1];\n }\n if (extent2[3] > extent1[3]) {\n extent1[3] = extent2[3];\n }\n return extent1;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n if (coordinate[0] < extent[0]) {\n extent[0] = coordinate[0];\n }\n if (coordinate[0] > extent[2]) {\n extent[2] = coordinate[0];\n }\n if (coordinate[1] < extent[1]) {\n extent[1] = coordinate[1];\n }\n if (coordinate[1] > extent[3]) {\n extent[3] = coordinate[1];\n }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n extent,\n flatCoordinates,\n offset,\n end,\n stride\n) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n for (let i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n extent[0] = Math.min(extent[0], x);\n extent[1] = Math.min(extent[1], y);\n extent[2] = Math.max(extent[2], x);\n extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n let val;\n val = callback(getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback(getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n let area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n return [extent[0], extent[1]];\n}\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n return [extent[2], extent[1]];\n}\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n let coordinate;\n if (corner === 'bottom-left') {\n coordinate = getBottomLeft(extent);\n } else if (corner === 'bottom-right') {\n coordinate = getBottomRight(extent);\n } else if (corner === 'top-left') {\n coordinate = getTopLeft(extent);\n } else if (corner === 'top-right') {\n coordinate = getTopRight(extent);\n } else {\n throw new Error('Invalid corner');\n }\n return coordinate;\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n const minX = Math.min(extent1[0], extent2[0]);\n const minY = Math.min(extent1[1], extent2[1]);\n const maxX = Math.max(extent1[2], extent2[2]);\n const maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, dest) {\n const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(\n center,\n resolution,\n rotation,\n size\n );\n return createOrUpdate(\n Math.min(x0, x1, x2, x3),\n Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3),\n Math.max(y0, y1, y2, y3),\n dest\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array} Linear ring representing the viewport.\n */\nexport function getRotatedViewport(center, resolution, rotation, size) {\n const dx = (resolution * size[0]) / 2;\n const dy = (resolution * size[1]) / 2;\n const cosRotation = Math.cos(rotation);\n const sinRotation = Math.sin(rotation);\n const xCos = dx * cosRotation;\n const xSin = dx * sinRotation;\n const yCos = dy * cosRotation;\n const ySin = dy * sinRotation;\n const x = center[0];\n const y = center[1];\n return [\n x - xCos + ySin,\n y - xSin - yCos,\n x - xCos - ySin,\n y - xSin + yCos,\n x + xCos - ySin,\n y + xSin + yCos,\n x + xCos + ySin,\n y + xSin - yCos,\n x - xCos + ySin,\n y - xSin - yCos,\n ];\n}\n\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n return extent[3] - extent[1];\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n const intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [dest] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, dest) {\n const intersection = dest ? dest : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n } else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n } else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n } else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n } else {\n intersection[3] = extent2[3];\n }\n } else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n return getWidth(extent) + getHeight(extent);\n}\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n return [extent[0], extent[3]];\n}\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n return [extent[2], extent[3]];\n}\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n return extent[2] - extent[0];\n}\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n return (\n extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1]\n );\n}\n\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n const deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n extent[0] -= deltaX;\n extent[2] += deltaX;\n extent[1] -= deltaY;\n extent[3] += deltaY;\n}\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n let intersects = false;\n const startRel = coordinateRelationship(extent, start);\n const endRel = coordinateRelationship(extent, end);\n if (\n startRel === Relationship.INTERSECTING ||\n endRel === Relationship.INTERSECTING\n ) {\n intersects = true;\n } else {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const startX = start[0];\n const startY = start[1];\n const endX = end[0];\n const endY = end[1];\n const slope = (endY - startY) / (endX - startX);\n let x, y;\n if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n // potentially intersects top\n x = endX - (endY - maxY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.RIGHT) &&\n !(startRel & Relationship.RIGHT)\n ) {\n // potentially intersects right\n y = endY - (endX - maxX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.BELOW) &&\n !(startRel & Relationship.BELOW)\n ) {\n // potentially intersects bottom\n x = endX - (endY - minY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.LEFT) &&\n !(startRel & Relationship.LEFT)\n ) {\n // potentially intersects left\n y = endY - (endX - minX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n }\n return intersects;\n}\n\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [dest] Destination extent.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, dest, stops) {\n if (isEmpty(extent)) {\n return createOrUpdateEmpty(dest);\n }\n let coordinates = [];\n if (stops > 1) {\n const width = extent[2] - extent[0];\n const height = extent[3] - extent[1];\n for (let i = 0; i < stops; ++i) {\n coordinates.push(\n extent[0] + (width * i) / stops,\n extent[1],\n extent[2],\n extent[1] + (height * i) / stops,\n extent[2] - (width * i) / stops,\n extent[3],\n extent[0],\n extent[3] - (height * i) / stops\n );\n }\n } else {\n coordinates = [\n extent[0],\n extent[1],\n extent[2],\n extent[1],\n extent[2],\n extent[3],\n extent[0],\n extent[3],\n ];\n }\n transformFn(coordinates, coordinates, 2);\n const xs = [];\n const ys = [];\n for (let i = 0, l = coordinates.length; i < l; i += 2) {\n xs.push(coordinates[i]);\n ys.push(coordinates[i + 1]);\n }\n return _boundingExtentXYs(xs, ys, dest);\n}\n\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n const projectionExtent = projection.getExtent();\n const center = getCenter(extent);\n if (\n projection.canWrapX() &&\n (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n ) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.floor(\n (center[0] - projectionExtent[0]) / worldWidth\n );\n const offset = worldsAway * worldWidth;\n extent[0] -= offset;\n extent[2] -= offset;\n }\n return extent;\n}\n\n/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Array} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection) {\n if (projection.canWrapX()) {\n const projectionExtent = projection.getExtent();\n\n if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n\n wrapX(extent, projection);\n const worldWidth = getWidth(projectionExtent);\n\n if (getWidth(extent) > worldWidth) {\n // the extent wraps around on itself\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n if (extent[0] < projectionExtent[0]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2], extent[3]],\n ];\n }\n if (extent[2] > projectionExtent[2]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0], extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n ];\n }\n }\n\n return [extent];\n}\n","/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n UNKNOWN: 0,\n INTERSECTING: 1,\n ABOVE: 2,\n RIGHT: 4,\n BELOW: 8,\n LEFT: 16,\n};\n","/**\n * @module ol/featureloader\n */\nimport {VOID} from './functions.js';\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default),\n * import(\"./extent.js\").Extent,\n * number,\n * import(\"./proj/Projection.js\").default,\n * function(Array): void=,\n * function(): void=): void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true\n );\n if (format.getType() == 'arraybuffer') {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'json' || type == 'text') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML;\n if (!source) {\n source = new DOMParser().parseFromString(\n xhr.responseText,\n 'application/xml'\n );\n }\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source)\n );\n } else {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n */\n return function (extent, resolution, projection, success, failure) {\n const source = /** @type {import(\"./source/Vector\").default} */ (this);\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n function (features, dataProjection) {\n source.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n /* FIXME handle error */ failure ? failure : VOID\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n","/**\n * @module ol/format/Feature\n */\nimport {abstract} from '../util.js';\nimport {\n equivalent as equivalentProjection,\n get as getProjection,\n transformExtent,\n} from '../proj.js';\n\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation. This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings. By default, coordinates are serialized\n * as they are provided at construction. If `true`, the right-hand rule will\n * be applied. If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings). Note that not all\n * formats support this. The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n\n/**\n * @typedef {'arraybuffer' | 'json' | 'text' | 'xml'} Type\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats. See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nclass FeatureFormat {\n constructor() {\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|undefined}\n */\n this.dataProjection = undefined;\n\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|undefined}\n */\n this.defaultFeatureProjection = undefined;\n\n /**\n * A list media types supported by the format in descending order of preference.\n * @type {Array}\n */\n this.supportedMediaTypes = null;\n }\n\n /**\n * Adds the data projection to the read options.\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions} [options] Options.\n * @return {ReadOptions|undefined} Options.\n * @protected\n */\n getReadOptions(source, options) {\n if (options) {\n let dataProjection = options.dataProjection\n ? getProjection(options.dataProjection)\n : this.readProjection(source);\n if (\n options.extent &&\n dataProjection &&\n dataProjection.getUnits() === 'tile-pixels'\n ) {\n dataProjection = getProjection(dataProjection);\n dataProjection.setWorldExtent(options.extent);\n }\n options = {\n dataProjection: dataProjection,\n featureProjection: options.featureProjection,\n };\n }\n return this.adaptOptions(options);\n }\n\n /**\n * Sets the `dataProjection` on the options, if no `dataProjection`\n * is set.\n * @param {WriteOptions|ReadOptions|undefined} options\n * Options.\n * @protected\n * @return {WriteOptions|ReadOptions|undefined}\n * Updated options.\n */\n adaptOptions(options) {\n return Object.assign(\n {\n dataProjection: this.dataProjection,\n featureProjection: this.defaultFeatureProjection,\n },\n options\n );\n }\n\n /**\n * @abstract\n * @return {Type} The format type.\n */\n getType() {\n return abstract();\n }\n\n /**\n * Read a single feature from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions} [options] Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\n readFeature(source, options) {\n return abstract();\n }\n\n /**\n * Read all features from a source.\n *\n * @abstract\n * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n * @param {ReadOptions} [options] Read options.\n * @return {Array} Features.\n */\n readFeatures(source, options) {\n return abstract();\n }\n\n /**\n * Read a single geometry from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometry(source, options) {\n return abstract();\n }\n\n /**\n * Read the projection from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default|undefined} Projection.\n */\n readProjection(source) {\n return abstract();\n }\n\n /**\n * Encode a feature in this format.\n *\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {WriteOptions} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeFeature(feature, options) {\n return abstract();\n }\n\n /**\n * Encode an array of features in this format.\n *\n * @abstract\n * @param {Array} features Features.\n * @param {WriteOptions} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeFeatures(features, options) {\n return abstract();\n }\n\n /**\n * Write a single geometry in this format.\n *\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {WriteOptions} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeGeometry(geometry, options) {\n return abstract();\n }\n}\n\nexport default FeatureFormat;\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {WriteOptions|ReadOptions} [options] Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, options) {\n const featureProjection = options\n ? getProjection(options.featureProjection)\n : null;\n const dataProjection = options ? getProjection(options.dataProjection) : null;\n\n let transformed;\n if (\n featureProjection &&\n dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)\n ) {\n transformed = (write ? geometry.clone() : geometry).transform(\n write ? featureProjection : dataProjection,\n write ? dataProjection : featureProjection\n );\n } else {\n transformed = geometry;\n }\n if (\n write &&\n options &&\n /** @type {WriteOptions} */ (options).decimals !== undefined\n ) {\n const power = Math.pow(10, /** @type {WriteOptions} */ (options).decimals);\n // if decimals option on write, round each coordinate appropriately\n /**\n * @param {Array} coordinates Coordinates.\n * @return {Array} Transformed coordinates.\n */\n const transform = function (coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = Math.round(coordinates[i] * power) / power;\n }\n return coordinates;\n };\n if (transformed === geometry) {\n transformed = geometry.clone();\n }\n transformed.applyTransform(transform);\n }\n return transformed;\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions} [options] Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, options) {\n const featureProjection = options\n ? getProjection(options.featureProjection)\n : null;\n const dataProjection = options ? getProjection(options.dataProjection) : null;\n\n if (\n featureProjection &&\n dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)\n ) {\n return transformExtent(extent, dataProjection, featureProjection);\n }\n return extent;\n}\n","/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport EventType from './events/EventType.js';\nimport {assert} from './asserts.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} FeatureOnSignature\n */\n\n/***\n * @template Geometry\n * @typedef {Object & { geometry?: Geometry }} ObjectWithGeometry\n */\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~BaseObject} 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.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const 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 * const 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 * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|ObjectWithGeometry} [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 constructor(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object} */\n const properties = geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\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 clone() {\n const clone = /** @type {Feature} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (geometry.clone()));\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\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 getGeometry() {\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 getId() {\n return this.id_;\n }\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 getGeometryName() {\n return this.geometryName_;\n }\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 getStyle() {\n return this.style_;\n }\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 getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(\n geometry,\n EventType.CHANGE,\n this.handleGeometryChange_,\n this\n );\n }\n this.changed();\n }\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 setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\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} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n this.changed();\n }\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 setId(id) {\n this.id_ = id;\n this.changed();\n }\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 setGeometryName(name) {\n this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n }\n}\n\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 */\nexport function createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n }\n /**\n * @type {Array}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(\n typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`'\n );\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n}\nexport default Feature;\n","/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport {\n closestSquaredDistanceXY,\n createOrUpdateEmpty,\n extend,\n getCenter,\n} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry~Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends Geometry {\n /**\n * @param {Array} [geometries] Geometries.\n */\n constructor(geometries) {\n super();\n\n /**\n * @private\n * @type {Array}\n */\n this.geometries_ = geometries ? geometries : null;\n\n /**\n * @type {Array}\n */\n this.changeEventsKeys_ = [];\n\n this.listenGeometriesChange_();\n }\n\n /**\n * @private\n */\n unlistenGeometriesChange_() {\n this.changeEventsKeys_.forEach(unlistenByKey);\n this.changeEventsKeys_.length = 0;\n }\n\n /**\n * @private\n */\n listenGeometriesChange_() {\n if (!this.geometries_) {\n return;\n }\n for (let i = 0, ii = this.geometries_.length; i < ii; ++i) {\n this.changeEventsKeys_.push(\n listen(this.geometries_[i], EventType.CHANGE, this.changed, this)\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!GeometryCollection} Clone.\n * @api\n */\n clone() {\n const geometryCollection = new GeometryCollection(null);\n geometryCollection.setGeometries(this.geometries_);\n geometryCollection.applyProperties(this);\n return geometryCollection;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n minSquaredDistance = geometries[i].closestPointXY(\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n return minSquaredDistance;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].containsXY(x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n createOrUpdateEmpty(extent);\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n extend(extent, geometries[i].getExtent());\n }\n return extent;\n }\n\n /**\n * Return the geometries that make up this geometry collection.\n * @return {Array} Geometries.\n * @api\n */\n getGeometries() {\n return cloneGeometries(this.geometries_);\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArray() {\n return this.geometries_;\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArrayRecursive() {\n /** @type {Array} */\n let geometriesArray = [];\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].getType() === this.getType()) {\n geometriesArray = geometriesArray.concat(\n /** @type {GeometryCollection} */ (\n geometries[i]\n ).getGeometriesArrayRecursive()\n );\n } else {\n geometriesArray.push(geometries[i]);\n }\n }\n return geometriesArray;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {GeometryCollection} Simplified GeometryCollection.\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometries = [];\n const geometries = this.geometries_;\n let simplified = false;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n const geometry = geometries[i];\n const simplifiedGeometry =\n geometry.getSimplifiedGeometry(squaredTolerance);\n simplifiedGeometries.push(simplifiedGeometry);\n if (simplifiedGeometry !== geometry) {\n simplified = true;\n }\n }\n if (simplified) {\n const simplifiedGeometryCollection = new GeometryCollection(null);\n simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n return simplifiedGeometryCollection;\n }\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'GeometryCollection';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].intersectsExtent(extent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.geometries_.length === 0;\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].rotate(angle, anchor);\n }\n this.changed();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].scale(sx, sy, anchor);\n }\n this.changed();\n }\n\n /**\n * Set the geometries that make up this geometry collection.\n * @param {Array} geometries Geometries.\n * @api\n */\n setGeometries(geometries) {\n this.setGeometriesArray(cloneGeometries(geometries));\n }\n\n /**\n * @param {Array} geometries Geometries.\n */\n setGeometriesArray(geometries) {\n this.unlistenGeometriesChange_();\n this.geometries_ = geometries;\n this.listenGeometriesChange_();\n this.changed();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n */\n applyTransform(transformFn) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].applyTransform(transformFn);\n }\n this.changed();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].translate(deltaX, deltaY);\n }\n this.changed();\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.unlistenGeometriesChange_();\n super.disposeInternal();\n }\n}\n\n/**\n * @param {Array} geometries Geometries.\n * @return {Array} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n const clonedGeometries = [];\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n clonedGeometries.push(geometries[i].clone());\n }\n return clonedGeometries;\n}\n\nexport default GeometryCollection;\n","/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport {abstract} from '../util.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nclass JSONFeature extends FeatureFormat {\n constructor() {\n super();\n }\n\n /**\n * @return {import(\"./Feature.js\").Type} Format.\n */\n getType() {\n return 'json';\n }\n\n /**\n * Read a feature. Only works for a single feature. Use `readFeatures` to\n * read a feature collection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"../Feature.js\").default} Feature.\n * @api\n */\n readFeature(source, options) {\n return this.readFeatureFromObject(\n getObject(source),\n this.getReadOptions(source, options)\n );\n }\n\n /**\n * Read all features. Works with both a single feature and a feature\n * collection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {Array} Features.\n * @api\n */\n readFeatures(source, options) {\n return this.readFeaturesFromObject(\n getObject(source),\n this.getReadOptions(source, options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, options) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {Array} Features.\n */\n readFeaturesFromObject(object, options) {\n return abstract();\n }\n\n /**\n * Read a geometry.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n * @api\n */\n readGeometry(source, options) {\n return this.readGeometryFromObject(\n getObject(source),\n this.getReadOptions(source, options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, options) {\n return abstract();\n }\n\n /**\n * Read the projection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n * @api\n */\n readProjection(source) {\n return this.readProjectionFromObject(getObject(source));\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n readProjectionFromObject(object) {\n return abstract();\n }\n\n /**\n * Encode a feature as string.\n *\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {string} Encoded feature.\n * @api\n */\n writeFeature(feature, options) {\n return JSON.stringify(this.writeFeatureObject(feature, options));\n }\n\n /**\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeFeatureObject(feature, options) {\n return abstract();\n }\n\n /**\n * Encode an array of features as string.\n *\n * @param {Array} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {string} Encoded features.\n * @api\n */\n writeFeatures(features, options) {\n return JSON.stringify(this.writeFeaturesObject(features, options));\n }\n\n /**\n * @abstract\n * @param {Array} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeFeaturesObject(features, options) {\n return abstract();\n }\n\n /**\n * Encode a geometry as string.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {string} Encoded geometry.\n * @api\n */\n writeGeometry(geometry, options) {\n return JSON.stringify(this.writeGeometryObject(geometry, options));\n }\n\n /**\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeGeometryObject(geometry, options) {\n return abstract();\n }\n}\n\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n if (typeof source === 'string') {\n const object = JSON.parse(source);\n return object ? /** @type {Object} */ (object) : null;\n }\n if (source !== null) {\n return source;\n }\n return null;\n}\n\nexport default JSONFeature;\n","/**\n * @module ol/format/GeoJSON\n */\n\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {get as getProjection} from '../proj.js';\nimport {isEmpty} from '../obj.js';\nimport {transformGeometryWithOptions} from './Feature.js';\n\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format. Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nclass GeoJSON extends JSONFeature {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super();\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.dataProjection = getProjection(\n options.dataProjection ? options.dataProjection : 'EPSG:4326'\n );\n\n if (options.featureProjection) {\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.defaultFeatureProjection = getProjection(options.featureProjection);\n }\n\n /**\n * Name of the geometry attribute for features.\n * @type {string|undefined}\n * @private\n */\n this.geometryName_ = options.geometryName;\n\n /**\n * Look for the geometry name in the feature GeoJSON\n * @type {boolean|undefined}\n * @private\n */\n this.extractGeometryName_ = options.extractGeometryName;\n\n this.supportedMediaTypes = [\n 'application/geo+json',\n 'application/vnd.geo+json',\n ];\n }\n\n /**\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, options) {\n /**\n * @type {GeoJSONFeature}\n */\n let geoJSONFeature = null;\n if (object['type'] === 'Feature') {\n geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n } else {\n geoJSONFeature = {\n 'type': 'Feature',\n 'geometry': /** @type {GeoJSONGeometry} */ (object),\n 'properties': null,\n };\n }\n\n const geometry = readGeometry(geoJSONFeature['geometry'], options);\n const feature = new Feature();\n if (this.geometryName_) {\n feature.setGeometryName(this.geometryName_);\n } else if (\n this.extractGeometryName_ &&\n 'geometry_name' in geoJSONFeature !== undefined\n ) {\n feature.setGeometryName(geoJSONFeature['geometry_name']);\n }\n feature.setGeometry(geometry);\n\n if ('id' in geoJSONFeature) {\n feature.setId(geoJSONFeature['id']);\n }\n\n if (geoJSONFeature['properties']) {\n feature.setProperties(geoJSONFeature['properties'], true);\n }\n return feature;\n }\n\n /**\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {Array} Features.\n */\n readFeaturesFromObject(object, options) {\n const geoJSONObject = /** @type {GeoJSONObject} */ (object);\n /** @type {Array} */\n let features = null;\n if (geoJSONObject['type'] === 'FeatureCollection') {\n const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (\n object\n );\n features = [];\n const geoJSONFeatures = geoJSONFeatureCollection['features'];\n for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n features.push(this.readFeatureFromObject(geoJSONFeatures[i], options));\n }\n } else {\n features = [this.readFeatureFromObject(object, options)];\n }\n return features;\n }\n\n /**\n * @param {GeoJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, options) {\n return readGeometry(object, options);\n }\n\n /**\n * @param {Object} object Object.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n readProjectionFromObject(object) {\n const crs = object['crs'];\n let projection;\n if (crs) {\n if (crs['type'] == 'name') {\n projection = getProjection(crs['properties']['name']);\n } else if (crs['type'] === 'EPSG') {\n projection = getProjection('EPSG:' + crs['properties']['code']);\n } else {\n throw new Error('Unknown SRS type');\n }\n } else {\n projection = this.dataProjection;\n }\n return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n }\n\n /**\n * Encode a feature as a GeoJSON Feature object.\n *\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONFeature} Object.\n * @api\n */\n writeFeatureObject(feature, options) {\n options = this.adaptOptions(options);\n\n /** @type {GeoJSONFeature} */\n const object = {\n 'type': 'Feature',\n geometry: null,\n properties: null,\n };\n\n const id = feature.getId();\n if (id !== undefined) {\n object.id = id;\n }\n\n if (!feature.hasProperties()) {\n return object;\n }\n\n const properties = feature.getProperties();\n const geometry = feature.getGeometry();\n if (geometry) {\n object.geometry = writeGeometry(geometry, options);\n\n delete properties[feature.getGeometryName()];\n }\n\n if (!isEmpty(properties)) {\n object.properties = properties;\n }\n\n return object;\n }\n\n /**\n * Encode an array of features as a GeoJSON object.\n *\n * @param {Array} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONFeatureCollection} GeoJSON Object.\n * @api\n */\n writeFeaturesObject(features, options) {\n options = this.adaptOptions(options);\n const objects = [];\n for (let i = 0, ii = features.length; i < ii; ++i) {\n objects.push(this.writeFeatureObject(features[i], options));\n }\n return {\n type: 'FeatureCollection',\n features: objects,\n };\n }\n\n /**\n * Encode a geometry as a GeoJSON object.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n * @api\n */\n writeGeometryObject(geometry, options) {\n return writeGeometry(geometry, this.adaptOptions(options));\n }\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, options) {\n if (!object) {\n return null;\n }\n\n /**\n * @type {import(\"../geom/Geometry.js\").default}\n */\n let geometry;\n switch (object['type']) {\n case 'Point': {\n geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n break;\n }\n case 'LineString': {\n geometry = readLineStringGeometry(\n /** @type {GeoJSONLineString} */ (object)\n );\n break;\n }\n case 'Polygon': {\n geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n break;\n }\n case 'MultiPoint': {\n geometry = readMultiPointGeometry(\n /** @type {GeoJSONMultiPoint} */ (object)\n );\n break;\n }\n case 'MultiLineString': {\n geometry = readMultiLineStringGeometry(\n /** @type {GeoJSONMultiLineString} */ (object)\n );\n break;\n }\n case 'MultiPolygon': {\n geometry = readMultiPolygonGeometry(\n /** @type {GeoJSONMultiPolygon} */ (object)\n );\n break;\n }\n case 'GeometryCollection': {\n geometry = readGeometryCollectionGeometry(\n /** @type {GeoJSONGeometryCollection} */ (object)\n );\n break;\n }\n default: {\n throw new Error('Unsupported GeoJSON type: ' + object['type']);\n }\n }\n return transformGeometryWithOptions(geometry, false, options);\n}\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, options) {\n const geometries = object['geometries'].map(\n /**\n * @param {GeoJSONGeometry} geometry Geometry.\n * @return {import(\"../geom/Geometry.js\").default} geometry Geometry.\n */\n function (geometry) {\n return readGeometry(geometry, options);\n }\n );\n return new GeometryCollection(geometries);\n}\n\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n return new Point(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n return new LineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n return new MultiLineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n return new MultiPoint(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n return new MultiPolygon(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n return new Polygon(object['coordinates']);\n}\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, options) {\n geometry = transformGeometryWithOptions(geometry, true, options);\n const type = geometry.getType();\n\n /** @type {GeoJSONGeometry} */\n let geoJSON;\n switch (type) {\n case 'Point': {\n geoJSON = writePointGeometry(/** @type {Point} */ (geometry), options);\n break;\n }\n case 'LineString': {\n geoJSON = writeLineStringGeometry(\n /** @type {LineString} */ (geometry),\n options\n );\n break;\n }\n case 'Polygon': {\n geoJSON = writePolygonGeometry(\n /** @type {Polygon} */ (geometry),\n options\n );\n break;\n }\n case 'MultiPoint': {\n geoJSON = writeMultiPointGeometry(\n /** @type {MultiPoint} */ (geometry),\n options\n );\n break;\n }\n case 'MultiLineString': {\n geoJSON = writeMultiLineStringGeometry(\n /** @type {MultiLineString} */ (geometry),\n options\n );\n break;\n }\n case 'MultiPolygon': {\n geoJSON = writeMultiPolygonGeometry(\n /** @type {MultiPolygon} */ (geometry),\n options\n );\n break;\n }\n case 'GeometryCollection': {\n geoJSON = writeGeometryCollectionGeometry(\n /** @type {GeometryCollection} */ (geometry),\n options\n );\n break;\n }\n case 'Circle': {\n geoJSON = {\n type: 'GeometryCollection',\n geometries: [],\n };\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return geoJSON;\n}\n\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, options) {\n options = Object.assign({}, options);\n delete options.featureProjection;\n const geometries = geometry.getGeometriesArray().map(function (geometry) {\n return writeGeometry(geometry, options);\n });\n return {\n type: 'GeometryCollection',\n geometries: geometries,\n };\n}\n\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, options) {\n return {\n type: 'LineString',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, options) {\n return {\n type: 'MultiLineString',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, options) {\n return {\n type: 'MultiPoint',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, options) {\n let right;\n if (options) {\n right = options.rightHanded;\n }\n return {\n type: 'MultiPolygon',\n coordinates: geometry.getCoordinates(right),\n };\n}\n\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, options) {\n return {\n type: 'Point',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, options) {\n let right;\n if (options) {\n right = options.rightHanded;\n }\n return {\n type: 'Polygon',\n coordinates: geometry.getCoordinates(right),\n };\n}\n\nexport default GeoJSON;\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return. If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n let called = false;\n\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array} */\n let lastArgs;\n\n let lastThis;\n\n return function () {\n const nextArgs = Array.prototype.slice.call(arguments);\n if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n called = true;\n lastThis = this;\n lastArgs = nextArgs;\n lastResult = fn.apply(this, arguments);\n }\n return lastResult;\n };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nexport function toPromise(getter) {\n function promiseGetter() {\n let value;\n try {\n value = getter();\n } catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n","/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport {abstract} from '../util.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {\n createEmpty,\n createOrUpdateEmpty,\n getHeight,\n returnOrUpdate,\n} from '../extent.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {memoizeOne} from '../functions.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends BaseObject {\n constructor() {\n super();\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} revision The geometry revision.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n this.simplifyTransformedInternal = memoizeOne(function (\n revision,\n squaredTolerance,\n transform\n ) {\n if (!transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n });\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n transform\n );\n }\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n clone() {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n return abstract();\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n }\n\n /**\n * Return the closest point of the geometry to the passed point as\n * {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} point Point.\n * @param {import(\"../coordinate.js\").Coordinate} [closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n getClosestPoint(point, closestPoint) {\n closestPoint = closestPoint ? closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n }\n\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n intersectsCoordinate(coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return abstract();\n }\n\n /**\n * Get the extent of the geometry.\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n getExtent(extent) {\n if (this.extentRevision_ != this.getRevision()) {\n const extent = this.computeExtent(this.extent_);\n if (isNaN(extent[0]) || isNaN(extent[1])) {\n createOrUpdateEmpty(extent);\n }\n this.extentRevision_ = this.getRevision();\n }\n return returnOrUpdate(this.extent_, extent);\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n abstract();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n abstract();\n }\n\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n * algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n simplify(tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker\n * algorithm.\n * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Geometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return abstract();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} Geometry type.\n */\n getType() {\n return abstract();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @abstract\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n */\n applyTransform(transformFn) {\n abstract();\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n */\n intersectsExtent(extent) {\n return abstract();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n abstract();\n }\n\n /**\n * Transform each coordinate of the geometry from one coordinate reference\n * system to another. The geometry is modified in place.\n * For example, a line will be transformed to a line and a circle to a circle.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Geometry} This geometry. Note that original geometry is\n * modified in place.\n * @api\n */\n transform(source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n const sourceProj = getProjection(source);\n const transformFn =\n sourceProj.getUnits() == 'tile-pixels'\n ? function (inCoordinates, outCoordinates, stride) {\n const pixelExtent = sourceProj.getExtent();\n const projectedExtent = sourceProj.getWorldExtent();\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0\n );\n transform2D(\n inCoordinates,\n 0,\n inCoordinates.length,\n stride,\n tmpTransform,\n outCoordinates\n );\n return getTransform(sourceProj, destination)(\n inCoordinates,\n outCoordinates,\n stride\n );\n }\n : getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n }\n}\n\nexport default Geometry;\n","/**\n * @module ol/geom/LineString\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {extend} from '../array.js';\nimport {forEach as forEachSegment} from './flat/segments.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {interpolatePoint, lineStringCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {lineStringLength} from './flat/length.js';\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nclass LineString extends SimpleGeometry {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatMidpoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.flatMidpointRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed coordinate to the coordinates of the linestring.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @api\n */\n appendCoordinate(coordinate) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = coordinate.slice();\n } else {\n extend(this.flatCoordinates, coordinate);\n }\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LineString} Clone.\n * @api\n */\n clone() {\n const lineString = new LineString(\n this.flatCoordinates.slice(),\n this.layout\n );\n lineString.applyProperties(this);\n return lineString;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Iterate over each segment, calling the provided callback.\n * If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n *\n * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n * called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n * @return {T|boolean} Value.\n * @template T,S\n * @api\n */\n forEachSegment(callback) {\n return forEachSegment(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n callback\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * @param {number} m M.\n * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate) {\n if (this.layout != 'XYM' && this.layout != 'XYZM') {\n return null;\n }\n extrapolate = extrapolate !== undefined ? extrapolate : false;\n return lineStringCoordinateAtM(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n m,\n extrapolate\n );\n }\n\n /**\n * Return the coordinates of the linestring.\n * @return {Array} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the coordinate at the provided fraction along the linestring.\n * The `fraction` is a number between 0 and 1, where 0 is the start of the\n * linestring and 1 is the end.\n * @param {number} fraction Fraction.\n * @param {import(\"../coordinate.js\").Coordinate} [dest] Optional coordinate whose values will\n * be modified. If not provided, a new coordinate will be returned.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n * @api\n */\n getCoordinateAt(fraction, dest) {\n return interpolatePoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n fraction,\n dest,\n this.stride\n );\n }\n\n /**\n * Return the length of the linestring on projected plane.\n * @return {number} Length (on projected plane).\n * @api\n */\n getLength() {\n return lineStringLength(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @return {Array} Flat midpoint.\n */\n getFlatMidpoint() {\n if (this.flatMidpointRevision_ != this.getRevision()) {\n this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n this.flatMidpointRevision_ = this.getRevision();\n }\n return this.flatMidpoint_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} Simplified LineString.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LineString(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LineString';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return intersectsLineString(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the linestring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LineString;\n","/**\n * @module ol/geom/MultiLineString\n */\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\nimport {extend} from '../array.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {\n interpolatePoint,\n lineStringsCoordinateAtM,\n} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nclass MultiLineString extends SimpleGeometry {\n /**\n * @param {Array|LineString>|Array} coordinates\n * Coordinates or LineString geometries. (For internal use, flat coordinates in\n * combination with `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Flat coordinate ends for internal use.\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (Array.isArray(coordinates[0])) {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n layout\n );\n } else if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.ends_ = ends;\n } else {\n let layout = this.getLayout();\n const lineStrings = /** @type {Array} */ (coordinates);\n const flatCoordinates = [];\n const ends = [];\n for (let i = 0, ii = lineStrings.length; i < ii; ++i) {\n const lineString = lineStrings[i];\n if (i === 0) {\n layout = lineString.getLayout();\n }\n extend(flatCoordinates, lineString.getFlatCoordinates());\n ends.push(flatCoordinates.length);\n }\n this.setFlatCoordinates(layout, flatCoordinates);\n this.ends_ = ends;\n }\n }\n\n /**\n * Append the passed linestring to the multilinestring.\n * @param {LineString} lineString LineString.\n * @api\n */\n appendLineString(lineString) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = lineString.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiLineString} Clone.\n * @api\n */\n clone() {\n const multiLineString = new MultiLineString(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n multiLineString.applyProperties(this);\n return multiLineString;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n arrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * `interpolate` controls interpolation between consecutive LineStrings\n * within the MultiLineString. If `interpolate` is `true` the coordinates\n * will be linearly interpolated between the last coordinate of one LineString\n * and the first coordinate of the next LineString. If `interpolate` is\n * `false` then the function will return `null` for Ms falling between\n * LineStrings.\n *\n * @param {number} m M.\n * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n * @param {boolean} [interpolate] Interpolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate, interpolate) {\n if (\n (this.layout != 'XYM' && this.layout != 'XYZM') ||\n this.flatCoordinates.length === 0\n ) {\n return null;\n }\n extrapolate = extrapolate !== undefined ? extrapolate : false;\n interpolate = interpolate !== undefined ? interpolate : false;\n return lineStringsCoordinateAtM(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n m,\n extrapolate,\n interpolate\n );\n }\n\n /**\n * Return the coordinates of the multilinestring.\n * @return {Array>} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride\n );\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * Return the linestring at the specified index.\n * @param {number} index Index.\n * @return {LineString} LineString.\n * @api\n */\n getLineString(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LineString(\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index]\n ),\n this.layout\n );\n }\n\n /**\n * Return the linestrings of this multilinestring.\n * @return {Array} LineStrings.\n * @api\n */\n getLineStrings() {\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const layout = this.layout;\n /** @type {Array} */\n const lineStrings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const lineString = new LineString(\n flatCoordinates.slice(offset, end),\n layout\n );\n lineStrings.push(lineString);\n offset = end;\n }\n return lineStrings;\n }\n\n /**\n * @return {Array} Flat midpoints.\n */\n getFlatMidpoints() {\n const midpoints = [];\n const flatCoordinates = this.flatCoordinates;\n let offset = 0;\n const ends = this.ends_;\n const stride = this.stride;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n 0.5\n );\n extend(midpoints, midpoint);\n offset = end;\n }\n return midpoints;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiLineString} Simplified MultiLineString.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds\n );\n return new MultiLineString(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiLineString';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return intersectsLineStringArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the multilinestring.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = deflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\nexport default MultiLineString;\n","/**\n * @module ol/geom/MultiPoint\n */\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends SimpleGeometry {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n if (layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n appendPoint(point) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = point.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, point.getFlatCoordinates());\n }\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPoint} Clone.\n * @api\n */\n clone() {\n const multiPoint = new MultiPoint(\n this.flatCoordinates.slice(),\n this.layout\n );\n multiPoint.applyProperties(this);\n return multiPoint;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[i],\n flatCoordinates[i + 1]\n );\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (let j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinates of the multipoint.\n * @return {Array} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n getPoint(index) {\n const n = !this.flatCoordinates\n ? 0\n : this.flatCoordinates.length / this.stride;\n if (index < 0 || n <= index) {\n return null;\n }\n return new Point(\n this.flatCoordinates.slice(\n index * this.stride,\n (index + 1) * this.stride\n ),\n this.layout\n );\n }\n\n /**\n * Return the points of this multipoint.\n * @return {Array} Points.\n * @api\n */\n getPoints() {\n const flatCoordinates = this.flatCoordinates;\n const layout = this.layout;\n const stride = this.stride;\n /** @type {Array} */\n const points = [];\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const point = new Point(flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiPoint';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n if (containsXY(extent, x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Set the coordinates of the multipoint.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default MultiPoint;\n","/**\n * @module ol/geom/MultiPolygon\n */\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {\n assignClosestMultiArrayPoint,\n multiArrayMaxSquaredDelta,\n} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {intersectsLinearRingMultiArray} from './flat/intersectsextent.js';\nimport {\n linearRingssAreOriented,\n orientLinearRingsArray,\n} from './flat/orient.js';\nimport {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends SimpleGeometry {\n /**\n * @param {Array>|Polygon>|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array>} [endss] Array of ends for internal use with flat coordinates.\n */\n constructor(coordinates, layout, endss) {\n super();\n\n /**\n * @type {Array>}\n * @private\n */\n this.endss_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointsRevision_ = -1;\n\n /**\n * @private\n * @type {Array}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (!endss && !Array.isArray(coordinates[0])) {\n let thisLayout = this.getLayout();\n const polygons = /** @type {Array} */ (coordinates);\n const flatCoordinates = [];\n const thisEndss = [];\n for (let i = 0, ii = polygons.length; i < ii; ++i) {\n const polygon = polygons[i];\n if (i === 0) {\n thisLayout = polygon.getLayout();\n }\n const offset = flatCoordinates.length;\n const ends = polygon.getEnds();\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] += offset;\n }\n extend(flatCoordinates, polygon.getFlatCoordinates());\n thisEndss.push(ends);\n }\n layout = thisLayout;\n coordinates = flatCoordinates;\n endss = thisEndss;\n }\n if (layout !== undefined && endss) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.endss_ = endss;\n } else {\n this.setCoordinates(\n /** @type {Array>>} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n appendPolygon(polygon) {\n /** @type {Array} */\n let ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n } else {\n const offset = this.flatCoordinates.length;\n extend(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] += offset;\n }\n }\n this.endss_.push(ends);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @api\n */\n clone() {\n const len = this.endss_.length;\n const newEndss = new Array(len);\n for (let i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n\n const multiPolygon = new MultiPolygon(\n this.flatCoordinates.slice(),\n this.layout,\n newEndss\n );\n multiPolygon.applyProperties(this);\n\n return multiPolygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n multiArrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestMultiArrayPoint(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n return linearRingssContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n x,\n y\n );\n }\n\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingssArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for multi-polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>>} Coordinates.\n * @api\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n right\n );\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateMultiCoordinatesArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride\n );\n }\n\n /**\n * @return {Array>} Endss.\n */\n getEndss() {\n return this.endss_;\n }\n\n /**\n * @return {Array} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n const flatCenters = linearRingssCenter(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride\n );\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n flatCenters\n );\n this.flatInteriorPointsRevision_ = this.getRevision();\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.\n * @return {MultiPoint} Interior points as XYM coordinates, where M is\n * the length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoints() {\n return new MultiPoint(this.getFlatInteriorPoints().slice(), 'XYM');\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (\n linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)\n ) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRingsArray(\n this.orientedFlatCoordinates_,\n 0,\n this.endss_,\n this.stride\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiPolygon} Simplified MultiPolygon.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEndss = [];\n simplifiedFlatCoordinates.length = quantizeMultiArray(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEndss\n );\n return new MultiPolygon(simplifiedFlatCoordinates, 'XY', simplifiedEndss);\n }\n\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n getPolygon(index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n let offset;\n if (index === 0) {\n offset = 0;\n } else {\n const prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n const ends = this.endss_[index].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new Polygon(\n this.flatCoordinates.slice(offset, end),\n this.layout,\n ends\n );\n }\n\n /**\n * Return the polygons of this multipolygon.\n * @return {Array} Polygons.\n * @api\n */\n getPolygons() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const endss = this.endss_;\n const polygons = [];\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n const polygon = new Polygon(\n flatCoordinates.slice(offset, end),\n layout,\n ends\n );\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiPolygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return intersectsLinearRingMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array>>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const endss = deflateMultiCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.endss_\n );\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n } else {\n const lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length =\n lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n }\n}\n\nexport default MultiPolygon;\n","/**\n * @module ol/geom/Point\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n this.setCoordinates(coordinates, layout);\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n */\n clone() {\n const point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[0],\n flatCoordinates[1]\n );\n if (squaredDistance < minSquaredDistance) {\n const stride = this.stride;\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n */\n getCoordinates() {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'Point';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n }\n\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default Point;\n","/**\n * @module ol/geom/LinearRing\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n */\n clone() {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingArea(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LinearRing(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LinearRing';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LinearRing;\n","/**\n * @module ol/geom/Polygon\n */\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {closestSquaredDistanceXY, getCenter, isEmpty} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {modulo} from '../math.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {offset as sphereOffset} from '../sphere.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n /**\n * @param {!Array>|!Array} coordinates\n * Array of linear rings that define the polygon. The first linear ring of the\n * array defines the outer-boundary or surface of the polygon. Each subsequent\n * linear ring defines a hole in the surface of the polygon. A linear ring is\n * an array of vertices' coordinates where the first coordinate and the last are\n * equivalent. (For internal use, flat coordinates in combination with\n * `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Ends (for internal use with flat coordinates).\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatInteriorPoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.ends_ = ends;\n } else {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n appendLinearRing(linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @api\n */\n clone() {\n const polygon = new Polygon(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n polygon.applyProperties(this);\n return polygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n arrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n return linearRingsContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n x,\n y\n );\n }\n\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingsArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>} Coordinates.\n * @api\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * @return {Array} Interior point.\n */\n getFlatInteriorPoint() {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n flatCenter,\n 0\n );\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return this.flatInteriorPoint_;\n }\n\n /**\n * Return an interior point of the polygon.\n * @return {Point} Interior point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoint() {\n return new Point(this.getFlatInteriorPoint(), 'XYM');\n }\n\n /**\n * Return the number of rings of the polygon, this includes the exterior\n * ring and any interior rings.\n *\n * @return {number} Number of rings.\n * @api\n */\n getLinearRingCount() {\n return this.ends_.length;\n }\n\n /**\n * Return the Nth linear ring of the polygon geometry. Return `null` if the\n * given index is out of range.\n * The exterior linear ring is available at index `0` and the interior rings\n * at index `1` and beyond.\n *\n * @param {number} index Index.\n * @return {LinearRing|null} Linear ring.\n * @api\n */\n getLinearRing(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index]\n ),\n this.layout\n );\n }\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array} Linear rings.\n * @api\n */\n getLinearRings() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const linearRings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const linearRing = new LinearRing(\n flatCoordinates.slice(offset, end),\n layout\n );\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRings(\n this.orientedFlatCoordinates_,\n 0,\n this.ends_,\n this.stride\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Polygon} Simplified Polygon.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds\n );\n return new Polygon(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'Polygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return intersectsLinearRingArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = deflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\nexport default Polygon;\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n * the polygon vertices in meters.\n * @param {number} [n] Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number} [sphereRadius] Optional radius for the sphere (defaults to\n * the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, n, sphereRadius) {\n n = n ? n : 32;\n /** @type {Array} */\n const flatCoordinates = [];\n for (let i = 0; i < n; ++i) {\n extend(\n flatCoordinates,\n sphereOffset(center, radius, (2 * Math.PI * i) / n, sphereRadius)\n );\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n if (isEmpty(extent)) {\n throw new Error('Cannot create polygon from empty extent');\n }\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const flatCoordinates = [\n minX,\n minY,\n minX,\n maxY,\n maxX,\n maxY,\n maxX,\n minY,\n minX,\n minY,\n ];\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [sides] Number of sides of the polygon. Default is 32.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, sides, angle) {\n sides = sides ? sides : 32;\n const stride = circle.getStride();\n const layout = circle.getLayout();\n const center = circle.getCenter();\n const arrayLength = stride * (sides + 1);\n const flatCoordinates = new Array(arrayLength);\n for (let i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (let j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n const ends = [flatCoordinates.length];\n const polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), angle);\n return polygon;\n}\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, angle) {\n const flatCoordinates = polygon.getFlatCoordinates();\n const stride = polygon.getStride();\n const sides = flatCoordinates.length / stride - 1;\n const startAngle = angle ? angle : 0;\n for (let i = 0; i <= sides; ++i) {\n const offset = i * stride;\n const angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n }\n polygon.changed();\n}\n","/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport {rotate, scale, transform2D, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends Geometry {\n constructor() {\n super();\n\n /**\n * @protected\n * @type {import(\"./Geometry.js\").GeometryLayout}\n */\n this.layout = 'XY';\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array}\n */\n this.flatCoordinates = null;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromFlatCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * @abstract\n * @return {Array<*> | null} Coordinates.\n */\n getCoordinates() {\n return abstract();\n }\n\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n getFirstCoordinate() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @return {Array} Flat coordinates.\n */\n getFlatCoordinates() {\n return this.flatCoordinates;\n }\n\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n getLastCoordinate() {\n return this.flatCoordinates.slice(\n this.flatCoordinates.length - this.stride\n );\n }\n\n /**\n * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n * @api\n */\n getLayout() {\n return this.layout;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\n // Simplification did not actually remove any coordinates. We now know\n // that any calls to getSimplifiedGeometry with a squaredTolerance less\n // than or equal to the current squaredTolerance will also not have any\n // effect. This allows us to short circuit simplification (saving CPU\n // cycles) and prevents the cache of simplified geometries from filling\n // up with useless identical copies of this geometry (saving memory).\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n return this;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride;\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @param {Array} flatCoordinates Flat coordinates.\n */\n setFlatCoordinates(layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n }\n\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n setCoordinates(coordinates, layout) {\n abstract();\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n * @param {Array<*>} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n setLayout(layout, coordinates, nesting) {\n /** @type {number} */\n let stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (let i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = 'XY';\n this.stride = 2;\n return;\n }\n coordinates = /** @type {Array} */ (coordinates[0]);\n }\n stride = coordinates.length;\n layout = getLayoutForStride(stride);\n }\n this.layout = layout;\n this.stride = stride;\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n */\n applyTransform(transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n rotate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n angle,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n if (sy === undefined) {\n sy = sx;\n }\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n scale(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n sx,\n sy,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n translate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n deltaX,\n deltaY,\n flatCoordinates\n );\n this.changed();\n }\n }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = 'XY';\n } else if (stride == 3) {\n layout = 'XYZ';\n } else if (stride == 4) {\n layout = 'XYZM';\n }\n return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n let stride;\n if (layout == 'XY') {\n stride = 2;\n } else if (layout == 'XYZ' || layout == 'XYM') {\n stride = 3;\n } else if (layout == 'XYZM') {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n const stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n dest\n );\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n let twiceArea = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n let area = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n let area = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n","/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n const flatCenters = [];\n let extent = createEmpty();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n ends[0],\n stride\n );\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y). Extra\n * dimensions are linearly interpolated.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n */\nfunction assignClosest(\n flatCoordinates,\n offset1,\n offset2,\n stride,\n x,\n y,\n closestPoint\n) {\n const x1 = flatCoordinates[offset1];\n const y1 = flatCoordinates[offset1 + 1];\n const dx = flatCoordinates[offset2] - x1;\n const dy = flatCoordinates[offset2 + 1] - y1;\n let offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(\n flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i],\n t\n );\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n const squaredDelta = squaredDx(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n ends,\n stride,\n max\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n endss,\n stride,\n max\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n if (offset == end) {\n return minSquaredDistance;\n }\n let i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[offset],\n flatCoordinates[offset + 1]\n );\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n let index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates,\n index - stride,\n index,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n } else {\n // Skip ahead multiple points, because we know that all the skipped\n // points cannot be any closer than the closest point we have found so\n // far. We know this because we know how close the current point is, how\n // close the closest point we have found so far is, and the maximum\n // distance between consecutive points. For example, if we're currently\n // at distance 10, the best we've found so far is 3, and that the maximum\n // distance between consecutive points is 2, then we'll need to skip at\n // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n // finding a closer point. We use Math.max(..., 1) to ensure that we\n // always advance at least one point, to avoid an infinite loop.\n index +=\n stride *\n Math.max(\n ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0,\n 1\n );\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates,\n end - stride,\n offset,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = end;\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n flatCoordinates,\n offset,\n endss,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const outside = forEachCorner(\n extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinate[0],\n coordinate[1]\n );\n }\n );\n return !outside;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n x,\n y\n) {\n // https://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n let wn = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n wn++;\n }\n } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n wn--;\n }\n x1 = x2;\n y1 = y2;\n }\n return wn !== 0;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n flatCoordinates,\n offset,\n ends,\n stride,\n x,\n y\n) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n flatCoordinates,\n offset,\n endss,\n stride,\n x,\n y\n) {\n if (endss.length === 0) {\n return false;\n }\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n flatCoordinates,\n offset,\n coordinates,\n stride\n) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [ends] Ends.\n * @return {Array} Ends.\n */\nexport function deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n ends\n) {\n ends = ends ? ends : [];\n let i = 0;\n for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n const end = deflateCoordinates(\n flatCoordinates,\n offset,\n coordinatess[j],\n stride\n );\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [endss] Endss.\n * @return {Array>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n endss\n) {\n endss = endss ? endss : [];\n let i = 0;\n for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n const ends = deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss[j],\n stride,\n endss[i]\n );\n if (ends.length === 0) {\n ends[0] = offset;\n }\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n","/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nexport function inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinates\n) {\n coordinates = coordinates !== undefined ? coordinates : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatess\n) {\n coordinatess = coordinatess !== undefined ? coordinatess : [];\n let i = 0;\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n const end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinatess[i]\n );\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n coordinatesss\n) {\n coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] =\n ends.length === 1 && ends[0] === offset\n ? []\n : inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatesss[i]\n );\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {ascending} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [dest] Destination.\n * @return {Array} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n flatCentersOffset,\n dest\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\n const intersections = [];\n // Calculate intersections with the horizontal line\n for (let r = 0, rr = ends.length; r < rr; ++r) {\n const end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n let pointX = NaN;\n let maxSegmentLength = -Infinity;\n intersections.sort(ascending);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n const segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (dest) {\n dest.push(pointX, y, maxSegmentLength);\n return dest;\n }\n return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n flatCenters\n) {\n let interiorPoints = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n interiorPoints = getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n 2 * i,\n interiorPoints\n );\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n","/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array} Destination.\n */\nexport function interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n dest,\n dimension\n) {\n let o, t;\n const n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n } else if (n === 2) {\n o = offset;\n t = fraction;\n } else if (n !== 0) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n const cumulativeLengths = [0];\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n const target = fraction * length;\n const index = binarySearch(cumulativeLengths, target);\n if (index < 0) {\n t =\n (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n o = offset + (-index - 2) * stride;\n } else {\n o = offset + index * stride;\n }\n }\n dimension = dimension > 1 ? dimension : 2;\n dest = dest ? dest : new Array(dimension);\n for (let i = 0; i < dimension; ++i) {\n dest[i] =\n o === undefined\n ? NaN\n : t === undefined\n ? flatCoordinates[o + i]\n : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n extrapolate\n) {\n if (end == offset) {\n return null;\n }\n let coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[end - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(end - stride, end);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n // FIXME use O(1) search\n if (m == flatCoordinates[offset + stride - 1]) {\n return flatCoordinates.slice(offset, offset + stride);\n }\n let lo = offset / stride;\n let hi = end / stride;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n const m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n const m1 = flatCoordinates[(lo + 1) * stride - 1];\n const t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (let i = 0; i < stride - 1; ++i) {\n coordinate.push(\n lerp(\n flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i],\n t\n )\n );\n }\n coordinate.push(m);\n return coordinate;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n flatCoordinates,\n offset,\n ends,\n stride,\n m,\n extrapolate,\n interpolate\n) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n ends[ends.length - 1],\n stride,\n m,\n extrapolate\n );\n }\n let coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[flatCoordinates.length - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n }\n if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n false\n );\n }\n offset = end;\n }\n return null;\n}\n","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n containsExtent,\n createEmpty,\n extendFlatCoordinates,\n intersects,\n intersectsSegment,\n} from '../../extent.js';\nimport {forEach as forEachSegment} from './segments.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const coordinatesExtent = extendFlatCoordinates(\n createEmpty(),\n flatCoordinates,\n offset,\n end,\n stride\n );\n if (!intersects(extent, coordinatesExtent)) {\n return false;\n }\n if (containsExtent(extent, coordinatesExtent)) {\n return true;\n }\n if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n return true;\n }\n return forEachSegment(\n flatCoordinates,\n offset,\n end,\n stride,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n * @return {boolean} `true` if the segment and the extent intersect,\n * `false` otherwise.\n */\n function (point1, point2) {\n return intersectsSegment(extent, point1, point2);\n }\n );\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n if (\n intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n ) {\n return true;\n }\n offset = ends[i];\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[3]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[3]\n )\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsExtent(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n if (\n !intersectsLineString(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n extent\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (\n intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n ) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n","/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (let i = 0; i < stride; ++i) {\n const tmp = flatCoordinates[offset + i];\n flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n flatCoordinates[end - stride + i] = tmp;\n }\n offset += stride;\n end -= stride;\n }\n}\n","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n let edge = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge === 0 ? undefined : edge > 0;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(\n flatCoordinates,\n offset,\n ends,\n stride,\n right\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n } else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(\n flatCoordinates,\n offset,\n endss,\n stride,\n right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, right)) {\n return false;\n }\n if (ends.length) {\n offset = ends[ends.length - 1];\n }\n }\n return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(\n flatCoordinates,\n offset,\n ends,\n stride,\n right\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n const reverse =\n i === 0\n ? (right && isClockwise) || (!right && !isClockwise)\n : (right && !isClockwise) || (!right && isClockwise);\n if (reverse) {\n reverseCoordinates(flatCoordinates, offset, end, stride);\n }\n offset = end;\n }\n return offset;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n right\n );\n }\n return offset;\n}\n\n/**\n * Return a two-dimensional endss\n * @param {Array} flatCoordinates Flat coordinates\n * @param {Array} ends Linear ring end indexes\n * @return {Array>} Two dimensional endss array that can\n * be used to construct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\n const endss = [];\n let offset = 0;\n let prevEndIndex = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n // classifies an array of rings into polygons with outer rings and holes\n if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n endss.push(ends.slice(prevEndIndex, i + 1));\n } else {\n if (endss.length === 0) {\n continue;\n }\n endss[endss.length - 1].push(ends[prevEndIndex]);\n }\n prevEndIndex = i + 1;\n offset = end;\n }\n return endss;\n}\n","/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n let ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(\n flatCoordinates.slice(offset - stride, offset),\n flatCoordinates.slice(offset, offset + stride)\n );\n if (ret) {\n return ret;\n }\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// 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 are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array} [simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nexport function simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n simplifiedFlatCoordinates\n) {\n simplifiedFlatCoordinates =\n simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n const n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\n const stack = [offset, end - stride];\n let index = 0;\n while (stack.length > 0) {\n const last = stack.pop();\n const first = stack.pop();\n let maxSquaredDistance = 0;\n const x1 = flatCoordinates[first];\n const y1 = flatCoordinates[first + 1];\n const x2 = flatCoordinates[last];\n const y2 = flatCoordinates[last + 1];\n for (let i = first + stride; i < last; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\n }\n }\n if (maxSquaredDistance > squaredTolerance) {\n markers[(index - offset) / stride] = 1;\n if (first + stride < index) {\n stack.push(first, index);\n }\n if (index + stride < last) {\n stack.push(index, last);\n }\n }\n }\n for (let i = 0; i < n; ++i) {\n if (markers[i]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride + 1];\n }\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n let x2 = x1;\n let y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n let x1 = snap(flatCoordinates[offset], tolerance);\n let y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n let x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n const x3 = snap(flatCoordinates[offset], tolerance);\n const y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n const dx2 = x3 - x1;\n const dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if (\n dx1 * dy2 == dy1 * dx2 &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n ) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const x = flatCoordinates[j];\n const y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array} anchor Rotation anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array} anchor Scale anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n","/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport const FIREFOX = ua.includes('firefox');\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * createImageBitmap() is supported.\n * @type {boolean}\n */\nexport const CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n window.addEventListener('_', null, options);\n window.removeEventListener('_', null, options);\n } catch (error) {\n // passive not supported\n }\n return passive;\n})();\n","/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number | undefined} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends BaseObject {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n this.background_ = options.background;\n\n /**\n * @type {Object}\n */\n const properties = Object.assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n Object.assign(properties, options.properties);\n }\n\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\n assert(\n typeof properties[LayerProperty.OPACITY] === 'number',\n 'Layer opacity must be a number'\n );\n\n properties[LayerProperty.VISIBLE] =\n options.visible !== undefined ? options.visible : true;\n properties[LayerProperty.Z_INDEX] = options.zIndex;\n properties[LayerProperty.MAX_RESOLUTION] =\n options.maxResolution !== undefined ? options.maxResolution : Infinity;\n properties[LayerProperty.MIN_RESOLUTION] =\n options.minResolution !== undefined ? options.minResolution : 0;\n properties[LayerProperty.MIN_ZOOM] =\n options.minZoom !== undefined ? options.minZoom : -Infinity;\n properties[LayerProperty.MAX_ZOOM] =\n options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n /**\n * @type {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? properties.className : 'ol-layer';\n delete properties.className;\n\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n }\n\n /**\n * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n getBackground() {\n return this.background_;\n }\n\n /**\n * @return {string} CSS class name.\n */\n getClassName() {\n return this.className_;\n }\n\n /**\n * This method is not meant to be called by layers or layer renderers because the state\n * is incorrect if the layer is included in a layer group.\n *\n * @param {boolean} [managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n getLayerState(managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: managed === undefined ? true : managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n\n return state;\n }\n\n /**\n * @abstract\n * @param {Array} [array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Array} [states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(states) {\n return abstract();\n }\n\n /**\n * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n * will be visible regardless of extent.\n * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n * @observable\n * @api\n */\n getExtent() {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (\n this.get(LayerProperty.EXTENT)\n );\n }\n\n /**\n * Return the maximum resolution of the layer. Returns Infinity if\n * the layer has no maximum resolution set.\n * @return {number} The maximum resolution of the layer.\n * @observable\n * @api\n */\n getMaxResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n }\n\n /**\n * Return the minimum resolution of the layer. Returns 0 if\n * the layer has no minimum resolution set.\n * @return {number} The minimum resolution of the layer.\n * @observable\n * @api\n */\n getMinResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n }\n\n /**\n * Return the minimum zoom level of the layer. Returns -Infinity if\n * the layer has no minimum zoom set.\n * @return {number} The minimum zoom level of the layer.\n * @observable\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n }\n\n /**\n * Return the maximum zoom level of the layer. Returns Infinity if\n * the layer has no maximum zoom set.\n * @return {number} The maximum zoom level of the layer.\n * @observable\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n }\n\n /**\n * Return the opacity of the layer (between 0 and 1).\n * @return {number} The opacity of the layer.\n * @observable\n * @api\n */\n getOpacity() {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n }\n\n /**\n * @abstract\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n return abstract();\n }\n\n /**\n * Return the value of this layer's `visible` property. To find out whether the layer\n * is visible on a map, use `isVisible()` instead.\n * @return {boolean} The value of the `visible` property of the layer.\n * @observable\n * @api\n */\n getVisible() {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n }\n\n /**\n * Return the Z-index of the layer, which is used to order layers before\n * rendering. Returns undefined if the layer is unmanaged.\n * @return {number|undefined} The Z-index of the layer.\n * @observable\n * @api\n */\n getZIndex() {\n return /** @type {number|undefined} */ (this.get(LayerProperty.Z_INDEX));\n }\n\n /**\n * Sets the background color.\n * @param {BackgroundColor} [background] Background color.\n */\n setBackground(background) {\n this.background_ = background;\n this.changed();\n }\n\n /**\n * Set the extent at which the layer is visible. If `undefined`, the layer\n * will be visible at all extents.\n * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n * @observable\n * @api\n */\n setExtent(extent) {\n this.set(LayerProperty.EXTENT, extent);\n }\n\n /**\n * Set the maximum resolution at which the layer is visible.\n * @param {number} maxResolution The maximum resolution of the layer.\n * @observable\n * @api\n */\n setMaxResolution(maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n }\n\n /**\n * Set the minimum resolution at which the layer is visible.\n * @param {number} minResolution The minimum resolution of the layer.\n * @observable\n * @api\n */\n setMinResolution(minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n }\n\n /**\n * Set the maximum zoom (exclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} maxZoom The maximum zoom of the layer.\n * @observable\n * @api\n */\n setMaxZoom(maxZoom) {\n this.set(LayerProperty.MAX_ZOOM, maxZoom);\n }\n\n /**\n * Set the minimum zoom (inclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} minZoom The minimum zoom of the layer.\n * @observable\n * @api\n */\n setMinZoom(minZoom) {\n this.set(LayerProperty.MIN_ZOOM, minZoom);\n }\n\n /**\n * Set the opacity of the layer, allowed values range from 0 to 1.\n * @param {number} opacity The opacity of the layer.\n * @observable\n * @api\n */\n setOpacity(opacity) {\n assert(typeof opacity === 'number', 'Layer opacity must be a number');\n this.set(LayerProperty.OPACITY, opacity);\n }\n\n /**\n * Set the visibility of the layer (`true` or `false`).\n * @param {boolean} visible The visibility of the layer.\n * @observable\n * @api\n */\n setVisible(visible) {\n this.set(LayerProperty.VISIBLE, visible);\n }\n\n /**\n * Set Z-index of the layer, which is used to order layers before rendering.\n * The default Z-index is 0.\n * @param {number} zindex The z-index of the layer.\n * @observable\n * @api\n */\n setZIndex(zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n super.disposeInternal();\n }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/expr/expression\n */\n\nimport {ascending} from '../array.js';\n\n/**\n * @fileoverview This module includes types and functions for parsing array encoded expressions.\n * The result of parsing an encoded expression is one of the specific expression classes.\n * During parsing, information is added to the parsing context about the data accessed by the\n * expression.\n */\n\nlet numTypes = 0;\nexport const NoneType = 0;\nexport const BooleanType = 1 << numTypes++;\nexport const NumberType = 1 << numTypes++;\nexport const StringType = 1 << numTypes++;\nexport const ColorType = 1 << numTypes++;\nexport const NumberArrayType = 1 << numTypes++;\nexport const AnyType = Math.pow(2, numTypes) - 1;\n\nconst typeNames = {\n [BooleanType]: 'boolean',\n [NumberType]: 'number',\n [StringType]: 'string',\n [ColorType]: 'color',\n [NumberArrayType]: 'number[]',\n};\n\nconst namedTypes = Object.keys(typeNames).map(Number).sort(ascending);\n\n/**\n * Get a string representation for a type.\n * @param {number} type The type.\n * @return {string} The type name.\n */\nexport function typeName(type) {\n const names = [];\n for (const namedType of namedTypes) {\n if (includesType(type, namedType)) {\n names.push(typeNames[namedType]);\n }\n }\n if (names.length === 0) {\n return 'untyped';\n }\n if (names.length < 3) {\n return names.join(' or ');\n }\n return names.slice(0, -1).join(', ') + ', or ' + names[names.length - 1];\n}\n\n/**\n * @param {number} broad The broad type.\n * @param {number} specific The specific type.\n * @return {boolean} The broad type includes the specific type.\n */\nexport function includesType(broad, specific) {\n return (broad & specific) === specific;\n}\n\n/**\n * @param {number} oneType One type.\n * @param {number} otherType Another type.\n * @return {boolean} The set of types overlap (share a common specific type)\n */\nexport function overlapsType(oneType, otherType) {\n return !!(oneType & otherType);\n}\n\n/**\n * @param {number} type The type.\n * @param {number} expected The expected type.\n * @return {boolean} The given type is exactly the expected type.\n */\nexport function isType(type, expected) {\n return type === expected;\n}\n\n/**\n * @typedef {boolean|number|string|Array} LiteralValue\n */\n\nexport class LiteralExpression {\n /**\n * @param {number} type The value type.\n * @param {LiteralValue} value The literal value.\n */\n constructor(type, value) {\n this.type = type;\n this.value = value;\n }\n}\n\nexport class CallExpression {\n /**\n * @param {number} type The return type.\n * @param {string} operator The operator.\n * @param {...Expression} args The arguments.\n */\n constructor(type, operator, ...args) {\n this.type = type;\n this.operator = operator;\n this.args = args;\n }\n}\n\n/**\n * @typedef {LiteralExpression|CallExpression} Expression\n */\n\n/**\n * @typedef {Object} ParsingContext\n * @property {Set} variables Variables referenced with the 'var' operator.\n * @property {Set} properties Properties referenced with the 'get' operator.\n */\n\n/**\n * @return {ParsingContext} A new parsing context.\n */\nexport function newParsingContext() {\n return {\n variables: new Set(),\n properties: new Set(),\n };\n}\n\n/**\n * @typedef {LiteralValue|Array} EncodedExpression\n */\n\n/**\n * @param {EncodedExpression} encoded The encoded expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression result.\n */\nexport function parse(encoded, context) {\n switch (typeof encoded) {\n case 'boolean': {\n return new LiteralExpression(BooleanType, encoded);\n }\n case 'number': {\n return new LiteralExpression(NumberType, encoded);\n }\n case 'string': {\n return new LiteralExpression(StringType, encoded);\n }\n default: {\n // pass\n }\n }\n\n if (!Array.isArray(encoded)) {\n throw new Error('Expression must be an array or a primitive value');\n }\n\n if (encoded.length === 0) {\n throw new Error('Empty expression');\n }\n\n if (typeof encoded[0] === 'string') {\n return parseCallExpression(encoded, context);\n }\n\n for (const item of encoded) {\n if (typeof item !== 'number') {\n throw new Error('Expected an array of numbers');\n }\n }\n\n let type = NumberArrayType;\n if (encoded.length === 3 || encoded.length === 4) {\n type |= ColorType;\n }\n\n return new LiteralExpression(type, encoded);\n}\n\n/**\n * @type {Object}\n */\nexport const Ops = {\n Number: 'number',\n String: 'string',\n Get: 'get',\n Var: 'var',\n Any: 'any',\n All: 'all',\n Not: '!',\n Resolution: 'resolution',\n Equal: '==',\n NotEqual: '!=',\n GreaterThan: '>',\n GreaterThanOrEqualTo: '>=',\n LessThan: '<',\n LessThanOrEqualTo: '<=',\n Multiply: '*',\n Divide: '/',\n Add: '+',\n Subtract: '-',\n Clamp: 'clamp',\n Mod: '%',\n Pow: '^',\n Abs: 'abs',\n Floor: 'floor',\n Ceil: 'ceil',\n Round: 'round',\n Sin: 'sin',\n Cos: 'cos',\n Atan: 'atan',\n Sqrt: 'sqrt',\n Match: 'match',\n};\n\n/**\n * @typedef {function(Array, ParsingContext):Expression} Parser\n */\n\n/**\n * @type {Object}\n */\nconst parsers = {\n [Ops.Number]: createParser(withArgs(1, Infinity, AnyType), NumberType),\n [Ops.String]: createParser(withArgs(1, Infinity, AnyType), StringType),\n [Ops.Get]: createParser(withGetArgs, AnyType),\n [Ops.Var]: createParser(withVarArgs, AnyType),\n [Ops.Resolution]: createParser(withNoArgs, NumberType),\n [Ops.Any]: createParser(withArgs(2, Infinity, BooleanType), BooleanType),\n [Ops.All]: createParser(withArgs(2, Infinity, BooleanType), BooleanType),\n [Ops.Not]: createParser(withArgs(1, 1, BooleanType), BooleanType),\n [Ops.Equal]: createParser(withArgs(2, 2, AnyType), BooleanType),\n [Ops.NotEqual]: createParser(withArgs(2, 2, AnyType), BooleanType),\n [Ops.GreaterThan]: createParser(withArgs(2, 2, AnyType), BooleanType),\n [Ops.GreaterThanOrEqualTo]: createParser(\n withArgs(2, 2, AnyType),\n BooleanType\n ),\n [Ops.LessThan]: createParser(withArgs(2, 2, AnyType), BooleanType),\n [Ops.LessThanOrEqualTo]: createParser(withArgs(2, 2, AnyType), BooleanType),\n [Ops.Multiply]: createParser(withArgs(2, Infinity, NumberType), NumberType),\n [Ops.Divide]: createParser(withArgs(2, 2, NumberType), NumberType),\n [Ops.Add]: createParser(withArgs(2, Infinity, NumberType), NumberType),\n [Ops.Subtract]: createParser(withArgs(2, 2, NumberType), NumberType),\n [Ops.Clamp]: createParser(withArgs(3, 3, NumberType), NumberType),\n [Ops.Mod]: createParser(withArgs(2, 2, NumberType), NumberType),\n [Ops.Pow]: createParser(withArgs(2, 2, NumberType), NumberType),\n [Ops.Abs]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Floor]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Ceil]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Round]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Sin]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Cos]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Atan]: createParser(withArgs(1, 2, NumberType), NumberType),\n [Ops.Sqrt]: createParser(withArgs(1, 1, NumberType), NumberType),\n [Ops.Match]: createParser(\n withArgs(4, Infinity, StringType | NumberType),\n AnyType\n ),\n};\n\n/**\n * @typedef {function(Array, ParsingContext):Array} ArgValidator\n */\n\n/**\n * @type ArgValidator\n */\nfunction withGetArgs(encoded, context) {\n if (encoded.length !== 2) {\n throw new Error('Expected 1 argument for get operation');\n }\n const arg = parse(encoded[1], context);\n if (!(arg instanceof LiteralExpression)) {\n throw new Error('Expected a literal argument for get operation');\n }\n if (typeof arg.value !== 'string') {\n throw new Error('Expected a string argument for get operation');\n }\n context.properties.add(arg.value);\n return [arg];\n}\n\n/**\n * @type ArgValidator\n */\nfunction withVarArgs(encoded, context) {\n if (encoded.length !== 2) {\n throw new Error('Expected 1 argument for var operation');\n }\n const arg = parse(encoded[1], context);\n if (!(arg instanceof LiteralExpression)) {\n throw new Error('Expected a literal argument for var operation');\n }\n if (typeof arg.value !== 'string') {\n throw new Error('Expected a string argument for get operation');\n }\n context.variables.add(arg.value);\n return [arg];\n}\n\n/**\n * @type ArgValidator\n */\nfunction withNoArgs(encoded, context) {\n const operation = encoded[0];\n if (encoded.length !== 1) {\n throw new Error(`Expected no arguments for ${operation} operation`);\n }\n return [];\n}\n\n/**\n * @param {number} minArgs The minimum number of arguments.\n * @param {number} maxArgs The maximum number of arguments.\n * @param {number} argType The argument type.\n * @return {ArgValidator} The argument validator\n */\nfunction withArgs(minArgs, maxArgs, argType) {\n return function (encoded, context) {\n const operation = encoded[0];\n const argCount = encoded.length - 1;\n if (minArgs === maxArgs) {\n if (argCount !== minArgs) {\n const plural = minArgs === 1 ? '' : 's';\n throw new Error(\n `Expected ${minArgs} argument${plural} for operation ${operation}, got ${argCount}`\n );\n }\n } else if (argCount < minArgs || argCount > maxArgs) {\n throw new Error(\n `Expected ${minArgs} to ${maxArgs} arguments for operation ${operation}, got ${argCount}`\n );\n }\n\n /**\n * @type {Array}\n */\n const args = new Array(argCount);\n for (let i = 0; i < argCount; ++i) {\n const expression = parse(encoded[i + 1], context);\n if (!overlapsType(argType, expression.type)) {\n const gotType = typeName(argType);\n const expectedType = typeName(expression.type);\n throw new Error(\n `Unexpected type for argument ${i} of ${operation} operation` +\n ` : got ${gotType} but expected ${expectedType}`\n );\n }\n args[i] = expression;\n }\n\n return args;\n };\n}\n\n/**\n * @param {ArgValidator} argValidator The argument validator.\n * @param {number} returnType The return type.\n * @return {Parser} The parser.\n */\nfunction createParser(argValidator, returnType) {\n return function (encoded, context) {\n const operator = encoded[0];\n const args = argValidator(encoded, context);\n return new CallExpression(returnType, operator, ...args);\n };\n}\n\n/**\n * @param {Array} encoded The encoded expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression.\n */\nfunction parseCallExpression(encoded, context) {\n const operator = encoded[0];\n\n const parser = parsers[operator];\n if (!parser) {\n throw new Error(`Unknown operator: ${operator}`);\n }\n return parser(encoded, context);\n}\n","/**\n * @module ol/expr/cpu\n */\n\nimport {\n LiteralExpression,\n Ops,\n overlapsType,\n parse,\n typeName,\n} from './expression.js';\n\n/**\n * @fileoverview This module includes functions to build expressions for evaluation on the CPU.\n * Building is composed of two steps: parsing and compiling. The parsing step takes an encoded\n * expression and returns an instance of one of the expression classes. The compiling step takes\n * the expression instance and returns a function that can be evaluated in to return a literal\n * value. The evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {Object} EvaluationContext\n * @property {Object} properties The values for properties used in 'get' expressions.\n * @property {Object} variables The values for variables used in 'var' expressions.\n * @property {number} resolution The map resolution.\n */\n\n/**\n * @return {EvaluationContext} A new evaluation context.\n */\nexport function newEvaluationContext() {\n return {\n variables: {},\n properties: {},\n resolution: NaN,\n };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"./expression.js\").LiteralValue} ExpressionEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):boolean} BooleanEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):number} NumberEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):string} StringEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array|string)} ColorLikeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array} NumberArrayEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array} CoordinateEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array|number)} SizeLikeEvaluator\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The expression evaluator.\n */\nexport function buildExpression(encoded, type, context) {\n const expression = parse(encoded, context);\n if (!overlapsType(type, expression.type)) {\n const expected = typeName(type);\n const actual = typeName(expression.type);\n throw new Error(\n `Expected expression to be of type ${expected}, got ${actual}`\n );\n }\n return compileExpression(expression, context);\n}\n\n/**\n * @param {import(\"./expression.js\").Expression} expression The expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileExpression(expression, context) {\n if (expression instanceof LiteralExpression) {\n return function () {\n return expression.value;\n };\n }\n const operator = expression.operator;\n switch (operator) {\n case Ops.Number:\n case Ops.String: {\n return compileAssertionExpression(expression, context);\n }\n case Ops.Get:\n case Ops.Var: {\n return compileAccessorExpression(expression, context);\n }\n case Ops.Resolution: {\n return (context) => context.resolution;\n }\n case Ops.Any:\n case Ops.All:\n case Ops.Not: {\n return compileLogicalExpression(expression, context);\n }\n case Ops.Equal:\n case Ops.NotEqual:\n case Ops.LessThan:\n case Ops.LessThanOrEqualTo:\n case Ops.GreaterThan:\n case Ops.GreaterThanOrEqualTo: {\n return compileComparisonExpression(expression, context);\n }\n case Ops.Multiply:\n case Ops.Divide:\n case Ops.Add:\n case Ops.Subtract:\n case Ops.Clamp:\n case Ops.Mod:\n case Ops.Pow:\n case Ops.Abs:\n case Ops.Floor:\n case Ops.Ceil:\n case Ops.Round:\n case Ops.Sin:\n case Ops.Cos:\n case Ops.Atan:\n case Ops.Sqrt: {\n return compileNumericExpression(expression, context);\n }\n case Ops.Match: {\n return compileMatchExpression(expression, context);\n }\n default: {\n throw new Error(`Unsupported operator ${operator}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAssertionExpression(expression, context) {\n const type = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (type) {\n case Ops.Number:\n case Ops.String: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n const value = args[i](context);\n if (typeof value === type) {\n return value;\n }\n }\n throw new Error(`Expected one of the values to be a ${type}`);\n };\n }\n default: {\n throw new Error(`Unsupported assertion operator ${type}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAccessorExpression(expression, context) {\n const nameExpression = expression.args[0];\n if (!(nameExpression instanceof LiteralExpression)) {\n throw new Error('Expected literal name');\n }\n const name = nameExpression.value;\n if (typeof name !== 'string') {\n throw new Error('Expected string name');\n }\n switch (expression.operator) {\n case Ops.Get: {\n return (context) => context.properties[name];\n }\n case Ops.Var: {\n return (context) => context.variables[name];\n }\n default: {\n throw new Error(`Unsupported accessor operator ${expression.operator}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileComparisonExpression(expression, context) {\n const op = expression.operator;\n const left = compileExpression(expression.args[0], context);\n const right = compileExpression(expression.args[1], context);\n switch (op) {\n case Ops.Equal: {\n return (context) => left(context) === right(context);\n }\n case Ops.NotEqual: {\n return (context) => left(context) !== right(context);\n }\n case Ops.LessThan: {\n return (context) => left(context) < right(context);\n }\n case Ops.LessThanOrEqualTo: {\n return (context) => left(context) <= right(context);\n }\n case Ops.GreaterThan: {\n return (context) => left(context) > right(context);\n }\n case Ops.GreaterThanOrEqualTo: {\n return (context) => left(context) >= right(context);\n }\n default: {\n throw new Error(`Unsupported comparison operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileLogicalExpression(expression, context) {\n const op = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (op) {\n case Ops.Any: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n if (args[i](context)) {\n return true;\n }\n }\n return false;\n };\n }\n case Ops.All: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n if (!args[i](context)) {\n return false;\n }\n }\n return true;\n };\n }\n case Ops.Not: {\n return (context) => !args[0](context);\n }\n default: {\n throw new Error(`Unsupported logical operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberEvaluator} The evaluator function.\n */\nfunction compileNumericExpression(expression, context) {\n const op = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (op) {\n case Ops.Multiply: {\n return (context) => {\n let value = 1;\n for (let i = 0; i < length; ++i) {\n value *= args[i](context);\n }\n return value;\n };\n }\n case Ops.Divide: {\n return (context) => args[0](context) / args[1](context);\n }\n case Ops.Add: {\n return (context) => {\n let value = 0;\n for (let i = 0; i < length; ++i) {\n value += args[i](context);\n }\n return value;\n };\n }\n case Ops.Subtract: {\n return (context) => args[0](context) - args[1](context);\n }\n case Ops.Clamp: {\n return (context) => {\n const value = args[0](context);\n const min = args[1](context);\n if (value < min) {\n return min;\n }\n const max = args[2](context);\n if (value > max) {\n return max;\n }\n return value;\n };\n }\n case Ops.Mod: {\n return (context) => args[0](context) % args[1](context);\n }\n case Ops.Pow: {\n return (context) => Math.pow(args[0](context), args[1](context));\n }\n case Ops.Abs: {\n return (context) => Math.abs(args[0](context));\n }\n case Ops.Floor: {\n return (context) => Math.floor(args[0](context));\n }\n case Ops.Ceil: {\n return (context) => Math.ceil(args[0](context));\n }\n case Ops.Round: {\n return (context) => Math.round(args[0](context));\n }\n case Ops.Sin: {\n return (context) => Math.sin(args[0](context));\n }\n case Ops.Cos: {\n return (context) => Math.cos(args[0](context));\n }\n case Ops.Atan: {\n if (length === 2) {\n return (context) => Math.atan2(args[0](context), args[1](context));\n }\n return (context) => Math.atan(args[0](context));\n }\n case Ops.Sqrt: {\n return (context) => Math.sqrt(args[0](context));\n }\n default: {\n throw new Error(`Unsupported numeric operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileMatchExpression(expression, context) {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n return (context) => {\n const value = args[0](context);\n for (let i = 1; i < length; i += 2) {\n if (value === args[i](context)) {\n return args[i + 1](context);\n }\n }\n return args[length - 1](context);\n };\n}\n","/**\n * @module ol/render/canvas/style\n */\n\nimport Circle from '../../style/Circle.js';\nimport Fill from '../../style/Fill.js';\nimport Icon from '../../style/Icon.js';\nimport RegularShape from '../../style/RegularShape.js';\nimport Stroke from '../../style/Stroke.js';\nimport Style from '../../style/Style.js';\nimport Text from '../../style/Text.js';\nimport {\n BooleanType,\n ColorType,\n NumberArrayType,\n NumberType,\n StringType,\n newParsingContext,\n} from '../../expr/expression.js';\nimport {buildExpression, newEvaluationContext} from '../../expr/cpu.js';\nimport {toSize} from '../../size.js';\n\n/**\n * @fileoverview This module includes functions to build styles for the canvas renderer. Building\n * is composed of two steps: parsing and compiling. The parsing step takes an encoded expression\n * and returns an instance of one of the expression classes. The compiling step takes the\n * expression instance and returns a function that can be evaluated to return a literal value. The\n * evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {import(\"../../style/flat.js\").FlatStyle} FlatStyle\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").EncodedExpression} EncodedExpression\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").ParsingContext} ParsingContext\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").CallExpression} CallExpression\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").EvaluationContext} EvaluationContext\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").ExpressionEvaluator} ExpressionEvaluator\n */\n\n/**\n * @param {EvaluationContext} context The evaluation context.\n * @return {boolean} Always true.\n */\nfunction always(context) {\n return true;\n}\n\n/**\n * This function adapts a rule evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array} rules The rules.\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function rulesToStyleFunction(rules) {\n const parsingContext = newParsingContext();\n const evaluator = buildRuleSet(rules, parsingContext);\n const evaluationContext = newEvaluationContext();\n return function (feature, resolution) {\n evaluationContext.properties = feature.getPropertiesInternal();\n evaluationContext.resolution = resolution;\n return evaluator(evaluationContext);\n };\n}\n\n/**\n * This function adapts a style evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array} flatStyles The flat styles.\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function flatStylesToStyleFunction(flatStyles) {\n const parsingContext = newParsingContext();\n const length = flatStyles.length;\n\n /**\n * @type {Array}\n */\n const evaluators = new Array(length);\n for (let i = 0; i < length; ++i) {\n evaluators[i] = buildStyle(flatStyles[i], parsingContext);\n }\n const evaluationContext = newEvaluationContext();\n\n /**\n * @type {Array
\ No newline at end of file diff --git a/dist/examples/esri-4326.js b/dist/examples/esri-4326.js new file mode 100644 index 00000000..582f1cc7 --- /dev/null +++ b/dist/examples/esri-4326.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[408],{2094:(s,e,r)=>{r(9789),(0,r(7539).nn)("map","https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer/resources/styles/",{projection:"EPSG:4326"})}},s=>{s(s.s=2094)}]); +//# sourceMappingURL=esri-4326.js.map \ No newline at end of file diff --git a/dist/examples/esri-4326.js.map b/dist/examples/esri-4326.js.map new file mode 100644 index 00000000..c07eb5df --- /dev/null +++ b/dist/examples/esri-4326.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-4326.js","mappings":"0HAGA,E,QAAA,IACE,MACA,2GACA,CACEA,WAAY,a","sources":["webpack://ol-mapbox-style/./examples/esri-4326.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply(\n 'map',\n 'https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer/resources/styles/',\n {\n projection: 'EPSG:4326',\n }\n);\n"],"names":["projection"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.css b/dist/examples/esri-transformrequest.css new file mode 100644 index 00000000..e8c605df --- /dev/null +++ b/dist/examples/esri-transformrequest.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=esri-transformrequest.css.map*/ \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.css.map b/dist/examples/esri-transformrequest.css.map new file mode 100644 index 00000000..8bd609c2 --- /dev/null +++ b/dist/examples/esri-transformrequest.css.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-transformrequest.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,8BAA8B;EAC9B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;AACnB;;A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f;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.html b/dist/examples/esri-transformrequest.html new file mode 100644 index 00000000..26dfb56f --- /dev/null +++ b/dist/examples/esri-transformrequest.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/esri-transformrequest.js b/dist/examples/esri-transformrequest.js new file mode 100644 index 00000000..c4f8e659 --- /dev/null +++ b/dist/examples/esri-transformrequest.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[945],{9622:(e,s,r)=>{r(9789),(0,r(7539).ZP)("map","https://www.arcgis.com/sharing/rest/content/items/2afe5b807fa74006be6363fd243ffb30/resources/styles/root.json",{transformRequest(e,s){if("Source"===s)return new Request(e.replace("/VectorTileServer","/VectorTileServer/"))}})}},e=>{e(e.s=9622)}]); +//# sourceMappingURL=esri-transformrequest.js.map \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.js.map b/dist/examples/esri-transformrequest.js.map new file mode 100644 index 00000000..21baa85c --- /dev/null +++ b/dist/examples/esri-transformrequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-transformrequest.js","mappings":"0HAGA,E,QAAA,IACE,MACA,gHACA,CACEA,iBAAiBC,EAAKC,GACpB,GAAa,WAATA,EACF,OAAO,IAAIC,QACTF,EAAIG,QAAQ,oBAAqB,sBAGvC,G","sources":["webpack://ol-mapbox-style/./examples/esri-transformrequest.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nolms(\n 'map',\n 'https://www.arcgis.com/sharing/rest/content/items/2afe5b807fa74006be6363fd243ffb30/resources/styles/root.json',\n {\n transformRequest(url, type) {\n if (type === 'Source') {\n return new Request(\n url.replace('/VectorTileServer', '/VectorTileServer/')\n );\n }\n },\n }\n);\n"],"names":["transformRequest","url","type","Request","replace"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.css b/dist/examples/geojson-featurestate.css new file mode 100644 index 00000000..e3d20d59 --- /dev/null +++ b/dist/examples/geojson-featurestate.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-featurestate.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.css.map b/dist/examples/geojson-featurestate.css.map new file mode 100644 index 00000000..bdada2e0 --- /dev/null +++ b/dist/examples/geojson-featurestate.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-featurestate.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;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AiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.html b/dist/examples/geojson-featurestate.html new file mode 100644 index 00000000..3bbf502c --- /dev/null +++ b/dist/examples/geojson-featurestate.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-featurestate.js b/dist/examples/geojson-featurestate.js new file mode 100644 index 00000000..12ddff9d --- /dev/null +++ b/dist/examples/geojson-featurestate.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[874],{8176:(e,t,l)=>{l(9789);var s=l(7539);const o="data/geojson.json";fetch(o).then((e=>e.json())).then((e=>(e.layers.push({id:"state-hover",type:"fill",source:"states",paint:{"fill-color":"red","fill-opacity":["case",["boolean",["feature-state","hover"],!1],.5,0]}}),(0,s.ZP)("map",e,{styleUrl:o})))).then((e=>{let t=null;e.on("pointermove",(function(l){const o=e.getFeaturesAtPixel(l.pixel);o.length>0?(null!==t&&(0,s.LN)(e,{source:"states",id:t},null),t=o[0].getId(),(0,s.LN)(e,{source:"states",id:t},{hover:!0})):null!==t&&((0,s.LN)(e,{source:"states",id:t},null),t=null)}))}))}},e=>{e(e.s=8176)}]); +//# sourceMappingURL=geojson-featurestate.js.map \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.js.map b/dist/examples/geojson-featurestate.js.map new file mode 100644 index 00000000..0f7c5d44 --- /dev/null +++ b/dist/examples/geojson-featurestate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-featurestate.js","mappings":"uIAGA,MAAMA,EAAW,oBAEjBC,MAAMD,GACHE,MAAMC,GAAaA,EAASC,SAC5BF,MAAMG,IACLA,EAAQC,OAAOC,KAAK,CAClB,GAAM,cACN,KAAQ,OACR,OAAU,SACV,MAAS,CACP,aAAc,MACd,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,UAAU,GACxC,GACA,OAIC,QAAK,MAAOF,EAAS,CAACL,SAAUA,OAExCE,MAAMM,IACL,IAAIC,EAAiB,KACrBD,EAAIE,GAAG,eAAe,SAAUC,GAC9B,MAAMC,EAAWJ,EAAIK,mBAAmBF,EAAIG,OACxCF,EAASG,OAAS,GACG,OAAnBN,IACF,QAAgBD,EAAK,CAACQ,OAAQ,SAAUC,GAAIR,GAAiB,MAE/DA,EAAiBG,EAAS,GAAGM,SAC7B,QACEV,EACA,CAACQ,OAAQ,SAAUC,GAAIR,GACvB,CAACU,OAAO,KAEkB,OAAnBV,KACT,QAAgBD,EAAK,CAACQ,OAAQ,SAAUC,GAAIR,GAAiB,MAC7DA,EAAiB,KAErB,GAAE,G","sources":["webpack://ol-mapbox-style/./examples/geojson-featurestate.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms, {setFeatureState} from 'ol-mapbox-style';\n\nconst styleUrl = 'data/geojson.json';\n\nfetch(styleUrl)\n .then((response) => response.json())\n .then((glStyle) => {\n glStyle.layers.push({\n 'id': 'state-hover',\n 'type': 'fill',\n 'source': 'states',\n 'paint': {\n 'fill-color': 'red',\n 'fill-opacity': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n 0.5,\n 0,\n ],\n },\n });\n return olms('map', glStyle, {styleUrl: styleUrl});\n })\n .then((map) => {\n let hoveredStateId = null;\n map.on('pointermove', function (evt) {\n const features = map.getFeaturesAtPixel(evt.pixel);\n if (features.length > 0) {\n if (hoveredStateId !== null) {\n setFeatureState(map, {source: 'states', id: hoveredStateId}, null);\n }\n hoveredStateId = features[0].getId();\n setFeatureState(\n map,\n {source: 'states', id: hoveredStateId},\n {hover: true}\n );\n } else if (hoveredStateId !== null) {\n setFeatureState(map, {source: 'states', id: hoveredStateId}, null);\n hoveredStateId = null;\n }\n });\n });\n"],"names":["styleUrl","fetch","then","response","json","glStyle","layers","push","map","hoveredStateId","on","evt","features","getFeaturesAtPixel","pixel","length","source","id","getId","hover"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-inline.css b/dist/examples/geojson-inline.css new file mode 100644 index 00000000..4b201541 --- /dev/null +++ b/dist/examples/geojson-inline.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-inline.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-inline.css.map b/dist/examples/geojson-inline.css.map new file mode 100644 index 00000000..73416eb7 --- /dev/null +++ b/dist/examples/geojson-inline.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-inline.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9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ACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-inline.html b/dist/examples/geojson-inline.html new file mode 100644 index 00000000..7f948dc8 --- /dev/null +++ b/dist/examples/geojson-inline.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-inline.js b/dist/examples/geojson-inline.js new file mode 100644 index 00000000..5c75ca01 --- /dev/null +++ b/dist/examples/geojson-inline.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[223],{4730:(s,e,n)=>{n(9789),(0,n(7539).nn)("map","data/geojson-inline.json")}},s=>{s(s.s=4730)}]); +//# sourceMappingURL=geojson-inline.js.map \ No newline at end of file diff --git a/dist/examples/geojson-inline.js.map b/dist/examples/geojson-inline.js.map new file mode 100644 index 00000000..09327c6f --- /dev/null +++ b/dist/examples/geojson-inline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-inline.js","mappings":"0HAGA,E,QAAA,IAAM,MAAO,2B","sources":["webpack://ol-mapbox-style/./examples/geojson-inline.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson-inline.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-layer.css b/dist/examples/geojson-layer.css new file mode 100644 index 00000000..f58ae041 --- /dev/null +++ b/dist/examples/geojson-layer.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-layer.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-layer.css.map b/dist/examples/geojson-layer.css.map new file mode 100644 index 00000000..b47f57f8 --- /dev/null +++ b/dist/examples/geojson-layer.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-layer.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EACl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,iCAAiC;AACnC;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-layer.html b/dist/examples/geojson-layer.html new file mode 100644 index 00000000..d7f65efe --- /dev/null +++ b/dist/examples/geojson-layer.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-layer.js b/dist/examples/geojson-layer.js new file mode 100644 index 00000000..e22c0e58 --- /dev/null +++ b/dist/examples/geojson-layer.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[145],{7530:(e,s,a)=>{a(9789);var o=a(6333),n=a(1202),t=a(9090),l=a(7539),p=a(8661);const w=new o.Z;(0,l.bg)(w,"data/geojson.json"),new n.Z({target:"map",layers:[w],view:new t.ZP({center:(0,p.mi)([-122.19952899999998,51.920367528011525]),zoom:3})})}},e=>{e(e.s=7530)}]); +//# sourceMappingURL=geojson-layer.js.map \ No newline at end of file diff --git a/dist/examples/geojson-layer.js.map b/dist/examples/geojson-layer.js.map new file mode 100644 index 00000000..6a02327f --- /dev/null +++ b/dist/examples/geojson-layer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-layer.js","mappings":"+KAMA,MAAMA,EAAQ,IAAI,KAClB,QAAWA,EAAO,qBAClB,IAAI,IAAI,CACNC,OAAQ,MACRC,OAAQ,CAACF,GACTG,KAAM,IAAI,KAAK,CACbC,QAAQ,QAAW,EAAE,mBAAoB,qBACzCC,KAAM,K","sources":["webpack://ol-mapbox-style/./examples/geojson-layer.js"],"sourcesContent":["import 'ol/ol.css';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport {Map, View} from 'ol';\nimport {applyStyle} from 'ol-mapbox-style';\nimport {fromLonLat} from 'ol/proj.js';\n\nconst layer = new VectorLayer();\napplyStyle(layer, 'data/geojson.json');\nnew Map({\n target: 'map',\n layers: [layer],\n view: new View({\n center: fromLonLat([-122.19952899999998, 51.920367528011525]),\n zoom: 3,\n }),\n});\n"],"names":["layer","target","layers","view","center","zoom"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-wfs.css b/dist/examples/geojson-wfs.css new file mode 100644 index 00000000..5578468f --- /dev/null +++ b/dist/examples/geojson-wfs.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-wfs.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-wfs.css.map b/dist/examples/geojson-wfs.css.map new file mode 100644 index 00000000..def1d04d --- /dev/null +++ b/dist/examples/geojson-wfs.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-wfs.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,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,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-wfs.html b/dist/examples/geojson-wfs.html new file mode 100644 index 00000000..745bae39 --- /dev/null +++ b/dist/examples/geojson-wfs.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-wfs.js b/dist/examples/geojson-wfs.js new file mode 100644 index 00000000..a2444c05 --- /dev/null +++ b/dist/examples/geojson-wfs.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[711],{5138:(s,e,a)=>{a(9789),(0,a(7539).nn)("map","data/geojson-wfs.json")}},s=>{s(s.s=5138)}]); +//# sourceMappingURL=geojson-wfs.js.map \ No newline at end of file diff --git a/dist/examples/geojson-wfs.js.map b/dist/examples/geojson-wfs.js.map new file mode 100644 index 00000000..64dfe49a --- /dev/null +++ b/dist/examples/geojson-wfs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-wfs.js","mappings":"0HAGA,E,QAAA,IAAM,MAAO,wB","sources":["webpack://ol-mapbox-style/./examples/geojson-wfs.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson-wfs.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson.css b/dist/examples/geojson.css new file mode 100644 index 00000000..77100b5b --- /dev/null +++ b/dist/examples/geojson.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson.css.map b/dist/examples/geojson.css.map new file mode 100644 index 00000000..e14bb0cc --- /dev/null +++ b/dist/examples/geojson.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EA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UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson.html b/dist/examples/geojson.html new file mode 100644 index 00000000..c555be59 --- /dev/null +++ b/dist/examples/geojson.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson.js b/dist/examples/geojson.js new file mode 100644 index 00000000..2c129b84 --- /dev/null +++ b/dist/examples/geojson.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[346],{5076:(s,e,a)=>{a(9789),(0,a(7539).nn)("map","data/geojson.json")}},s=>{s(s.s=5076)}]); +//# sourceMappingURL=geojson.js.map \ No newline at end of file diff --git a/dist/examples/geojson.js.map b/dist/examples/geojson.js.map new file mode 100644 index 00000000..799aa8c3 --- /dev/null +++ b/dist/examples/geojson.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson.js","mappings":"0HAGA,E,QAAA,IAAM,MAAO,oB","sources":["webpack://ol-mapbox-style/./examples/geojson.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/index.html b/dist/examples/index.html new file mode 100644 index 00000000..fd4012b1 --- /dev/null +++ b/dist/examples/index.html @@ -0,0 +1,37 @@ + + + + + + + ol-mapbox-style Examples + + + +

ol-mapbox-style Examples

+ + + diff --git a/dist/examples/mapbox.css b/dist/examples/mapbox.css new file mode 100644 index 00000000..550658ce --- /dev/null +++ b/dist/examples/mapbox.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=mapbox.css.map*/ \ No newline at end of file diff --git a/dist/examples/mapbox.css.map b/dist/examples/mapbox.css.map new file mode 100644 index 00000000..bd8fb22e --- /dev/null +++ b/dist/examples/mapbox.css.map @@ -0,0 +1 @@ +{"version":3,"file":"mapbox.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV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A;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;EACd,mBAAmB;EACnB,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,UAAU;AACZ;;AAEA;;EAEE,qBAAqB;EACrB,oDAAoD;EACpD,iCAAiC;AACnC;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/mapbox.html b/dist/examples/mapbox.html new file mode 100644 index 00000000..40cced52 --- /dev/null +++ b/dist/examples/mapbox.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/mapbox.js b/dist/examples/mapbox.js new file mode 100644 index 00000000..ab241d44 --- /dev/null +++ b/dist/examples/mapbox.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[862],{8309:(e,o,s)=>{s(9789);var c=s(7539);let a=document.cookie.replace(/(?:(?:^|.*;\s*)mapbox_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");a||(a=window.prompt("Enter your Mapbox API access token:"),a&&(document.cookie="mapbox_access_token="+a+"; expires=Fri, 31 Dec 9999 23:59:59 GMT")),(0,c.ZP)("map","mapbox://styles/mapbox/bright-v9",{accessToken:a})}},e=>{e(e.s=8309)}]); +//# sourceMappingURL=mapbox.js.map \ No newline at end of file diff --git a/dist/examples/mapbox.js.map b/dist/examples/mapbox.js.map new file mode 100644 index 00000000..8e653d51 --- /dev/null +++ b/dist/examples/mapbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapbox.js","mappings":"uIAGA,IAAIA,EAAMC,SAASC,OAAOC,QACxB,6DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,uCAChBL,IACFC,SAASC,OACP,uBAAyBF,EAAM,6CAIrC,QAAK,MAAO,mCAAoC,CAACM,YAAaN,G","sources":["webpack://ol-mapbox-style/./examples/mapbox.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)mapbox_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your Mapbox API access token:');\n if (key) {\n document.cookie =\n 'mapbox_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n }\n}\n\nolms('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: key});\n"],"names":["key","document","cookie","replace","window","prompt","accessToken"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.css b/dist/examples/maptiler-hillshading.css new file mode 100644 index 00000000..47ac1c3b --- /dev/null +++ b/dist/examples/maptiler-hillshading.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=maptiler-hillshading.css.map*/ \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.css.map b/dist/examples/maptiler-hillshading.css.map new file mode 100644 index 00000000..5c441c51 --- /dev/null +++ b/dist/examples/maptiler-hillshading.css.map @@ -0,0 +1 @@ +{"version":3,"file":"maptiler-hillshading.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SA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webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.html b/dist/examples/maptiler-hillshading.html new file mode 100644 index 00000000..515f49df --- /dev/null +++ b/dist/examples/maptiler-hillshading.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.js b/dist/examples/maptiler-hillshading.js new file mode 100644 index 00000000..a1c4ba31 --- /dev/null +++ b/dist/examples/maptiler-hillshading.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[670],{4161:(e,t,s)=>{s(9789);var o=s(7539);let a=document.cookie.replace(/(?:(?:^|.*;\s*)maptiler_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");a||(a=window.prompt("Enter your MapTiler API access token:"),document.cookie="maptiler_access_token="+a+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),fetch(`https://api.maptiler.com/maps/outdoor-v2/style.json?key=${a}`).then((e=>e.json())).then((e=>{(0,o.ZP)("map",Object.assign({},e,{center:[13.783578,47.609499],zoom:11,metadata:Object.assign(e.metadata,{"ol:webfonts":"https://fonts.googleapis.com/css?family={Font+Family}:{fontweight}{fontstyle}"})}))}))}},e=>{e(e.s=4161)}]); +//# sourceMappingURL=maptiler-hillshading.js.map \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.js.map b/dist/examples/maptiler-hillshading.js.map new file mode 100644 index 00000000..39d53e39 --- /dev/null +++ b/dist/examples/maptiler-hillshading.js.map @@ -0,0 +1 @@ +{"version":3,"file":"maptiler-hillshading.js","mappings":"uIAGA,IAAIA,EAAMC,SAASC,OAAOC,QACxB,+DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,yCACpBJ,SAASC,OACP,yBAA2BF,EAAM,2CAGrCM,MAAM,2DAA2DN,KAC9DO,MAAMC,GAAaA,EAASC,SAC5BF,MAAMG,KACL,QACE,MACAC,OAAOC,OAAO,CAAC,EAAGF,EAAO,CACvBG,OAAQ,CAAC,UAAW,WACpBC,KAAM,GACNC,SAAUJ,OAAOC,OAAOF,EAAMK,SAAU,CACtC,cACE,oFAGP,G","sources":["webpack://ol-mapbox-style/./examples/maptiler-hillshading.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)maptiler_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your MapTiler API access token:');\n document.cookie =\n 'maptiler_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\n\nfetch(`https://api.maptiler.com/maps/outdoor-v2/style.json?key=${key}`)\n .then((response) => response.json())\n .then((style) => {\n olms(\n 'map',\n Object.assign({}, style, {\n center: [13.783578, 47.609499],\n zoom: 11,\n metadata: Object.assign(style.metadata, {\n 'ol:webfonts':\n 'https://fonts.googleapis.com/css?family={Font+Family}:{fontweight}{fontstyle}',\n }),\n })\n );\n });\n"],"names":["key","document","cookie","replace","window","prompt","fetch","then","response","json","style","Object","assign","center","zoom","metadata"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.css b/dist/examples/openmaptiles-layer.css new file mode 100644 index 00000000..d540e82e --- /dev/null +++ b/dist/examples/openmaptiles-layer.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=openmaptiles-layer.css.map*/ \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.css.map b/dist/examples/openmaptiles-layer.css.map new file mode 100644 index 00000000..ece44d1b --- /dev/null +++ b/dist/examples/openmaptiles-layer.css.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles-layer.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE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EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.html b/dist/examples/openmaptiles-layer.html new file mode 100644 index 00000000..78a6054c --- /dev/null +++ b/dist/examples/openmaptiles-layer.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.js b/dist/examples/openmaptiles-layer.js new file mode 100644 index 00000000..e917a043 --- /dev/null +++ b/dist/examples/openmaptiles-layer.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[507],{8153:(e,s,t)=>{t(9789);var o=t(156),c=t(1202),a=t(9090),p=t(7539);let r=document.cookie.replace(/(?:(?:^|.*;\s*)maptiler_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");r||(r=window.prompt("Enter your MapTiler API access token:"),document.cookie="maptiler_access_token="+r+"; expires=Fri, 31 Dec 9999 23:59:59 GMT");const l="https://api.maptiler.com/maps/basic/style.json?key="+r,n=new o.Z({declutter:!0});(0,p.bg)(n,l),(0,p.h0)(n,l),new c.Z({target:"map",layers:[n],view:new a.ZP({center:[0,0],zoom:2})})}},e=>{e(e.s=8153)}]); +//# sourceMappingURL=openmaptiles-layer.js.map \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.js.map b/dist/examples/openmaptiles-layer.js.map new file mode 100644 index 00000000..a683b180 --- /dev/null +++ b/dist/examples/openmaptiles-layer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles-layer.js","mappings":"oKAOA,IAAIA,EAAMC,SAASC,OAAOC,QACxB,+DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,yCACpBJ,SAASC,OACP,yBAA2BF,EAAM,2CAErC,MAAMM,EAAWC,sDAAoBP,EAE/BQ,EAAQ,IAAI,IAAgB,CAChCC,WAAW,KAEb,QAAWD,EAAOF,IAClB,QAAgBE,EAAOF,GACvB,IAAI,IAAI,CACNI,OAAQ,MACRC,OAAQ,CAACH,GACTI,KAAM,IAAI,KAAK,CACbC,OAAQ,CAAC,EAAG,GACZC,KAAM,K","sources":["webpack://ol-mapbox-style/./examples/openmaptiles-layer.js"],"sourcesContent":["import 'ol/ol.css';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport {Map, View} from 'ol';\nimport {applyBackground, applyStyle} from 'ol-mapbox-style';\n\nconst baseUrl = 'https://api.maptiler.com/maps/basic/style.json';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)maptiler_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your MapTiler API access token:');\n document.cookie =\n 'maptiler_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\nconst styleUrl = baseUrl + '?key=' + key;\n\nconst layer = new VectorTileLayer({\n declutter: true,\n});\napplyStyle(layer, styleUrl);\napplyBackground(layer, styleUrl);\nnew Map({\n target: 'map',\n layers: [layer],\n view: new View({\n center: [0, 0],\n zoom: 2,\n }),\n});\n"],"names":["key","document","cookie","replace","window","prompt","styleUrl","baseUrl","layer","declutter","target","layers","view","center","zoom"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles.css b/dist/examples/openmaptiles.css new file mode 100644 index 00000000..336d1f80 --- /dev/null +++ b/dist/examples/openmaptiles.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=openmaptiles.css.map*/ \ No newline at end of file diff --git a/dist/examples/openmaptiles.css.map b/dist/examples/openmaptiles.css.map new file mode 100644 index 00000000..9d61c71f --- /dev/null +++ b/dist/examples/openmaptiles.css.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,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;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles.html b/dist/examples/openmaptiles.html new file mode 100644 index 00000000..2f06af5d --- /dev/null +++ b/dist/examples/openmaptiles.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/openmaptiles.js b/dist/examples/openmaptiles.js new file mode 100644 index 00000000..4108d038 --- /dev/null +++ b/dist/examples/openmaptiles.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[347],{523:(e,s,o)=>{o(9789);var t=o(7539);let a=document.cookie.replace(/(?:(?:^|.*;\s*)maptiler_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");a||(a=window.prompt("Enter your MapTiler API access token:"),document.cookie="maptiler_access_token="+a+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),(0,t.ZP)("map","https://api.maptiler.com/maps/basic/style.json?key="+a)}},e=>{e(e.s=523)}]); +//# sourceMappingURL=openmaptiles.js.map \ No newline at end of file diff --git a/dist/examples/openmaptiles.js.map b/dist/examples/openmaptiles.js.map new file mode 100644 index 00000000..96fc7f97 --- /dev/null +++ b/dist/examples/openmaptiles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles.js","mappings":"sIAKA,IAAIA,EAAMC,SAASC,OAAOC,QACxB,+DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,yCACpBJ,SAASC,OACP,yBAA2BF,EAAM,4CAGrC,QAAK,MAAOM,sDAAoBN,E","sources":["webpack://ol-mapbox-style/./examples/openmaptiles.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nconst baseUrl = 'https://api.maptiler.com/maps/basic/style.json';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)maptiler_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your MapTiler API access token:');\n document.cookie =\n 'maptiler_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\n\nolms('map', baseUrl + '?key=' + key);\n"],"names":["key","document","cookie","replace","window","prompt","baseUrl"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/sdf-sprites.css b/dist/examples/sdf-sprites.css new file mode 100644 index 00000000..ed148d41 --- /dev/null +++ b/dist/examples/sdf-sprites.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=sdf-sprites.css.map*/ \ No newline at end of file diff --git a/dist/examples/sdf-sprites.css.map b/dist/examples/sdf-sprites.css.map new file mode 100644 index 00000000..f7a294b4 --- /dev/null +++ b/dist/examples/sdf-sprites.css.map @@ -0,0 +1 @@ +{"version":3,"file":"sdf-sprites.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC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;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/sdf-sprites.html b/dist/examples/sdf-sprites.html new file mode 100644 index 00000000..e6884377 --- /dev/null +++ b/dist/examples/sdf-sprites.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/sdf-sprites.js b/dist/examples/sdf-sprites.js new file mode 100644 index 00000000..c2f914a2 --- /dev/null +++ b/dist/examples/sdf-sprites.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[709],{6292:(e,s,t)=>{t(9789);var o=t(7539);let p=document.cookie.replace(/(?:(?:^|.*;\s*)maptiler_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");p||(p=window.prompt("Enter your MapTiler API access token:"),document.cookie="maptiler_access_token="+p+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),(0,o.ZP)("map","https://api.maptiler.com/maps/test-bright/style.json?key="+p)}},e=>{e(e.s=6292)}]); +//# sourceMappingURL=sdf-sprites.js.map \ No newline at end of file diff --git a/dist/examples/sdf-sprites.js.map b/dist/examples/sdf-sprites.js.map new file mode 100644 index 00000000..569b45d0 --- /dev/null +++ b/dist/examples/sdf-sprites.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sdf-sprites.js","mappings":"uIAKA,IAAIA,EAAMC,SAASC,OAAOC,QACxB,+DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,yCACpBJ,SAASC,OACP,yBAA2BF,EAAM,4CAGrC,QAAK,MAAOM,4DAAoBN,E","sources":["webpack://ol-mapbox-style/./examples/sdf-sprites.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nconst baseUrl = 'https://api.maptiler.com/maps/test-bright/style.json';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)maptiler_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your MapTiler API access token:');\n document.cookie =\n 'maptiler_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\n\nolms('map', baseUrl + '?key=' + key);\n"],"names":["key","document","cookie","replace","window","prompt","baseUrl"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/stylefunction.css b/dist/examples/stylefunction.css new file mode 100644 index 00000000..78e1b293 --- /dev/null +++ b/dist/examples/stylefunction.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=stylefunction.css.map*/ \ No newline at end of file diff --git a/dist/examples/stylefunction.css.map b/dist/examples/stylefunction.css.map new file mode 100644 index 00000000..a2db1f55 --- /dev/null +++ b/dist/examples/stylefunction.css.map @@ -0,0 +1 @@ +{"version":3,"file":"stylefunction.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB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Y;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/stylefunction.html b/dist/examples/stylefunction.html new file mode 100644 index 00000000..d609220a --- /dev/null +++ b/dist/examples/stylefunction.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/stylefunction.js b/dist/examples/stylefunction.js new file mode 100644 index 00000000..332a14bc --- /dev/null +++ b/dist/examples/stylefunction.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[890],{7592:(e,t,s)=>{s(9789);var a=s(9239),n=s(1202),o=s(6333),r=s(3107),c=s(9090),l=s(7539);const u=new o.Z({declutter:!0,source:new r.Z({format:new a.Z,url:"data/states.geojson"})}),w=new n.Z({target:"map",view:new c.ZP({center:[-13603186.115192635,6785744.563386],zoom:2})});fetch("data/states.json").then((e=>e.json())).then((e=>{(0,l.uX)(u,e,"states"),-1===w.getLayers().getArray().indexOf(u)&&w.addLayer(u)}))}},e=>{e(e.s=7592)}]); +//# sourceMappingURL=stylefunction.js.map \ No newline at end of file diff --git a/dist/examples/stylefunction.js.map b/dist/examples/stylefunction.js.map new file mode 100644 index 00000000..8975f797 --- /dev/null +++ b/dist/examples/stylefunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stylefunction.js","mappings":"yLASA,MAAMA,EAAQ,IAAI,IAAY,CAC5BC,WAAW,EACXC,OAAQ,IAAI,IAAa,CACvBC,OAAQ,IAAI,IACZC,IAAK,0BAIHC,EAAM,IAAI,IAAI,CAClBC,OAAQ,MACRC,KAAM,IAAI,KAAK,CACbC,OAAQ,EAAE,mBAAoB,gBAC9BC,KAAM,MAIVC,MAAM,oBACHC,MAAMC,GAAMA,EAAEC,SACdF,MAAMG,KACL,QAAcd,EAAOc,EAAS,WACqB,IAA/CT,EAAIU,YAAYC,WAAWC,QAAQjB,IACrCK,EAAIa,SAASlB,EACf,G","sources":["webpack://ol-mapbox-style/./examples/stylefunction.js"],"sourcesContent":["import 'ol/ol.css';\nimport GeoJsonFormat from 'ol/format/GeoJSON.js';\nimport Map from 'ol/Map.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport View from 'ol/View.js';\n\nimport {stylefunction} from 'ol-mapbox-style';\n\nconst layer = new VectorLayer({\n declutter: true,\n source: new VectorSource({\n format: new GeoJsonFormat(),\n url: 'data/states.geojson',\n }),\n});\n\nconst map = new Map({\n target: 'map',\n view: new View({\n center: [-13603186.115192635, 6785744.563386],\n zoom: 2,\n }),\n});\n\nfetch('data/states.json')\n .then((r) => r.json())\n .then((glStyle) => {\n stylefunction(layer, glStyle, 'states');\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n });\n"],"names":["layer","declutter","source","format","url","map","target","view","center","zoom","fetch","then","r","json","glStyle","getLayers","getArray","indexOf","addLayer"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/terrarium-hillshading.css b/dist/examples/terrarium-hillshading.css new file mode 100644 index 00000000..bb89b3ad --- /dev/null +++ b/dist/examples/terrarium-hillshading.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=terrarium-hillshading.css.map*/ \ No newline at end of file diff --git a/dist/examples/terrarium-hillshading.css.map b/dist/examples/terrarium-hillshading.css.map new file mode 100644 index 00000000..50f897ee --- /dev/null +++ b/dist/examples/terrarium-hillshading.css.map @@ -0,0 +1 @@ +{"version":3,"file":"terrarium-hillshading.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;EACV,gBA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ACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/terrarium-hillshading.html b/dist/examples/terrarium-hillshading.html new file mode 100644 index 00000000..29f9842b --- /dev/null +++ b/dist/examples/terrarium-hillshading.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/terrarium-hillshading.js b/dist/examples/terrarium-hillshading.js new file mode 100644 index 00000000..ed48bcdf --- /dev/null +++ b/dist/examples/terrarium-hillshading.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[452],{5505:(e,t,r)=>{r(9789),(0,r(7539).ZP)("map",{version:8,name:"Terrarium",center:[13.783578,47.609499],zoom:11,sources:{osm:{type:"raster",attribution:'© OpenStreetMap contributors.',tileSize:256,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],maxzoom:19},terrarium:{type:"raster-dem",attribution:'Data sources and attribution',tileSize:256,tiles:["https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"],maxzoom:15,encoding:"terrarium"}},layers:[{id:"osm",type:"raster",source:"osm"},{id:"hillshade",type:"hillshade",source:"terrarium",paint:{"hillshade-accent-color":"#D8E8CF","hillshade-exaggeration":{stops:[[6,.4],[14,.35],[18,.25]]},"hillshade-shadow-color":"#6C6665","hillshade-highlight-color":"#B8AAA3"}}]})}},e=>{e(e.s=5505)}]); +//# sourceMappingURL=terrarium-hillshading.js.map \ No newline at end of file diff --git a/dist/examples/terrarium-hillshading.js.map b/dist/examples/terrarium-hillshading.js.map new file mode 100644 index 00000000..3917221c --- /dev/null +++ b/dist/examples/terrarium-hillshading.js.map @@ -0,0 +1 @@ +{"version":3,"file":"terrarium-hillshading.js","mappings":"0HAuDA,E,QAAA,IAAK,MApDS,CACZA,QAAS,EACTC,KAAM,YACNC,OAAQ,CAAC,UAAW,WACpBC,KAAM,GACNC,QAAS,CACPC,IAAK,CACHC,KAAM,SACNC,YACE,2FACFC,SAAU,IACVC,MAAO,CAAC,kDACRC,QAAS,IAEXC,UAAW,CACTL,KAAM,aACNC,YACE,8HACFC,SAAU,IACVC,MAAO,CACL,2EAEFC,QAAS,GACTE,SAAU,cAGdC,OAAQ,CACN,CACEC,GAAI,MACJR,KAAM,SACNS,OAAQ,OAEV,CACED,GAAI,YACJR,KAAM,YACNS,OAAQ,YACRC,MAAO,CACL,yBAA0B,UAC1B,yBAA0B,CACxBC,MAAO,CACL,CAAC,EAAG,IACJ,CAAC,GAAI,KACL,CAAC,GAAI,OAGT,yBAA0B,UAC1B,4BAA6B,c","sources":["webpack://ol-mapbox-style/./examples/terrarium-hillshading.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nconst style = {\n version: 8,\n name: 'Terrarium',\n center: [13.783578, 47.609499],\n zoom: 11,\n sources: {\n osm: {\n type: 'raster',\n attribution:\n '© OpenStreetMap contributors.',\n tileSize: 256,\n tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],\n maxzoom: 19,\n },\n terrarium: {\n type: 'raster-dem',\n attribution:\n 'Data sources and attribution',\n tileSize: 256,\n tiles: [\n 'https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png',\n ],\n maxzoom: 15,\n encoding: 'terrarium',\n },\n },\n layers: [\n {\n id: 'osm',\n type: 'raster',\n source: 'osm',\n },\n {\n id: 'hillshade',\n type: 'hillshade',\n source: 'terrarium',\n paint: {\n 'hillshade-accent-color': '#D8E8CF',\n 'hillshade-exaggeration': {\n stops: [\n [6, 0.4],\n [14, 0.35],\n [18, 0.25],\n ],\n },\n 'hillshade-shadow-color': '#6C6665',\n 'hillshade-highlight-color': '#B8AAA3',\n },\n },\n ],\n};\n\nolms('map', style);\n"],"names":["version","name","center","zoom","sources","osm","type","attribution","tileSize","tiles","maxzoom","terrarium","encoding","layers","id","source","paint","stops"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.css b/dist/examples/tilejson-vectortile.css new file mode 100644 index 00000000..ac1b59b7 --- /dev/null +++ b/dist/examples/tilejson-vectortile.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=tilejson-vectortile.css.map*/ \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.css.map b/dist/examples/tilejson-vectortile.css.map new file mode 100644 index 00000000..8e61ad97 --- /dev/null +++ b/dist/examples/tilejson-vectortile.css.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson-vectortile.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,8BAA8B;EAC9B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;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aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.html b/dist/examples/tilejson-vectortile.html new file mode 100644 index 00000000..11b84b2d --- /dev/null +++ b/dist/examples/tilejson-vectortile.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.js b/dist/examples/tilejson-vectortile.js new file mode 100644 index 00000000..0e4475f0 --- /dev/null +++ b/dist/examples/tilejson-vectortile.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[366],{8857:(s,e,o)=>{o(9789),(0,o(7539).nn)("map"," https://demo.tegola.io/styles/hot-osm.json")}},s=>{s(s.s=8857)}]); +//# sourceMappingURL=tilejson-vectortile.js.map \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.js.map b/dist/examples/tilejson-vectortile.js.map new file mode 100644 index 00000000..5b8b55fd --- /dev/null +++ b/dist/examples/tilejson-vectortile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson-vectortile.js","mappings":"0HAGA,E,QAAA,IAAM,MAAO,8C","sources":["webpack://ol-mapbox-style/./examples/tilejson-vectortile.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', ' https://demo.tegola.io/styles/hot-osm.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson.css b/dist/examples/tilejson.css new file mode 100644 index 00000000..5f6b527d --- /dev/null +++ b/dist/examples/tilejson.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=tilejson.css.map*/ \ No newline at end of file diff --git a/dist/examples/tilejson.css.map b/dist/examples/tilejson.css.map new file mode 100644 index 00000000..f348fb9b --- /dev/null +++ b/dist/examples/tilejson.css.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EA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f;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson.html b/dist/examples/tilejson.html new file mode 100644 index 00000000..ab77fa20 --- /dev/null +++ b/dist/examples/tilejson.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/tilejson.js b/dist/examples/tilejson.js new file mode 100644 index 00000000..94a4745f --- /dev/null +++ b/dist/examples/tilejson.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[177],{6679:(s,e,a)=>{a(9789),(0,a(7539).nn)("map","data/tilejson.json")}},s=>{s(s.s=6679)}]); +//# sourceMappingURL=tilejson.js.map \ No newline at end of file diff --git a/dist/examples/tilejson.js.map b/dist/examples/tilejson.js.map new file mode 100644 index 00000000..997219c9 --- /dev/null +++ b/dist/examples/tilejson.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson.js","mappings":"0HAGA,E,QAAA,IAAM,MAAO,qB","sources":["webpack://ol-mapbox-style/./examples/tilejson.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/tilejson.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/wms.css b/dist/examples/wms.css new file mode 100644 index 00000000..f2bfd3bd --- /dev/null +++ b/dist/examples/wms.css @@ -0,0 +1,353 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; + overflow: hidden; +} + +.ol-viewport { + touch-action: none; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.ol-grabbing { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +.ol-grab { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.ol-control { + position: absolute; + background-color: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.ol-zoom { + top: .5em; + left: .5em; +} + +.ol-rotate { + top: .5em; + right: .5em; + transition: opacity .25s linear, visibility 0s linear; +} + +.ol-rotate.ol-hidden { + opacity: 0; + visibility: hidden; + transition: opacity .25s linear, visibility 0s linear .25s; +} + +.ol-zoom-extent { + top: 4.643em; + left: .5em; +} + +.ol-full-screen { + right: .5em; + top: .5em; +} + +.ol-control button { + display: block; + margin: 1px; + padding: 0; + color: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + border: none; + border-radius: 2px; +} + +.ol-control button::-moz-focus-inner { + border: none; + padding: 0; +} + +.ol-zoom-extent button { + line-height: 1.4em; +} + +.ol-compass { + display: block; + font-weight: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.ol-zoom .ol-zoom-in { + border-radius: 2px 2px 0 0; +} + +.ol-zoom .ol-zoom-out { + border-radius: 0 0 2px 2px; +} + +.ol-attribution { + text-align: right; + bottom: .5em; + right: .5em; + max-width: calc(100% - 1.3em); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.ol-attribution li { + display: inline; + list-style: none; +} + +.ol-attribution li:not(:last-child):after { + content: " "; +} + +.ol-attribution img { + max-height: 2em; + max-width: inherit; + vertical-align: middle; +} + +.ol-attribution button { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.ol-attribution.ol-uncollapsible { + bottom: 0; + right: 0; + border-radius: 4px 0 0; +} + +.ol-attribution.ol-uncollapsible img { + margin-top: -.2em; + max-height: 1.6em; +} + +.ol-attribution.ol-uncollapsible button { + display: none; +} + +.ol-zoomslider { + top: 4.5em; + left: .5em; + height: 200px; +} + +.ol-zoomslider button { + position: relative; + height: 10px; +} + +.ol-touch .ol-zoomslider { + top: 5.5em; +} + +.ol-overviewmap { + left: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=wms.css.map*/ \ No newline at end of file diff --git a/dist/examples/wms.css.map b/dist/examples/wms.css.map new file mode 100644 index 00000000..5884b79f --- /dev/null +++ b/dist/examples/wms.css.map @@ -0,0 +1 @@ +{"version":3,"file":"wms.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;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eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: none;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\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: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\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\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\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/wms.html b/dist/examples/wms.html new file mode 100644 index 00000000..55a981c5 --- /dev/null +++ b/dist/examples/wms.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/wms.js b/dist/examples/wms.js new file mode 100644 index 00000000..f603dfff --- /dev/null +++ b/dist/examples/wms.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[840],{11:(s,a,e)=>{e(9789),(0,e(7539).ZP)("map","data/wms.json")}},s=>{s(s.s=11)}]); +//# sourceMappingURL=wms.js.map \ No newline at end of file diff --git a/dist/examples/wms.js.map b/dist/examples/wms.js.map new file mode 100644 index 00000000..79dfd625 --- /dev/null +++ b/dist/examples/wms.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wms.js","mappings":"wHAGA,E,QAAA,IAAK,MAAO,gB","sources":["webpack://ol-mapbox-style/./examples/wms.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nolms('map', 'data/wms.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 00000000..0f6652bc --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +export { default as MapboxVectorLayer } from "./MapboxVectorLayer.js"; +export { stylefunction, recordStyleLayer, renderTransparent, getStyleForLayer } from "./stylefunction.js"; +export { apply as default, apply, applyBackground, applyStyle, getLayer, getLayers, getSource, getMapboxLayer, updateMapboxLayer, addMapboxLayer, removeMapboxLayer, getFeatureState, setFeatureState } from "./apply.js"; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 00000000..9624b203 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,8716 @@ +import Circle from 'ol/style/Circle.js'; +import Fill from 'ol/style/Fill.js'; +import Icon from 'ol/style/Icon.js'; +import RenderFeature from 'ol/render/Feature.js'; +import Stroke from 'ol/style/Stroke.js'; +import Style from 'ol/style/Style.js'; +import Text from 'ol/style/Text.js'; +import { registerFont, checkedFonts } from 'ol/render/canvas.js'; +import TileState from 'ol/TileState.js'; +import { VectorTile } from 'ol'; +import { expandUrl } from 'ol/tileurlfunction.js'; +import { getUid } from 'ol/util.js'; +import GeoJSON from 'ol/format/GeoJSON.js'; +import ImageLayer from 'ol/layer/Image.js'; +import Layer from 'ol/layer/Layer.js'; +import LayerGroup from 'ol/layer/Group.js'; +import MVT from 'ol/format/MVT.js'; +import Map from 'ol/Map.js'; +import Raster from 'ol/source/Raster.js'; +import Source from 'ol/source/Source.js'; +import TileGrid from 'ol/tilegrid/TileGrid.js'; +import TileJSON from 'ol/source/TileJSON.js'; +import TileLayer from 'ol/layer/Tile.js'; +import VectorLayer from 'ol/layer/Vector.js'; +import VectorSource from 'ol/source/Vector.js'; +import VectorTileLayer from 'ol/layer/VectorTile.js'; +import VectorTileSource, { defaultLoadFunction } from 'ol/source/VectorTile.js'; +import View from 'ol/View.js'; +import { get as get$1, METERS_PER_UNIT, fromLonLat, equivalent, getUserProjection } from 'ol/proj.js'; +import { bbox } from 'ol/loadingstrategy.js'; +import { createXYZ } from 'ol/tilegrid.js'; +import { getTopLeft } from 'ol/extent.js'; +import BaseEvent from 'ol/events/Event.js'; +import EventType from 'ol/events/EventType.js'; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +var csscolorparser = {}; + +var parseCSSColor_1; +// (c) Dean McNamee , 2012. +// +// https://github.com/deanm/css-color-parser-js +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// http://www.w3.org/TR/css3-color/ +var kCSSColorTable = { + 'transparent': [ + 0, + 0, + 0, + 0 + ], + 'aliceblue': [ + 240, + 248, + 255, + 1 + ], + 'antiquewhite': [ + 250, + 235, + 215, + 1 + ], + 'aqua': [ + 0, + 255, + 255, + 1 + ], + 'aquamarine': [ + 127, + 255, + 212, + 1 + ], + 'azure': [ + 240, + 255, + 255, + 1 + ], + 'beige': [ + 245, + 245, + 220, + 1 + ], + 'bisque': [ + 255, + 228, + 196, + 1 + ], + 'black': [ + 0, + 0, + 0, + 1 + ], + 'blanchedalmond': [ + 255, + 235, + 205, + 1 + ], + 'blue': [ + 0, + 0, + 255, + 1 + ], + 'blueviolet': [ + 138, + 43, + 226, + 1 + ], + 'brown': [ + 165, + 42, + 42, + 1 + ], + 'burlywood': [ + 222, + 184, + 135, + 1 + ], + 'cadetblue': [ + 95, + 158, + 160, + 1 + ], + 'chartreuse': [ + 127, + 255, + 0, + 1 + ], + 'chocolate': [ + 210, + 105, + 30, + 1 + ], + 'coral': [ + 255, + 127, + 80, + 1 + ], + 'cornflowerblue': [ + 100, + 149, + 237, + 1 + ], + 'cornsilk': [ + 255, + 248, + 220, + 1 + ], + 'crimson': [ + 220, + 20, + 60, + 1 + ], + 'cyan': [ + 0, + 255, + 255, + 1 + ], + 'darkblue': [ + 0, + 0, + 139, + 1 + ], + 'darkcyan': [ + 0, + 139, + 139, + 1 + ], + 'darkgoldenrod': [ + 184, + 134, + 11, + 1 + ], + 'darkgray': [ + 169, + 169, + 169, + 1 + ], + 'darkgreen': [ + 0, + 100, + 0, + 1 + ], + 'darkgrey': [ + 169, + 169, + 169, + 1 + ], + 'darkkhaki': [ + 189, + 183, + 107, + 1 + ], + 'darkmagenta': [ + 139, + 0, + 139, + 1 + ], + 'darkolivegreen': [ + 85, + 107, + 47, + 1 + ], + 'darkorange': [ + 255, + 140, + 0, + 1 + ], + 'darkorchid': [ + 153, + 50, + 204, + 1 + ], + 'darkred': [ + 139, + 0, + 0, + 1 + ], + 'darksalmon': [ + 233, + 150, + 122, + 1 + ], + 'darkseagreen': [ + 143, + 188, + 143, + 1 + ], + 'darkslateblue': [ + 72, + 61, + 139, + 1 + ], + 'darkslategray': [ + 47, + 79, + 79, + 1 + ], + 'darkslategrey': [ + 47, + 79, + 79, + 1 + ], + 'darkturquoise': [ + 0, + 206, + 209, + 1 + ], + 'darkviolet': [ + 148, + 0, + 211, + 1 + ], + 'deeppink': [ + 255, + 20, + 147, + 1 + ], + 'deepskyblue': [ + 0, + 191, + 255, + 1 + ], + 'dimgray': [ + 105, + 105, + 105, + 1 + ], + 'dimgrey': [ + 105, + 105, + 105, + 1 + ], + 'dodgerblue': [ + 30, + 144, + 255, + 1 + ], + 'firebrick': [ + 178, + 34, + 34, + 1 + ], + 'floralwhite': [ + 255, + 250, + 240, + 1 + ], + 'forestgreen': [ + 34, + 139, + 34, + 1 + ], + 'fuchsia': [ + 255, + 0, + 255, + 1 + ], + 'gainsboro': [ + 220, + 220, + 220, + 1 + ], + 'ghostwhite': [ + 248, + 248, + 255, + 1 + ], + 'gold': [ + 255, + 215, + 0, + 1 + ], + 'goldenrod': [ + 218, + 165, + 32, + 1 + ], + 'gray': [ + 128, + 128, + 128, + 1 + ], + 'green': [ + 0, + 128, + 0, + 1 + ], + 'greenyellow': [ + 173, + 255, + 47, + 1 + ], + 'grey': [ + 128, + 128, + 128, + 1 + ], + 'honeydew': [ + 240, + 255, + 240, + 1 + ], + 'hotpink': [ + 255, + 105, + 180, + 1 + ], + 'indianred': [ + 205, + 92, + 92, + 1 + ], + 'indigo': [ + 75, + 0, + 130, + 1 + ], + 'ivory': [ + 255, + 255, + 240, + 1 + ], + 'khaki': [ + 240, + 230, + 140, + 1 + ], + 'lavender': [ + 230, + 230, + 250, + 1 + ], + 'lavenderblush': [ + 255, + 240, + 245, + 1 + ], + 'lawngreen': [ + 124, + 252, + 0, + 1 + ], + 'lemonchiffon': [ + 255, + 250, + 205, + 1 + ], + 'lightblue': [ + 173, + 216, + 230, + 1 + ], + 'lightcoral': [ + 240, + 128, + 128, + 1 + ], + 'lightcyan': [ + 224, + 255, + 255, + 1 + ], + 'lightgoldenrodyellow': [ + 250, + 250, + 210, + 1 + ], + 'lightgray': [ + 211, + 211, + 211, + 1 + ], + 'lightgreen': [ + 144, + 238, + 144, + 1 + ], + 'lightgrey': [ + 211, + 211, + 211, + 1 + ], + 'lightpink': [ + 255, + 182, + 193, + 1 + ], + 'lightsalmon': [ + 255, + 160, + 122, + 1 + ], + 'lightseagreen': [ + 32, + 178, + 170, + 1 + ], + 'lightskyblue': [ + 135, + 206, + 250, + 1 + ], + 'lightslategray': [ + 119, + 136, + 153, + 1 + ], + 'lightslategrey': [ + 119, + 136, + 153, + 1 + ], + 'lightsteelblue': [ + 176, + 196, + 222, + 1 + ], + 'lightyellow': [ + 255, + 255, + 224, + 1 + ], + 'lime': [ + 0, + 255, + 0, + 1 + ], + 'limegreen': [ + 50, + 205, + 50, + 1 + ], + 'linen': [ + 250, + 240, + 230, + 1 + ], + 'magenta': [ + 255, + 0, + 255, + 1 + ], + 'maroon': [ + 128, + 0, + 0, + 1 + ], + 'mediumaquamarine': [ + 102, + 205, + 170, + 1 + ], + 'mediumblue': [ + 0, + 0, + 205, + 1 + ], + 'mediumorchid': [ + 186, + 85, + 211, + 1 + ], + 'mediumpurple': [ + 147, + 112, + 219, + 1 + ], + 'mediumseagreen': [ + 60, + 179, + 113, + 1 + ], + 'mediumslateblue': [ + 123, + 104, + 238, + 1 + ], + 'mediumspringgreen': [ + 0, + 250, + 154, + 1 + ], + 'mediumturquoise': [ + 72, + 209, + 204, + 1 + ], + 'mediumvioletred': [ + 199, + 21, + 133, + 1 + ], + 'midnightblue': [ + 25, + 25, + 112, + 1 + ], + 'mintcream': [ + 245, + 255, + 250, + 1 + ], + 'mistyrose': [ + 255, + 228, + 225, + 1 + ], + 'moccasin': [ + 255, + 228, + 181, + 1 + ], + 'navajowhite': [ + 255, + 222, + 173, + 1 + ], + 'navy': [ + 0, + 0, + 128, + 1 + ], + 'oldlace': [ + 253, + 245, + 230, + 1 + ], + 'olive': [ + 128, + 128, + 0, + 1 + ], + 'olivedrab': [ + 107, + 142, + 35, + 1 + ], + 'orange': [ + 255, + 165, + 0, + 1 + ], + 'orangered': [ + 255, + 69, + 0, + 1 + ], + 'orchid': [ + 218, + 112, + 214, + 1 + ], + 'palegoldenrod': [ + 238, + 232, + 170, + 1 + ], + 'palegreen': [ + 152, + 251, + 152, + 1 + ], + 'paleturquoise': [ + 175, + 238, + 238, + 1 + ], + 'palevioletred': [ + 219, + 112, + 147, + 1 + ], + 'papayawhip': [ + 255, + 239, + 213, + 1 + ], + 'peachpuff': [ + 255, + 218, + 185, + 1 + ], + 'peru': [ + 205, + 133, + 63, + 1 + ], + 'pink': [ + 255, + 192, + 203, + 1 + ], + 'plum': [ + 221, + 160, + 221, + 1 + ], + 'powderblue': [ + 176, + 224, + 230, + 1 + ], + 'purple': [ + 128, + 0, + 128, + 1 + ], + 'rebeccapurple': [ + 102, + 51, + 153, + 1 + ], + 'red': [ + 255, + 0, + 0, + 1 + ], + 'rosybrown': [ + 188, + 143, + 143, + 1 + ], + 'royalblue': [ + 65, + 105, + 225, + 1 + ], + 'saddlebrown': [ + 139, + 69, + 19, + 1 + ], + 'salmon': [ + 250, + 128, + 114, + 1 + ], + 'sandybrown': [ + 244, + 164, + 96, + 1 + ], + 'seagreen': [ + 46, + 139, + 87, + 1 + ], + 'seashell': [ + 255, + 245, + 238, + 1 + ], + 'sienna': [ + 160, + 82, + 45, + 1 + ], + 'silver': [ + 192, + 192, + 192, + 1 + ], + 'skyblue': [ + 135, + 206, + 235, + 1 + ], + 'slateblue': [ + 106, + 90, + 205, + 1 + ], + 'slategray': [ + 112, + 128, + 144, + 1 + ], + 'slategrey': [ + 112, + 128, + 144, + 1 + ], + 'snow': [ + 255, + 250, + 250, + 1 + ], + 'springgreen': [ + 0, + 255, + 127, + 1 + ], + 'steelblue': [ + 70, + 130, + 180, + 1 + ], + 'tan': [ + 210, + 180, + 140, + 1 + ], + 'teal': [ + 0, + 128, + 128, + 1 + ], + 'thistle': [ + 216, + 191, + 216, + 1 + ], + 'tomato': [ + 255, + 99, + 71, + 1 + ], + 'turquoise': [ + 64, + 224, + 208, + 1 + ], + 'violet': [ + 238, + 130, + 238, + 1 + ], + 'wheat': [ + 245, + 222, + 179, + 1 + ], + 'white': [ + 255, + 255, + 255, + 1 + ], + 'whitesmoke': [ + 245, + 245, + 245, + 1 + ], + 'yellow': [ + 255, + 255, + 0, + 1 + ], + 'yellowgreen': [ + 154, + 205, + 50, + 1 + ] +}; +function clamp_css_byte(i) { + // Clamp to integer 0 .. 255. + i = Math.round(i); + // Seems to be what Chrome does (vs truncation). + return i < 0 ? 0 : i > 255 ? 255 : i; +} +function clamp_css_float(f) { + // Clamp to float 0.0 .. 1.0. + return f < 0 ? 0 : f > 1 ? 1 : f; +} +function parse_css_int(str) { + // int or percentage. + if (str[str.length - 1] === '%') + return clamp_css_byte(parseFloat(str) / 100 * 255); + return clamp_css_byte(parseInt(str)); +} +function parse_css_float(str) { + // float or percentage. + if (str[str.length - 1] === '%') + return clamp_css_float(parseFloat(str) / 100); + return clamp_css_float(parseFloat(str)); +} +function css_hue_to_rgb(m1, m2, h) { + if (h < 0) + h += 1; + else if (h > 1) + h -= 1; + if (h * 6 < 1) + return m1 + (m2 - m1) * h * 6; + if (h * 2 < 1) + return m2; + if (h * 3 < 2) + return m1 + (m2 - m1) * (2 / 3 - h) * 6; + return m1; +} +function parseCSSColor(css_str) { + // Remove all whitespace, not compliant, but should just be more accepting. + var str = css_str.replace(/ /g, '').toLowerCase(); + // Color keywords (and transparent) lookup. + if (str in kCSSColorTable) + return kCSSColorTable[str].slice(); + // dup. + // #abc and #abc123 syntax. + if (str[0] === '#') { + if (str.length === 4) { + var iv = parseInt(str.substr(1), 16); + // TODO(deanm): Stricter parsing. + if (!(iv >= 0 && iv <= 4095)) + return null; + // Covers NaN. + return [ + (iv & 3840) >> 4 | (iv & 3840) >> 8, + iv & 240 | (iv & 240) >> 4, + iv & 15 | (iv & 15) << 4, + 1 + ]; + } else if (str.length === 7) { + var iv = parseInt(str.substr(1), 16); + // TODO(deanm): Stricter parsing. + if (!(iv >= 0 && iv <= 16777215)) + return null; + // Covers NaN. + return [ + (iv & 16711680) >> 16, + (iv & 65280) >> 8, + iv & 255, + 1 + ]; + } + return null; + } + var op = str.indexOf('('), ep = str.indexOf(')'); + if (op !== -1 && ep + 1 === str.length) { + var fname = str.substr(0, op); + var params = str.substr(op + 1, ep - (op + 1)).split(','); + var alpha = 1; + // To allow case fallthrough. + switch (fname) { + case 'rgba': + if (params.length !== 4) + return null; + alpha = parse_css_float(params.pop()); + // Fall through. + case 'rgb': + if (params.length !== 3) + return null; + return [ + parse_css_int(params[0]), + parse_css_int(params[1]), + parse_css_int(params[2]), + alpha + ]; + case 'hsla': + if (params.length !== 4) + return null; + alpha = parse_css_float(params.pop()); + // Fall through. + case 'hsl': + if (params.length !== 3) + return null; + var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360; + // 0 .. 1 + // NOTE(deanm): According to the CSS spec s/l should only be + // percentages, but we don't bother and let float or percentage. + var s = parse_css_float(params[1]); + var l = parse_css_float(params[2]); + var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; + var m1 = l * 2 - m2; + 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 + ]; + default: + return null; + } + } + return null; +} +try { + parseCSSColor_1 = csscolorparser.parseCSSColor = parseCSSColor; +} catch (e) { +} + +// +/** + * An RGBA color value. Create instances from color strings using the static + * method `Color.parse`. The constructor accepts RGB channel values in the range + * `[0, 1]`, premultiplied by A. + * + * @param {number} r The red channel. + * @param {number} g The green channel. + * @param {number} b The blue channel. + * @param {number} a The alpha channel. + * @private + */ +class Color { + constructor(r, g, b, a = 1) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + /** + * Parses valid CSS color strings and returns a `Color` instance. + * @returns A `Color` instance, or `undefined` if the input is not a valid color string. + */ + static parse(input) { + if (!input) { + return undefined; + } + if (input instanceof Color) { + return input; + } + if (typeof input !== 'string') { + return undefined; + } + const rgba = parseCSSColor_1(input); + if (!rgba) { + return undefined; + } + return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]); + } + /** + * Returns an RGBA string representing the color value. + * + * @returns An RGBA string. + * @example + * var purple = new Color.parse('purple'); + * purple.toString; // = "rgba(128,0,128,1)" + * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)'); + * translucentGreen.toString(); // = "rgba(26,207,26,0.73)" + */ + toString() { + const [r, g, b, a] = this.toArray(); + return `rgba(${ Math.round(r) },${ Math.round(g) },${ Math.round(b) },${ a })`; + } + /** + * Returns an RGBA array of values representing the color, unpremultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 255]. + */ + toArray() { + const {r, g, b, a} = this; + return a === 0 ? [ + 0, + 0, + 0, + 0 + ] : [ + r * 255 / a, + g * 255 / a, + b * 255 / a, + a + ]; + } + /** + * Returns a RGBA array of float values representing the color, unpremultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 1]. + */ + toArray01() { + const {r, g, b, a} = this; + return a === 0 ? [ + 0, + 0, + 0, + 0 + ] : [ + r / a, + g / a, + b / a, + a + ]; + } + /** + * Returns an RGBA array of values representing the color, premultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 1]. + */ + toArray01PremultipliedAlpha() { + const {r, g, b, a} = this; + return [ + r, + g, + b, + a + ]; + } +} +Color.black = new Color(0, 0, 0, 1); +Color.white = new Color(1, 1, 1, 1); +Color.transparent = new Color(0, 0, 0, 0); +Color.red = new Color(1, 0, 0, 1); +Color.blue = new Color(0, 0, 1, 1); +var Color$1 = Color; + +function convertLiteral(value) { + return typeof value === 'object' ? [ + 'literal', + value + ] : value; +} +function convertFunction(parameters, propertySpec) { + let stops = parameters.stops; + if (!stops) { + // identity function + return convertIdentityFunction(parameters, propertySpec); + } + const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object'; + const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined; + const zoomDependent = zoomAndFeatureDependent || !featureDependent; + stops = stops.map(stop => { + if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') { + return [ + stop[0], + convertTokenString(stop[1]) + ]; + } + return [ + stop[0], + convertLiteral(stop[1]) + ]; + }); + if (zoomAndFeatureDependent) { + return convertZoomAndPropertyFunction(parameters, propertySpec, stops); + } else if (zoomDependent) { + return convertZoomFunction(parameters, propertySpec, stops); + } else { + return convertPropertyFunction(parameters, propertySpec, stops); + } +} +function convertIdentityFunction(parameters, propertySpec) { + const get = [ + 'get', + parameters.property + ]; + if (parameters.default === undefined) { + // By default, expressions for string-valued properties get coerced. To preserve + // legacy function semantics, insert an explicit assertion instead. + return propertySpec.type === 'string' ? [ + 'string', + get + ] : get; + } else if (propertySpec.type === 'enum') { + return [ + 'match', + get, + Object.keys(propertySpec.values), + get, + parameters.default + ]; + } else { + const expression = [ + propertySpec.type === 'color' ? 'to-color' : propertySpec.type, + get, + convertLiteral(parameters.default) + ]; + if (propertySpec.type === 'array') { + expression.splice(1, 0, propertySpec.value, propertySpec.length || null); + } + return expression; + } +} +function getInterpolateOperator(parameters) { + switch (parameters.colorSpace) { + case 'hcl': + return 'interpolate-hcl'; + case 'lab': + return 'interpolate-lab'; + default: + return 'interpolate'; + } +} +function convertZoomAndPropertyFunction(parameters, propertySpec, stops) { + const featureFunctionParameters = {}; + const featureFunctionStops = {}; + const zoomStops = []; + for (let s = 0; s < stops.length; s++) { + const stop = stops[s]; + const zoom = stop[0].zoom; + if (featureFunctionParameters[zoom] === undefined) { + featureFunctionParameters[zoom] = { + zoom, + type: parameters.type, + property: parameters.property, + default: parameters.default + }; + featureFunctionStops[zoom] = []; + zoomStops.push(zoom); + } + featureFunctionStops[zoom].push([ + stop[0].value, + stop[1] + ]); + } + // the interpolation type for the zoom dimension of a zoom-and-property + // function is determined directly from the style property specification + // for which it's being used: linear for interpolatable properties, step + // otherwise. + const functionType = getFunctionType({}, propertySpec); + if (functionType === 'exponential') { + const expression = [ + getInterpolateOperator(parameters), + ['linear'], + ['zoom'] + ]; + for (const z of zoomStops) { + const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]); + appendStopPair(expression, z, output, false); + } + return expression; + } else { + const expression = [ + 'step', + ['zoom'] + ]; + for (const z of zoomStops) { + const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]); + appendStopPair(expression, z, output, true); + } + fixupDegenerateStepCurve(expression); + return expression; + } +} +function coalesce(a, b) { + if (a !== undefined) + return a; + if (b !== undefined) + return b; +} +function getFallback(parameters, propertySpec) { + const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default)); + /* + * Some fields with type: resolvedImage have an undefined default. + * Because undefined is an invalid value for resolvedImage, set fallback to + * an empty string instead of undefined to ensure output + * passes validation. + */ + if (defaultValue === undefined && propertySpec.type === 'resolvedImage') { + return ''; + } + return defaultValue; +} +function convertPropertyFunction(parameters, propertySpec, stops) { + const type = getFunctionType(parameters, propertySpec); + const get = [ + 'get', + parameters.property + ]; + if (type === 'categorical' && typeof stops[0][0] === 'boolean') { + const expression = ['case']; + for (const stop of stops) { + expression.push([ + '==', + get, + stop[0] + ], stop[1]); + } + expression.push(getFallback(parameters, propertySpec)); + return expression; + } else if (type === 'categorical') { + const expression = [ + 'match', + get + ]; + for (const stop of stops) { + appendStopPair(expression, stop[0], stop[1], false); + } + expression.push(getFallback(parameters, propertySpec)); + return expression; + } else if (type === 'interval') { + const expression = [ + 'step', + [ + 'number', + get + ] + ]; + for (const stop of stops) { + appendStopPair(expression, stop[0], stop[1], true); + } + fixupDegenerateStepCurve(expression); + return parameters.default === undefined ? expression : [ + 'case', + [ + '==', + [ + 'typeof', + get + ], + 'number' + ], + expression, + convertLiteral(parameters.default) + ]; + } else if (type === 'exponential') { + const base = parameters.base !== undefined ? parameters.base : 1; + const expression = [ + getInterpolateOperator(parameters), + base === 1 ? ['linear'] : [ + 'exponential', + base + ], + [ + 'number', + get + ] + ]; + for (const stop of stops) { + appendStopPair(expression, stop[0], stop[1], false); + } + return parameters.default === undefined ? expression : [ + 'case', + [ + '==', + [ + 'typeof', + get + ], + 'number' + ], + expression, + convertLiteral(parameters.default) + ]; + } else { + throw new Error(`Unknown property function type ${ type }`); + } +} +function convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) { + const type = getFunctionType(parameters, propertySpec); + let expression; + let isStep = false; + if (type === 'interval') { + expression = [ + 'step', + input + ]; + isStep = true; + } else if (type === 'exponential') { + const base = parameters.base !== undefined ? parameters.base : 1; + expression = [ + getInterpolateOperator(parameters), + base === 1 ? ['linear'] : [ + 'exponential', + base + ], + input + ]; + } else { + throw new Error(`Unknown zoom function type "${ type }"`); + } + for (const stop of stops) { + appendStopPair(expression, stop[0], stop[1], isStep); + } + fixupDegenerateStepCurve(expression); + return expression; +} +function fixupDegenerateStepCurve(expression) { + // degenerate step curve (i.e. a constant function): add a noop stop + if (expression[0] === 'step' && expression.length === 3) { + expression.push(0); + expression.push(expression[3]); + } +} +function appendStopPair(curve, input, output, isStep) { + // Skip duplicate stop values. They were not validated for functions, but they are for expressions. + // https://github.com/mapbox/mapbox-gl-js/issues/4107 + if (curve.length > 3 && input === curve[curve.length - 2]) { + return; + } + // step curves don't get the first input value, as it is redundant. + if (!(isStep && curve.length === 2)) { + curve.push(input); + } + curve.push(output); +} +function getFunctionType(parameters, propertySpec) { + if (parameters.type) { + return parameters.type; + } else { + return propertySpec.expression.interpolated ? 'exponential' : 'interval'; + } +} +// "String with {name} token" => ["concat", "String with ", ["get", "name"], " token"] +function convertTokenString(s) { + const result = ['concat']; + const re = /{([^{}]+)}/g; + let pos = 0; + for (let match = re.exec(s); match !== null; match = re.exec(s)) { + const literal = s.slice(pos, re.lastIndex - match[0].length); + pos = re.lastIndex; + if (literal.length > 0) + result.push(literal); + result.push([ + 'get', + match[1] + ]); + } + if (result.length === 1) { + return s; + } + if (pos < s.length) { + result.push(s.slice(pos)); + } else if (result.length === 2) { + return [ + 'to-string', + result[1] + ]; + } + return result; +} + +// +class ParsingError extends Error { + constructor(key, message) { + super(message); + this.message = message; + this.key = key; + } +} +var ParsingError$1 = ParsingError; + +// +/** + * Tracks `let` bindings during expression parsing. + * @private + */ +class Scope { + constructor(parent, bindings = []) { + this.parent = parent; + this.bindings = {}; + for (const [name, expression] of bindings) { + this.bindings[name] = expression; + } + } + concat(bindings) { + return new Scope(this, bindings); + } + get(name) { + if (this.bindings[name]) { + return this.bindings[name]; + } + if (this.parent) { + return this.parent.get(name); + } + throw new Error(`${ name } not found in scope.`); + } + has(name) { + if (this.bindings[name]) + return true; + return this.parent ? this.parent.has(name) : false; + } +} +var Scope$1 = Scope; + +// +const NullType = { kind: 'null' }; +const NumberType = { kind: 'number' }; +const StringType = { kind: 'string' }; +const BooleanType = { kind: 'boolean' }; +const ColorType = { kind: 'color' }; +const ObjectType = { kind: 'object' }; +const ValueType = { kind: 'value' }; +const ErrorType = { kind: 'error' }; +const CollatorType = { kind: 'collator' }; +const FormattedType = { kind: 'formatted' }; +const ResolvedImageType = { kind: 'resolvedImage' }; +function array$1(itemType, N) { + return { + kind: 'array', + itemType, + N + }; +} +function toString$1(type) { + if (type.kind === 'array') { + const itemType = toString$1(type.itemType); + return typeof type.N === 'number' ? `array<${ itemType }, ${ type.N }>` : type.itemType.kind === 'value' ? 'array' : `array<${ itemType }>`; + } else { + return type.kind; + } +} +const valueMemberTypes = [ + NullType, + NumberType, + StringType, + BooleanType, + ColorType, + FormattedType, + ObjectType, + array$1(ValueType), + ResolvedImageType +]; +/** + * Returns null if `t` is a subtype of `expected`; otherwise returns an + * error message. + * @private + */ +function checkSubtype(expected, t) { + if (t.kind === 'error') { + // Error is a subtype of every type + return null; + } else if (expected.kind === 'array') { + if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.N)) { + return null; + } + } else if (expected.kind === t.kind) { + return null; + } else if (expected.kind === 'value') { + for (const memberType of valueMemberTypes) { + if (!checkSubtype(memberType, t)) { + return null; + } + } + } + return `Expected ${ toString$1(expected) } but found ${ toString$1(t) } instead.`; +} +function isValidType(provided, allowedTypes) { + return allowedTypes.some(t => t.kind === provided.kind); +} +function isValidNativeType(provided, allowedTypes) { + return allowedTypes.some(t => { + if (t === 'null') { + return provided === null; + } else if (t === 'array') { + return Array.isArray(provided); + } else if (t === 'object') { + return provided && !Array.isArray(provided) && typeof provided === 'object'; + } else { + return t === typeof provided; + } + }); +} + +// +// Flow type declarations for Intl cribbed from +// https://github.com/facebook/flow/issues/1270 +class Collator { + constructor(caseSensitive, diacriticSensitive, locale) { + if (caseSensitive) + this.sensitivity = diacriticSensitive ? 'variant' : 'case'; + else + this.sensitivity = diacriticSensitive ? 'accent' : 'base'; + this.locale = locale; + this.collator = new Intl.Collator(this.locale ? this.locale : [], { + sensitivity: this.sensitivity, + usage: 'search' + }); + } + compare(lhs, rhs) { + return this.collator.compare(lhs, rhs); + } + resolvedLocale() { + // We create a Collator without "usage: search" because we don't want + // the search options encoded in our result (e.g. "en-u-co-search") + return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale; + } +} + +// +class FormattedSection { + constructor(text, image, scale, fontStack, textColor) { + // combine characters so that diacritic marks are not separate code points + this.text = text.normalize ? text.normalize() : text; + this.image = image; + this.scale = scale; + this.fontStack = fontStack; + this.textColor = textColor; + } +} +class Formatted { + constructor(sections) { + this.sections = sections; + } + static fromString(unformatted) { + return new Formatted([new FormattedSection(unformatted, null, null, null, null)]); + } + isEmpty() { + if (this.sections.length === 0) + return true; + return !this.sections.some(section => section.text.length !== 0 || section.image && section.image.name.length !== 0); + } + static factory(text) { + if (text instanceof Formatted) { + return text; + } else { + return Formatted.fromString(text); + } + } + toString() { + if (this.sections.length === 0) + return ''; + return this.sections.map(section => section.text).join(''); + } + serialize() { + const serialized = ['format']; + for (const section of this.sections) { + if (section.image) { + serialized.push([ + 'image', + section.image.name + ]); + continue; + } + serialized.push(section.text); + const options = {}; + if (section.fontStack) { + options['text-font'] = [ + 'literal', + section.fontStack.split(',') + ]; + } + if (section.scale) { + options['font-scale'] = section.scale; + } + if (section.textColor) { + options['text-color'] = ['rgba'].concat(section.textColor.toArray()); + } + serialized.push(options); + } + return serialized; + } +} + +// +class ResolvedImage { + constructor(options) { + this.name = options.name; + this.available = options.available; + } + toString() { + return this.name; + } + static fromString(name) { + if (!name) + return null; + // treat empty values as no image + return new ResolvedImage({ + name, + available: false + }); + } + serialize() { + return [ + 'image', + this.name + ]; + } +} + +function validateRGBA(r, g, b, a) { + if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) { + const value = typeof a === 'number' ? [ + r, + g, + b, + a + ] : [ + r, + g, + b + ]; + return `Invalid rgba value [${ value.join(', ') }]: 'r', 'g', and 'b' must be between 0 and 255.`; + } + if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) { + return `Invalid rgba value [${ [ + r, + g, + b, + a + ].join(', ') }]: 'a' must be between 0 and 1.`; + } + return null; +} +function isValue(mixed) { + if (mixed === null) { + return true; + } else if (typeof mixed === 'string') { + return true; + } else if (typeof mixed === 'boolean') { + return true; + } else if (typeof mixed === 'number') { + return true; + } else if (mixed instanceof Color$1) { + return true; + } else if (mixed instanceof Collator) { + return true; + } else if (mixed instanceof Formatted) { + return true; + } else if (mixed instanceof ResolvedImage) { + return true; + } else if (Array.isArray(mixed)) { + for (const item of mixed) { + if (!isValue(item)) { + return false; + } + } + return true; + } else if (typeof mixed === 'object') { + for (const key in mixed) { + if (!isValue(mixed[key])) { + return false; + } + } + return true; + } else { + return false; + } +} +function typeOf(value) { + if (value === null) { + return NullType; + } else if (typeof value === 'string') { + return StringType; + } else if (typeof value === 'boolean') { + return BooleanType; + } else if (typeof value === 'number') { + return NumberType; + } else if (value instanceof Color$1) { + return ColorType; + } else if (value instanceof Collator) { + return CollatorType; + } else if (value instanceof Formatted) { + return FormattedType; + } else if (value instanceof ResolvedImage) { + return ResolvedImageType; + } else if (Array.isArray(value)) { + const length = value.length; + let itemType; + for (const item of value) { + const t = typeOf(item); + if (!itemType) { + itemType = t; + } else if (itemType === t) { + continue; + } else { + itemType = ValueType; + break; + } + } + return array$1(itemType || ValueType, length); + } else { + return ObjectType; + } +} +function toString(value) { + const type = typeof value; + if (value === null) { + return ''; + } else if (type === 'string' || type === 'number' || type === 'boolean') { + return String(value); + } else if (value instanceof Color$1 || value instanceof Formatted || value instanceof ResolvedImage) { + return value.toString(); + } else { + return JSON.stringify(value); + } +} + +class Literal { + constructor(type, value) { + this.type = type; + this.value = value; + } + static parse(args, context) { + if (args.length !== 2) + return context.error(`'literal' expression requires exactly one argument, but found ${ args.length - 1 } instead.`); + if (!isValue(args[1])) + return context.error(`invalid value`); + const value = args[1]; + let type = typeOf(value); + // special case: infer the item type if possible for zero-length arrays + const expected = context.expectedType; + if (type.kind === 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) { + type = expected; + } + return new Literal(type, value); + } + evaluate() { + return this.value; + } + eachChild() { + } + outputDefined() { + return true; + } + serialize() { + if (this.type.kind === 'array' || this.type.kind === 'object') { + return [ + 'literal', + this.value + ]; + } else if (this.value instanceof Color$1) { + // Constant-folding can generate Literal expressions that you + // couldn't actually generate with a "literal" expression, + // so we have to implement an equivalent serialization here + return ['rgba'].concat(this.value.toArray()); + } else if (this.value instanceof Formatted) { + // Same as Color + return this.value.serialize(); + } else { + return this.value; + } + } +} +var Literal$1 = Literal; + +// +class RuntimeError { + constructor(message) { + this.name = 'ExpressionEvaluationError'; + this.message = message; + } + toJSON() { + return this.message; + } +} +var RuntimeError$1 = RuntimeError; + +const types$2 = { + string: StringType, + number: NumberType, + boolean: BooleanType, + object: ObjectType +}; +class Assertion { + constructor(type, args) { + this.type = type; + this.args = args; + } + static parse(args, context) { + if (args.length < 2) + return context.error(`Expected at least one argument.`); + let i = 1; + let type; + const name = args[0]; + if (name === 'array') { + let itemType; + if (args.length > 2) { + const type = args[1]; + if (typeof type !== 'string' || !(type in types$2) || type === 'object') + return context.error('The item type argument of "array" must be one of string, number, boolean', 1); + itemType = types$2[type]; + i++; + } else { + itemType = ValueType; + } + let N; + if (args.length > 3) { + if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) { + return context.error('The length argument to "array" must be a positive integer literal', 2); + } + N = args[2]; + i++; + } + type = array$1(itemType, N); + } else { + type = types$2[name]; + } + const parsed = []; + for (; i < args.length; i++) { + const input = context.parse(args[i], i, ValueType); + if (!input) + return null; + parsed.push(input); + } + return new Assertion(type, parsed); + } + evaluate(ctx) { + for (let i = 0; i < this.args.length; i++) { + const value = this.args[i].evaluate(ctx); + const error = checkSubtype(this.type, typeOf(value)); + if (!error) { + return value; + } else if (i === this.args.length - 1) { + throw new RuntimeError$1(`Expected value to be of type ${ toString$1(this.type) }, but found ${ toString$1(typeOf(value)) } instead.`); + } + } + return null; + } + eachChild(fn) { + this.args.forEach(fn); + } + outputDefined() { + return this.args.every(arg => arg.outputDefined()); + } + serialize() { + const type = this.type; + const serialized = [type.kind]; + if (type.kind === 'array') { + const itemType = type.itemType; + if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') { + serialized.push(itemType.kind); + const N = type.N; + if (typeof N === 'number' || this.args.length > 1) { + serialized.push(N); + } + } + } + return serialized.concat(this.args.map(arg => arg.serialize())); + } +} +var Assertion$1 = Assertion; + +// +class FormatExpression { + constructor(sections) { + this.type = FormattedType; + this.sections = sections; + } + static parse(args, context) { + if (args.length < 2) { + return context.error(`Expected at least one argument.`); + } + const firstArg = args[1]; + if (!Array.isArray(firstArg) && typeof firstArg === 'object') { + return context.error(`First argument must be an image or text section.`); + } + const sections = []; + let nextTokenMayBeObject = false; + for (let i = 1; i <= args.length - 1; ++i) { + const arg = args[i]; + if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) { + nextTokenMayBeObject = false; + let scale = null; + if (arg['font-scale']) { + scale = context.parse(arg['font-scale'], 1, NumberType); + if (!scale) + return null; + } + let font = null; + if (arg['text-font']) { + font = context.parse(arg['text-font'], 1, array$1(StringType)); + if (!font) + return null; + } + let textColor = null; + if (arg['text-color']) { + textColor = context.parse(arg['text-color'], 1, ColorType); + if (!textColor) + return null; + } + const lastExpression = sections[sections.length - 1]; + lastExpression.scale = scale; + lastExpression.font = font; + lastExpression.textColor = textColor; + } else { + const content = context.parse(args[i], 1, ValueType); + if (!content) + return null; + const kind = content.type.kind; + if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage') + return context.error(`Formatted text type must be 'string', 'value', 'image' or 'null'.`); + nextTokenMayBeObject = true; + sections.push({ + content, + scale: null, + font: null, + textColor: null + }); + } + } + return new FormatExpression(sections); + } + evaluate(ctx) { + const evaluateSection = section => { + const evaluatedContent = section.content.evaluate(ctx); + if (typeOf(evaluatedContent) === ResolvedImageType) { + return new FormattedSection('', evaluatedContent, null, null, null); + } + return new FormattedSection(toString(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null); + }; + return new Formatted(this.sections.map(evaluateSection)); + } + eachChild(fn) { + for (const section of this.sections) { + fn(section.content); + if (section.scale) { + fn(section.scale); + } + if (section.font) { + fn(section.font); + } + if (section.textColor) { + fn(section.textColor); + } + } + } + outputDefined() { + // Technically the combinatoric set of all children + // Usually, this.text will be undefined anyway + return false; + } + serialize() { + const serialized = ['format']; + for (const section of this.sections) { + serialized.push(section.content.serialize()); + const options = {}; + if (section.scale) { + options['font-scale'] = section.scale.serialize(); + } + if (section.font) { + options['text-font'] = section.font.serialize(); + } + if (section.textColor) { + options['text-color'] = section.textColor.serialize(); + } + serialized.push(options); + } + return serialized; + } +} + +// +class ImageExpression { + constructor(input) { + this.type = ResolvedImageType; + this.input = input; + } + static parse(args, context) { + if (args.length !== 2) { + return context.error(`Expected two arguments.`); + } + const name = context.parse(args[1], 1, StringType); + if (!name) + return context.error(`No image name provided.`); + return new ImageExpression(name); + } + evaluate(ctx) { + const evaluatedImageName = this.input.evaluate(ctx); + const value = ResolvedImage.fromString(evaluatedImageName); + if (value && ctx.availableImages) + value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1; + return value; + } + eachChild(fn) { + fn(this.input); + } + outputDefined() { + // The output of image is determined by the list of available images in the evaluation context + return false; + } + serialize() { + return [ + 'image', + this.input.serialize() + ]; + } +} + +const types$1 = { + 'to-boolean': BooleanType, + 'to-color': ColorType, + 'to-number': NumberType, + 'to-string': StringType +}; +/** + * Special form for error-coalescing coercion expressions "to-number", + * "to-color". Since these coercions can fail at runtime, they accept multiple + * arguments, only evaluating one at a time until one succeeds. + * + * @private + */ +class Coercion { + constructor(type, args) { + this.type = type; + this.args = args; + } + static parse(args, context) { + if (args.length < 2) + return context.error(`Expected at least one argument.`); + const name = args[0]; + if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2) + return context.error(`Expected one argument.`); + const type = types$1[name]; + const parsed = []; + for (let i = 1; i < args.length; i++) { + const input = context.parse(args[i], i, ValueType); + if (!input) + return null; + parsed.push(input); + } + return new Coercion(type, parsed); + } + evaluate(ctx) { + if (this.type.kind === 'boolean') { + return Boolean(this.args[0].evaluate(ctx)); + } else if (this.type.kind === 'color') { + let input; + let error; + for (const arg of this.args) { + input = arg.evaluate(ctx); + error = null; + if (input instanceof Color$1) { + return input; + } else if (typeof input === 'string') { + const c = ctx.parseColor(input); + if (c) + return c; + } else if (Array.isArray(input)) { + if (input.length < 3 || input.length > 4) { + error = `Invalid rbga value ${ JSON.stringify(input) }: expected an array containing either three or four numeric values.`; + } else { + error = validateRGBA(input[0], input[1], input[2], input[3]); + } + if (!error) { + return new Color$1(input[0] / 255, input[1] / 255, input[2] / 255, input[3]); + } + } + } + throw new RuntimeError$1(error || `Could not parse color from value '${ typeof input === 'string' ? input : String(JSON.stringify(input)) }'`); + } else if (this.type.kind === 'number') { + let value = null; + for (const arg of this.args) { + value = arg.evaluate(ctx); + if (value === null) + return 0; + const num = Number(value); + if (isNaN(num)) + continue; + return num; + } + throw new RuntimeError$1(`Could not convert ${ JSON.stringify(value) } to number.`); + } else if (this.type.kind === 'formatted') { + // There is no explicit 'to-formatted' but this coercion can be implicitly + // created by properties that expect the 'formatted' type. + return Formatted.fromString(toString(this.args[0].evaluate(ctx))); + } else if (this.type.kind === 'resolvedImage') { + return ResolvedImage.fromString(toString(this.args[0].evaluate(ctx))); + } else { + return toString(this.args[0].evaluate(ctx)); + } + } + eachChild(fn) { + this.args.forEach(fn); + } + outputDefined() { + return this.args.every(arg => arg.outputDefined()); + } + serialize() { + if (this.type.kind === 'formatted') { + return new FormatExpression([{ + content: this.args[0], + scale: null, + font: null, + textColor: null + }]).serialize(); + } + if (this.type.kind === 'resolvedImage') { + return new ImageExpression(this.args[0]).serialize(); + } + const serialized = [`to-${ this.type.kind }`]; + this.eachChild(child => { + serialized.push(child.serialize()); + }); + return serialized; + } +} +var Coercion$1 = Coercion; + +// +const geometryTypes = [ + 'Unknown', + 'Point', + 'LineString', + 'Polygon' +]; +class EvaluationContext { + constructor() { + this.globals = null; + this.feature = null; + this.featureState = null; + this.formattedSection = null; + this._parseColorCache = {}; + this.availableImages = null; + this.canonical = null; + this.featureTileCoord = null; + this.featureDistanceData = null; + } + id() { + return this.feature && this.feature.id !== undefined ? this.feature.id : null; + } + geometryType() { + return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null; + } + geometry() { + return this.feature && 'geometry' in this.feature ? this.feature.geometry : null; + } + canonicalID() { + return this.canonical; + } + properties() { + return this.feature && this.feature.properties || {}; + } + distanceFromCenter() { + if (this.featureTileCoord && this.featureDistanceData) { + const c = this.featureDistanceData.center; + const scale = this.featureDistanceData.scale; + const {x, y} = this.featureTileCoord; + // Calculate the distance vector `d` (left handed) + const dX = x * scale - c[0]; + const dY = y * scale - c[1]; + // The bearing vector `b` (left handed) + const bX = this.featureDistanceData.bearing[0]; + const bY = this.featureDistanceData.bearing[1]; + // Distance is calculated as `dot(d, v)` + const dist = bX * dX + bY * dY; + return dist; + } + return 0; + } + parseColor(input) { + let cached = this._parseColorCache[input]; + if (!cached) { + cached = this._parseColorCache[input] = Color$1.parse(input); + } + return cached; + } +} +var EvaluationContext$1 = EvaluationContext; + +// +class CompoundExpression { + constructor(name, type, evaluate, args) { + this.name = name; + this.type = type; + this._evaluate = evaluate; + this.args = args; + } + evaluate(ctx) { + return this._evaluate(ctx, this.args); + } + eachChild(fn) { + this.args.forEach(fn); + } + outputDefined() { + return false; + } + serialize() { + return [this.name].concat(this.args.map(arg => arg.serialize())); + } + static parse(args, context) { + const op = args[0]; + const definition = CompoundExpression.definitions[op]; + if (!definition) { + return context.error(`Unknown expression "${ op }". If you wanted a literal array, use ["literal", [...]].`, 0); + } + // Now check argument types against each signature + const type = Array.isArray(definition) ? definition[0] : definition.type; + const availableOverloads = Array.isArray(definition) ? [[ + definition[1], + definition[2] + ]] : definition.overloads; + const overloads = availableOverloads.filter(([signature]) => !Array.isArray(signature) || // varags + signature.length === args.length - 1 // correct param count +); + let signatureContext = null; + for (const [params, evaluate] of overloads) { + // Use a fresh context for each attempted signature so that, if + // we eventually succeed, we haven't polluted `context.errors`. + signatureContext = new ParsingContext$1(context.registry, context.path, null, context.scope); + // First parse all the args, potentially coercing to the + // types expected by this overload. + const parsedArgs = []; + let argParseFailed = false; + for (let i = 1; i < args.length; i++) { + const arg = args[i]; + const expectedType = Array.isArray(params) ? params[i - 1] : params.type; + const parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType); + if (!parsed) { + argParseFailed = true; + break; + } + parsedArgs.push(parsed); + } + if (argParseFailed) { + // Couldn't coerce args of this overload to expected type, move + // on to next one. + continue; + } + if (Array.isArray(params)) { + if (params.length !== parsedArgs.length) { + signatureContext.error(`Expected ${ params.length } arguments, but found ${ parsedArgs.length } instead.`); + continue; + } + } + for (let i = 0; i < parsedArgs.length; i++) { + const expected = Array.isArray(params) ? params[i] : params.type; + const arg = parsedArgs[i]; + signatureContext.concat(i + 1).checkSubtype(expected, arg.type); + } + if (signatureContext.errors.length === 0) { + return new CompoundExpression(op, type, evaluate, parsedArgs); + } + } + if (overloads.length === 1) { + context.errors.push(...signatureContext.errors); + } else { + const expected = overloads.length ? overloads : availableOverloads; + const signatures = expected.map(([params]) => stringifySignature(params)).join(' | '); + const actualTypes = []; + // For error message, re-parse arguments without trying to + // apply any coercions + for (let i = 1; i < args.length; i++) { + const parsed = context.parse(args[i], 1 + actualTypes.length); + if (!parsed) + return null; + actualTypes.push(toString$1(parsed.type)); + } + context.error(`Expected arguments of type ${ signatures }, but found (${ actualTypes.join(', ') }) instead.`); + } + return null; + } + static register(registry, definitions) { + CompoundExpression.definitions = definitions; + for (const name in definitions) { + registry[name] = CompoundExpression; + } + } +} +function stringifySignature(signature) { + if (Array.isArray(signature)) { + return `(${ signature.map(toString$1).join(', ') })`; + } else { + return `(${ toString$1(signature.type) }...)`; + } +} +var CompoundExpression$1 = CompoundExpression; + +// +class CollatorExpression { + constructor(caseSensitive, diacriticSensitive, locale) { + this.type = CollatorType; + this.locale = locale; + this.caseSensitive = caseSensitive; + this.diacriticSensitive = diacriticSensitive; + } + static parse(args, context) { + if (args.length !== 2) + return context.error(`Expected one argument.`); + const options = args[1]; + if (typeof options !== 'object' || Array.isArray(options)) + return context.error(`Collator options argument must be an object.`); + const caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType); + if (!caseSensitive) + return null; + const diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType); + if (!diacriticSensitive) + return null; + let locale = null; + if (options['locale']) { + locale = context.parse(options['locale'], 1, StringType); + if (!locale) + return null; + } + return new CollatorExpression(caseSensitive, diacriticSensitive, locale); + } + evaluate(ctx) { + return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null); + } + eachChild(fn) { + fn(this.caseSensitive); + fn(this.diacriticSensitive); + if (this.locale) { + fn(this.locale); + } + } + outputDefined() { + // Technically the set of possible outputs is the combinatoric set of Collators produced + // by all possible outputs of locale/caseSensitive/diacriticSensitive + // But for the primary use of Collators in comparison operators, we ignore the Collator's + // possible outputs anyway, so we can get away with leaving this false for now. + return false; + } + serialize() { + const options = {}; + options['case-sensitive'] = this.caseSensitive.serialize(); + options['diacritic-sensitive'] = this.diacriticSensitive.serialize(); + if (this.locale) { + options['locale'] = this.locale.serialize(); + } + return [ + 'collator', + options + ]; + } +} + +// +// minX, minY, maxX, maxY +const EXTENT = 8192; +function updateBBox(bbox, coord) { + bbox[0] = Math.min(bbox[0], coord[0]); + bbox[1] = Math.min(bbox[1], coord[1]); + bbox[2] = Math.max(bbox[2], coord[0]); + bbox[3] = Math.max(bbox[3], coord[1]); +} +function mercatorXfromLng(lng) { + return (180 + lng) / 360; +} +function mercatorYfromLat(lat) { + return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360; +} +function boxWithinBox(bbox1, bbox2) { + if (bbox1[0] <= bbox2[0]) + return false; + if (bbox1[2] >= bbox2[2]) + return false; + if (bbox1[1] <= bbox2[1]) + return false; + if (bbox1[3] >= bbox2[3]) + return false; + return true; +} +function getTileCoordinates(p, canonical) { + const x = mercatorXfromLng(p[0]); + const y = mercatorYfromLat(p[1]); + const tilesAtZoom = Math.pow(2, canonical.z); + return [ + Math.round(x * tilesAtZoom * EXTENT), + Math.round(y * tilesAtZoom * EXTENT) + ]; +} +function onBoundary(p, p1, p2) { + const x1 = p[0] - p1[0]; + const y1 = p[1] - p1[1]; + const x2 = p[0] - p2[0]; + const y2 = p[1] - p2[1]; + return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0; +} +function rayIntersect(p, p1, p2) { + 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]; +} +// ray casting algorithm for detecting if point is in polygon +function pointWithinPolygon(point, rings) { + let inside = false; + for (let i = 0, len = rings.length; i < len; i++) { + const ring = rings[i]; + for (let j = 0, len2 = ring.length; j < len2 - 1; j++) { + if (onBoundary(point, ring[j], ring[j + 1])) + return false; + if (rayIntersect(point, ring[j], ring[j + 1])) + inside = !inside; + } + } + return inside; +} +function pointWithinPolygons(point, polygons) { + for (let i = 0; i < polygons.length; i++) { + if (pointWithinPolygon(point, polygons[i])) + return true; + } + return false; +} +function perp(v1, v2) { + return v1[0] * v2[1] - v1[1] * v2[0]; +} +// check if p1 and p2 are in different sides of line segment q1->q2 +function twoSided(p1, p2, q1, q2) { + // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3) + const x1 = p1[0] - q1[0]; + const y1 = p1[1] - q1[1]; + const x2 = p2[0] - q1[0]; + const y2 = p2[1] - q1[1]; + const x3 = q2[0] - q1[0]; + const y3 = q2[1] - q1[1]; + const det1 = x1 * y3 - x3 * y1; + const det2 = x2 * y3 - x3 * y2; + if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0) + return true; + return false; +} +// a, b are end points for line segment1, c and d are end points for line segment2 +function lineIntersectLine(a, b, c, d) { + // check if two segments are parallel or not + // precondition is end point a, b is inside polygon, if line a->b is + // parallel to polygon edge c->d, then a->b won't intersect with c->d + const vectorP = [ + b[0] - a[0], + b[1] - a[1] + ]; + const vectorQ = [ + d[0] - c[0], + d[1] - c[1] + ]; + if (perp(vectorQ, vectorP) === 0) + return false; + // If lines are intersecting with each other, the relative location should be: + // a and b lie in different sides of segment c->d + // c and d lie in different sides of segment a->b + if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) + return true; + return false; +} +function lineIntersectPolygon(p1, p2, polygon) { + for (const ring of polygon) { + // loop through every edge of the ring + for (let j = 0; j < ring.length - 1; ++j) { + if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) { + return true; + } + } + } + return false; +} +function lineStringWithinPolygon(line, polygon) { + // First, check if geometry points of line segments are all inside polygon + for (let i = 0; i < line.length; ++i) { + if (!pointWithinPolygon(line[i], polygon)) { + return false; + } + } + // Second, check if there is line segment intersecting polygon edge + for (let i = 0; i < line.length - 1; ++i) { + if (lineIntersectPolygon(line[i], line[i + 1], polygon)) { + return false; + } + } + return true; +} +function lineStringWithinPolygons(line, polygons) { + for (let i = 0; i < polygons.length; i++) { + if (lineStringWithinPolygon(line, polygons[i])) + return true; + } + return false; +} +function getTilePolygon(coordinates, bbox, canonical) { + const polygon = []; + for (let i = 0; i < coordinates.length; i++) { + const ring = []; + for (let j = 0; j < coordinates[i].length; j++) { + const coord = getTileCoordinates(coordinates[i][j], canonical); + updateBBox(bbox, coord); + ring.push(coord); + } + polygon.push(ring); + } + return polygon; +} +function getTilePolygons(coordinates, bbox, canonical) { + const polygons = []; + for (let i = 0; i < coordinates.length; i++) { + const polygon = getTilePolygon(coordinates[i], bbox, canonical); + polygons.push(polygon); + } + return polygons; +} +function updatePoint(p, bbox, polyBBox, worldSize) { + if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) { + const halfWorldSize = worldSize * 0.5; + let shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfWorldSize ? worldSize : 0; + if (shift === 0) { + shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0; + } + p[0] += shift; + } + updateBBox(bbox, p); +} +function resetBBox(bbox) { + bbox[0] = bbox[1] = Infinity; + bbox[2] = bbox[3] = -Infinity; +} +function getTilePoints(geometry, pointBBox, polyBBox, canonical) { + const worldSize = Math.pow(2, canonical.z) * EXTENT; + const shifts = [ + canonical.x * EXTENT, + canonical.y * EXTENT + ]; + const tilePoints = []; + if (!geometry) + return tilePoints; + for (const points of geometry) { + for (const point of points) { + const p = [ + point.x + shifts[0], + point.y + shifts[1] + ]; + updatePoint(p, pointBBox, polyBBox, worldSize); + tilePoints.push(p); + } + } + return tilePoints; +} +function getTileLines(geometry, lineBBox, polyBBox, canonical) { + const worldSize = Math.pow(2, canonical.z) * EXTENT; + const shifts = [ + canonical.x * EXTENT, + canonical.y * EXTENT + ]; + const tileLines = []; + if (!geometry) + return tileLines; + for (const line of geometry) { + const tileLine = []; + for (const point of line) { + const p = [ + point.x + shifts[0], + point.y + shifts[1] + ]; + updateBBox(lineBBox, p); + tileLine.push(p); + } + tileLines.push(tileLine); + } + if (lineBBox[2] - lineBBox[0] <= worldSize / 2) { + resetBBox(lineBBox); + for (const line of tileLines) { + for (const p of line) { + updatePoint(p, lineBBox, polyBBox, worldSize); + } + } + } + return tileLines; +} +function pointsWithinPolygons(ctx, polygonGeometry) { + const pointBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + const polyBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + const canonical = ctx.canonicalID(); + if (!canonical) { + return false; + } + if (polygonGeometry.type === 'Polygon') { + const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical); + const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical); + if (!boxWithinBox(pointBBox, polyBBox)) + return false; + for (const point of tilePoints) { + if (!pointWithinPolygon(point, tilePolygon)) + return false; + } + } + if (polygonGeometry.type === 'MultiPolygon') { + const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical); + const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical); + if (!boxWithinBox(pointBBox, polyBBox)) + return false; + for (const point of tilePoints) { + if (!pointWithinPolygons(point, tilePolygons)) + return false; + } + } + return true; +} +function linesWithinPolygons(ctx, polygonGeometry) { + const lineBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + const polyBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + const canonical = ctx.canonicalID(); + if (!canonical) { + return false; + } + if (polygonGeometry.type === 'Polygon') { + const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical); + const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical); + if (!boxWithinBox(lineBBox, polyBBox)) + return false; + for (const line of tileLines) { + if (!lineStringWithinPolygon(line, tilePolygon)) + return false; + } + } + if (polygonGeometry.type === 'MultiPolygon') { + const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical); + const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical); + if (!boxWithinBox(lineBBox, polyBBox)) + return false; + for (const line of tileLines) { + if (!lineStringWithinPolygons(line, tilePolygons)) + return false; + } + } + return true; +} +class Within { + constructor(geojson, geometries) { + this.type = BooleanType; + this.geojson = geojson; + this.geometries = geometries; + } + static parse(args, context) { + if (args.length !== 2) + return context.error(`'within' expression requires exactly one argument, but found ${ args.length - 1 } instead.`); + if (isValue(args[1])) { + const geojson = args[1]; + if (geojson.type === 'FeatureCollection') { + for (let i = 0; i < geojson.features.length; ++i) { + const type = geojson.features[i].geometry.type; + if (type === 'Polygon' || type === 'MultiPolygon') { + return new Within(geojson, geojson.features[i].geometry); + } + } + } else if (geojson.type === 'Feature') { + const type = geojson.geometry.type; + if (type === 'Polygon' || type === 'MultiPolygon') { + return new Within(geojson, geojson.geometry); + } + } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') { + return new Within(geojson, geojson); + } + } + return context.error(`'within' expression requires valid geojson object that contains polygon geometry type.`); + } + evaluate(ctx) { + if (ctx.geometry() != null && ctx.canonicalID() != null) { + if (ctx.geometryType() === 'Point') { + return pointsWithinPolygons(ctx, this.geometries); + } else if (ctx.geometryType() === 'LineString') { + return linesWithinPolygons(ctx, this.geometries); + } + } + return false; + } + eachChild() { + } + outputDefined() { + return true; + } + serialize() { + return [ + 'within', + this.geojson + ]; + } +} +var Within$1 = Within; + +// +function isFeatureConstant(e) { + if (e instanceof CompoundExpression$1) { + if (e.name === 'get' && e.args.length === 1) { + return false; + } else if (e.name === 'feature-state') { + return false; + } else if (e.name === 'has' && e.args.length === 1) { + return false; + } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') { + return false; + } else if (/^filter-/.test(e.name)) { + return false; + } + } + if (e instanceof Within$1) { + return false; + } + let result = true; + e.eachChild(arg => { + if (result && !isFeatureConstant(arg)) { + result = false; + } + }); + return result; +} +function isStateConstant(e) { + if (e instanceof CompoundExpression$1) { + if (e.name === 'feature-state') { + return false; + } + } + let result = true; + e.eachChild(arg => { + if (result && !isStateConstant(arg)) { + result = false; + } + }); + return result; +} +function isGlobalPropertyConstant(e, properties) { + if (e instanceof CompoundExpression$1 && properties.indexOf(e.name) >= 0) { + return false; + } + let result = true; + e.eachChild(arg => { + if (result && !isGlobalPropertyConstant(arg, properties)) { + result = false; + } + }); + return result; +} + +// +class Var { + constructor(name, boundExpression) { + this.type = boundExpression.type; + this.name = name; + this.boundExpression = boundExpression; + } + static parse(args, context) { + if (args.length !== 2 || typeof args[1] !== 'string') + return context.error(`'var' expression requires exactly one string literal argument.`); + const name = args[1]; + if (!context.scope.has(name)) { + return context.error(`Unknown variable "${ name }". Make sure "${ name }" has been bound in an enclosing "let" expression before using it.`, 1); + } + return new Var(name, context.scope.get(name)); + } + evaluate(ctx) { + return this.boundExpression.evaluate(ctx); + } + eachChild() { + } + outputDefined() { + return false; + } + serialize() { + return [ + 'var', + this.name + ]; + } +} +var Var$1 = Var; + +// +/** + * State associated parsing at a given point in an expression tree. + * @private + */ +class ParsingContext { + // The expected type of this expression. Provided only to allow Expression + // implementations to infer argument types: Expression#parse() need not + // check that the output type of the parsed expression matches + // `expectedType`. + constructor(registry, path = [], expectedType, scope = new Scope$1(), errors = []) { + this.registry = registry; + this.path = path; + this.key = path.map(part => `[${ part }]`).join(''); + this.scope = scope; + this.errors = errors; + this.expectedType = expectedType; + } + /** + * @param expr the JSON expression to parse + * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed + * @param options + * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation. + * @private + */ + parse(expr, index, expectedType, bindings, options = {}) { + if (index) { + return this.concat(index, expectedType, bindings)._parse(expr, options); + } + return this._parse(expr, options); + } + _parse(expr, options) { + if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') { + expr = [ + 'literal', + expr + ]; + } + function annotate(parsed, type, typeAnnotation) { + if (typeAnnotation === 'assert') { + return new Assertion$1(type, [parsed]); + } else if (typeAnnotation === 'coerce') { + return new Coercion$1(type, [parsed]); + } else { + return parsed; + } + } + if (Array.isArray(expr)) { + if (expr.length === 0) { + return this.error(`Expected an array with at least one element. If you wanted a literal array, use ["literal", []].`); + } + const op = expr[0]; + if (typeof op !== 'string') { + this.error(`Expression name must be a string, but found ${ typeof op } instead. If you wanted a literal array, use ["literal", [...]].`, 0); + return null; + } + const Expr = this.registry[op]; + if (Expr) { + let parsed = Expr.parse(expr, this); + if (!parsed) + return null; + if (this.expectedType) { + const expected = this.expectedType; + const actual = parsed.type; + // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion. + // When we expect a color or formatted string, but have a string or value, wrap it in a coercion. + // Otherwise, we do static type-checking. + // + // These behaviors are overridable for: + // * The "coalesce" operator, which needs to omit type annotations. + // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion. + // + if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') { + parsed = annotate(parsed, expected, options.typeAnnotation || 'assert'); + } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) { + parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce'); + } else if (this.checkSubtype(expected, actual)) { + return null; + } + } + // If an expression's arguments are all literals, we can evaluate + // it immediately and replace it with a literal value in the + // parsed/compiled result. Expressions that expect an image should + // not be resolved here so we can later get the available images. + if (!(parsed instanceof Literal$1) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) { + const ec = new EvaluationContext$1(); + try { + parsed = new Literal$1(parsed.type, parsed.evaluate(ec)); + } catch (e) { + this.error(e.message); + return null; + } + } + return parsed; + } + return this.error(`Unknown expression "${ op }". If you wanted a literal array, use ["literal", [...]].`, 0); + } else if (typeof expr === 'undefined') { + return this.error(`'undefined' value invalid. Use null instead.`); + } else if (typeof expr === 'object') { + return this.error(`Bare objects invalid. Use ["literal", {...}] instead.`); + } else { + return this.error(`Expected an array, but found ${ typeof expr } instead.`); + } + } + /** + * Returns a copy of this context suitable for parsing the subexpression at + * index `index`, optionally appending to 'let' binding map. + * + * Note that `errors` property, intended for collecting errors while + * parsing, is copied by reference rather than cloned. + * @private + */ + concat(index, expectedType, bindings) { + const path = typeof index === 'number' ? this.path.concat(index) : this.path; + const scope = bindings ? this.scope.concat(bindings) : this.scope; + return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors); + } + /** + * Push a parsing (or type checking) error into the `this.errors` + * @param error The message + * @param keys Optionally specify the source of the error at a child + * of the current expression at `this.key`. + * @private + */ + error(error, ...keys) { + const key = `${ this.key }${ keys.map(k => `[${ k }]`).join('') }`; + this.errors.push(new ParsingError$1(key, error)); + } + /** + * Returns null if `t` is a subtype of `expected`; otherwise returns an + * error message and also pushes it to `this.errors`. + */ + checkSubtype(expected, t) { + const error = checkSubtype(expected, t); + if (error) + this.error(error); + return error; + } +} +var ParsingContext$1 = ParsingContext; +function isConstant(expression) { + if (expression instanceof Var$1) { + return isConstant(expression.boundExpression); + } else if (expression instanceof CompoundExpression$1 && expression.name === 'error') { + return false; + } else if (expression instanceof CollatorExpression) { + // Although the results of a Collator expression with fixed arguments + // generally shouldn't change between executions, we can't serialize them + // as constant expressions because results change based on environment. + return false; + } else if (expression instanceof Within$1) { + return false; + } + const isTypeAnnotation = expression instanceof Coercion$1 || expression instanceof Assertion$1; + let childrenConstant = true; + expression.eachChild(child => { + // We can _almost_ assume that if `expressions` children are constant, + // they would already have been evaluated to Literal values when they + // were parsed. Type annotations are the exception, because they might + // have been inferred and added after a child was parsed. + // So we recurse into isConstant() for the children of type annotations, + // but otherwise simply check whether they are Literals. + if (isTypeAnnotation) { + childrenConstant = childrenConstant && isConstant(child); + } else { + childrenConstant = childrenConstant && child instanceof Literal$1; + } + }); + if (!childrenConstant) { + return false; + } + return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, [ + 'zoom', + 'heatmap-density', + 'line-progress', + 'sky-radial-progress', + 'accumulated', + 'is-supported-script', + 'pitch', + 'distance-from-center' + ]); +} + +// +/** + * Returns the index of the last stop <= input, or 0 if it doesn't exist. + * @private + */ +function findStopLessThanOrEqualTo(stops, input) { + const lastIndex = stops.length - 1; + let lowerIndex = 0; + let upperIndex = lastIndex; + let currentIndex = 0; + let currentValue, nextValue; + while (lowerIndex <= upperIndex) { + currentIndex = Math.floor((lowerIndex + upperIndex) / 2); + currentValue = stops[currentIndex]; + nextValue = stops[currentIndex + 1]; + if (currentValue <= input) { + if (currentIndex === lastIndex || input < nextValue) { + // Search complete + return currentIndex; + } + lowerIndex = currentIndex + 1; + } else if (currentValue > input) { + upperIndex = currentIndex - 1; + } else { + throw new RuntimeError$1('Input is not a number.'); + } + } + return 0; +} + +// +class Step { + constructor(type, input, stops) { + this.type = type; + this.input = input; + this.labels = []; + this.outputs = []; + for (const [label, expression] of stops) { + this.labels.push(label); + this.outputs.push(expression); + } + } + static parse(args, context) { + if (args.length - 1 < 4) { + return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`); + } + if ((args.length - 1) % 2 !== 0) { + return context.error(`Expected an even number of arguments.`); + } + const input = context.parse(args[1], 1, NumberType); + if (!input) + return null; + const stops = []; + let outputType = null; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + for (let i = 1; i < args.length; i += 2) { + const label = i === 1 ? -Infinity : args[i]; + const value = args[i + 1]; + const labelKey = i; + const valueKey = i + 1; + if (typeof label !== 'number') { + return context.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey); + } + if (stops.length && stops[stops.length - 1][0] >= label) { + return context.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', labelKey); + } + const parsed = context.parse(value, valueKey, outputType); + if (!parsed) + return null; + outputType = outputType || parsed.type; + stops.push([ + label, + parsed + ]); + } + return new Step(outputType, input, stops); + } + evaluate(ctx) { + const labels = this.labels; + const outputs = this.outputs; + if (labels.length === 1) { + return outputs[0].evaluate(ctx); + } + const value = this.input.evaluate(ctx); + if (value <= labels[0]) { + return outputs[0].evaluate(ctx); + } + const stopCount = labels.length; + if (value >= labels[stopCount - 1]) { + return outputs[stopCount - 1].evaluate(ctx); + } + const index = findStopLessThanOrEqualTo(labels, value); + return outputs[index].evaluate(ctx); + } + eachChild(fn) { + fn(this.input); + for (const expression of this.outputs) { + fn(expression); + } + } + outputDefined() { + return this.outputs.every(out => out.outputDefined()); + } + serialize() { + const serialized = [ + 'step', + this.input.serialize() + ]; + for (let i = 0; i < this.labels.length; i++) { + if (i > 0) { + serialized.push(this.labels[i]); + } + serialized.push(this.outputs[i].serialize()); + } + return serialized; + } +} +var Step$1 = Step; + +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Ported from Webkit + * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h + */ + +var unitbezier = UnitBezier; +function UnitBezier(p1x, p1y, p2x, p2y) { + // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1). + this.cx = 3 * p1x; + this.bx = 3 * (p2x - p1x) - this.cx; + this.ax = 1 - this.cx - this.bx; + this.cy = 3 * p1y; + this.by = 3 * (p2y - p1y) - this.cy; + this.ay = 1 - this.cy - this.by; + this.p1x = p1x; + this.p1y = p2y; + this.p2x = p2x; + this.p2y = p2y; +} +UnitBezier.prototype.sampleCurveX = function (t) { + // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. + return ((this.ax * t + this.bx) * t + this.cx) * t; +}; +UnitBezier.prototype.sampleCurveY = function (t) { + return ((this.ay * t + this.by) * t + this.cy) * t; +}; +UnitBezier.prototype.sampleCurveDerivativeX = function (t) { + return (3 * this.ax * t + 2 * this.bx) * t + this.cx; +}; +UnitBezier.prototype.solveCurveX = function (x, epsilon) { + if (typeof epsilon === 'undefined') + epsilon = 0.000001; + var t0, t1, t2, x2, i; + // First try a few iterations of Newton's method -- normally very fast. + for (t2 = x, i = 0; i < 8; i++) { + x2 = this.sampleCurveX(t2) - x; + if (Math.abs(x2) < epsilon) + return t2; + var d2 = this.sampleCurveDerivativeX(t2); + if (Math.abs(d2) < 0.000001) + break; + t2 = t2 - x2 / d2; + } + // Fall back to the bisection method for reliability. + t0 = 0; + t1 = 1; + t2 = x; + if (t2 < t0) + return t0; + if (t2 > t1) + return t1; + while (t0 < t1) { + x2 = this.sampleCurveX(t2); + if (Math.abs(x2 - x) < epsilon) + return t2; + if (x > x2) { + t0 = t2; + } else { + t1 = t2; + } + t2 = (t1 - t0) * 0.5 + t0; + } + // Failure. + return t2; +}; +UnitBezier.prototype.solve = function (x, epsilon) { + return this.sampleCurveY(this.solveCurveX(x, epsilon)); +}; + +var UnitBezier$1 = /*@__PURE__*/getDefaultExportFromCjs(unitbezier); + +// +function number(a, b, t) { + return a * (1 - t) + b * t; +} +function color(from, to, t) { + return new Color$1(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t)); +} +function array(from, to, t) { + return from.map((d, i) => { + return number(d, to[i], t); + }); +} + +var interpolate = /*#__PURE__*/Object.freeze({ + __proto__: null, + number: number, + color: color, + array: array +}); + +// +// Constants +const Xn = 0.95047, + // D65 standard referent + Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad$1 = Math.PI / 180, rad2deg = 180 / Math.PI; +// Utilities +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} +function xyz2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} +function rgb2xyz(x) { + x /= 255; + return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} +// LAB +function rgbToLab(rgbColor) { + const b = rgb2xyz(rgbColor.r), a = rgb2xyz(rgbColor.g), l = rgb2xyz(rgbColor.b), x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.072175 * l) / Yn), z = xyz2lab((0.0193339 * b + 0.119192 * a + 0.9503041 * l) / Zn); + return { + l: 116 * y - 16, + a: 500 * (x - y), + b: 200 * (y - z), + alpha: rgbColor.a + }; +} +function labToRgb(labColor) { + let y = (labColor.l + 16) / 116, x = isNaN(labColor.a) ? y : y + labColor.a / 500, z = isNaN(labColor.b) ? y : y - labColor.b / 200; + y = Yn * lab2xyz(y); + x = Xn * lab2xyz(x); + z = Zn * lab2xyz(z); + return new Color$1(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB + xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha); +} +function interpolateLab(from, to, t) { + return { + l: number(from.l, to.l, t), + a: number(from.a, to.a, t), + b: number(from.b, to.b, t), + alpha: number(from.alpha, to.alpha, t) + }; +} +// HCL +function rgbToHcl(rgbColor) { + const {l, a, b} = rgbToLab(rgbColor); + const h = Math.atan2(b, a) * rad2deg; + return { + h: h < 0 ? h + 360 : h, + c: Math.sqrt(a * a + b * b), + l, + alpha: rgbColor.a + }; +} +function hclToRgb(hclColor) { + const h = hclColor.h * deg2rad$1, c = hclColor.c, l = hclColor.l; + return labToRgb({ + l, + a: Math.cos(h) * c, + b: Math.sin(h) * c, + alpha: hclColor.alpha + }); +} +function interpolateHue(a, b, t) { + const d = b - a; + return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d); +} +function interpolateHcl(from, to, t) { + return { + h: interpolateHue(from.h, to.h, t), + c: number(from.c, to.c, t), + l: number(from.l, to.l, t), + alpha: number(from.alpha, to.alpha, t) + }; +} +const lab = { + forward: rgbToLab, + reverse: labToRgb, + interpolate: interpolateLab +}; +const hcl = { + forward: rgbToHcl, + reverse: hclToRgb, + interpolate: interpolateHcl +}; + +// +class Interpolate { + constructor(type, operator, interpolation, input, stops) { + this.type = type; + this.operator = operator; + this.interpolation = interpolation; + this.input = input; + this.labels = []; + this.outputs = []; + for (const [label, expression] of stops) { + this.labels.push(label); + this.outputs.push(expression); + } + } + static interpolationFactor(interpolation, input, lower, upper) { + let t = 0; + if (interpolation.name === 'exponential') { + t = exponentialInterpolation(input, interpolation.base, lower, upper); + } else if (interpolation.name === 'linear') { + t = exponentialInterpolation(input, 1, lower, upper); + } else if (interpolation.name === 'cubic-bezier') { + const c = interpolation.controlPoints; + const ub = new UnitBezier$1(c[0], c[1], c[2], c[3]); + t = ub.solve(exponentialInterpolation(input, 1, lower, upper)); + } + return t; + } + static parse(args, context) { + let [operator, interpolation, input, ...rest] = args; + if (!Array.isArray(interpolation) || interpolation.length === 0) { + return context.error(`Expected an interpolation type expression.`, 1); + } + if (interpolation[0] === 'linear') { + interpolation = { name: 'linear' }; + } else if (interpolation[0] === 'exponential') { + const base = interpolation[1]; + if (typeof base !== 'number') + return context.error(`Exponential interpolation requires a numeric base.`, 1, 1); + interpolation = { + name: 'exponential', + base + }; + } else if (interpolation[0] === 'cubic-bezier') { + const controlPoints = interpolation.slice(1); + if (controlPoints.length !== 4 || controlPoints.some(t => typeof t !== 'number' || t < 0 || t > 1)) { + return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1); + } + interpolation = { + name: 'cubic-bezier', + controlPoints: controlPoints + }; + } else { + return context.error(`Unknown interpolation type ${ String(interpolation[0]) }`, 1, 0); + } + if (args.length - 1 < 4) { + return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`); + } + if ((args.length - 1) % 2 !== 0) { + return context.error(`Expected an even number of arguments.`); + } + input = context.parse(input, 2, NumberType); + if (!input) + return null; + const stops = []; + let outputType = null; + if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') { + outputType = ColorType; + } else if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + for (let i = 0; i < rest.length; i += 2) { + const label = rest[i]; + const value = rest[i + 1]; + const labelKey = i + 3; + const valueKey = i + 4; + if (typeof label !== 'number') { + return context.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey); + } + if (stops.length && stops[stops.length - 1][0] >= label) { + return context.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', labelKey); + } + const parsed = context.parse(value, valueKey, outputType); + if (!parsed) + return null; + outputType = outputType || parsed.type; + stops.push([ + label, + parsed + ]); + } + if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) { + return context.error(`Type ${ toString$1(outputType) } is not interpolatable.`); + } + return new Interpolate(outputType, operator, interpolation, input, stops); + } + evaluate(ctx) { + const labels = this.labels; + const outputs = this.outputs; + if (labels.length === 1) { + return outputs[0].evaluate(ctx); + } + const value = this.input.evaluate(ctx); + if (value <= labels[0]) { + return outputs[0].evaluate(ctx); + } + const stopCount = labels.length; + if (value >= labels[stopCount - 1]) { + return outputs[stopCount - 1].evaluate(ctx); + } + const index = findStopLessThanOrEqualTo(labels, value); + const lower = labels[index]; + const upper = labels[index + 1]; + const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper); + const outputLower = outputs[index].evaluate(ctx); + const outputUpper = outputs[index + 1].evaluate(ctx); + if (this.operator === 'interpolate') { + return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t); // eslint-disable-line import/namespace + } else if (this.operator === 'interpolate-hcl') { + return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t)); + } else { + return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t)); + } + } + eachChild(fn) { + fn(this.input); + for (const expression of this.outputs) { + fn(expression); + } + } + outputDefined() { + return this.outputs.every(out => out.outputDefined()); + } + serialize() { + let interpolation; + if (this.interpolation.name === 'linear') { + interpolation = ['linear']; + } else if (this.interpolation.name === 'exponential') { + if (this.interpolation.base === 1) { + interpolation = ['linear']; + } else { + interpolation = [ + 'exponential', + this.interpolation.base + ]; + } + } else { + interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints); + } + const serialized = [ + this.operator, + interpolation, + this.input.serialize() + ]; + for (let i = 0; i < this.labels.length; i++) { + serialized.push(this.labels[i], this.outputs[i].serialize()); + } + return serialized; + } +} +/** + * Returns a ratio that can be used to interpolate between exponential function + * stops. + * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base, + * and `a` and `b` are constants affording sufficient degrees of freedom to fit + * the function to the given stops. + * + * Here's a bit of algebra that lets us compute `f(x)` directly from the stop + * values without explicitly solving for `a` and `b`: + * + * First stop value: `f(x0) = y0 = a * base^x0 + b` + * Second stop value: `f(x1) = y1 = a * base^x1 + b` + * => `y1 - y0 = a(base^x1 - base^x0)` + * => `a = (y1 - y0)/(base^x1 - base^x0)` + * + * Desired value: `f(x) = y = a * base^x + b` + * => `f(x) = y0 + a * (base^x - base^x0)` + * + * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a + * little algebra: + * ``` + * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0) + * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0) + * ``` + * + * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have + * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as + * an interpolation factor between the two stops' output values. + * + * (Note: a slightly different form for `ratio`, + * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer + * expensive `Math.pow()` operations.) + * + * @private +*/ +function exponentialInterpolation(input, base, lowerValue, upperValue) { + const difference = upperValue - lowerValue; + const progress = input - lowerValue; + if (difference === 0) { + return 0; + } else if (base === 1) { + return progress / difference; + } else { + return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1); + } +} +var Interpolate$1 = Interpolate; + +class Coalesce { + constructor(type, args) { + this.type = type; + this.args = args; + } + static parse(args, context) { + if (args.length < 2) { + return context.error('Expectected at least one argument.'); + } + let outputType = null; + const expectedType = context.expectedType; + if (expectedType && expectedType.kind !== 'value') { + outputType = expectedType; + } + const parsedArgs = []; + for (const arg of args.slice(1)) { + const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' }); + if (!parsed) + return null; + outputType = outputType || parsed.type; + parsedArgs.push(parsed); + } + // Above, we parse arguments without inferred type annotation so that + // they don't produce a runtime error for `null` input, which would + // preempt the desired null-coalescing behavior. + // Thus, if any of our arguments would have needed an annotation, we + // need to wrap the enclosing coalesce expression with it instead. + const needsAnnotation = expectedType && parsedArgs.some(arg => checkSubtype(expectedType, arg.type)); + return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs); + } + evaluate(ctx) { + let result = null; + let argCount = 0; + let firstImage; + for (const arg of this.args) { + argCount++; + result = arg.evaluate(ctx); + // we need to keep track of the first requested image in a coalesce statement + // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire + if (result && result instanceof ResolvedImage && !result.available) { + // set to first image + if (!firstImage) { + firstImage = result; + } + result = null; + // if we reach the end, return the first image + if (argCount === this.args.length) { + return firstImage; + } + } + if (result !== null) + break; + } + return result; + } + eachChild(fn) { + this.args.forEach(fn); + } + outputDefined() { + return this.args.every(arg => arg.outputDefined()); + } + serialize() { + const serialized = ['coalesce']; + this.eachChild(child => { + serialized.push(child.serialize()); + }); + return serialized; + } +} +var Coalesce$1 = Coalesce; + +// +class Let { + constructor(bindings, result) { + this.type = result.type; + this.bindings = [].concat(bindings); + this.result = result; + } + evaluate(ctx) { + return this.result.evaluate(ctx); + } + eachChild(fn) { + for (const binding of this.bindings) { + fn(binding[1]); + } + fn(this.result); + } + static parse(args, context) { + if (args.length < 4) + return context.error(`Expected at least 3 arguments, but found ${ args.length - 1 } instead.`); + const bindings = []; + for (let i = 1; i < args.length - 1; i += 2) { + const name = args[i]; + if (typeof name !== 'string') { + return context.error(`Expected string, but found ${ typeof name } instead.`, i); + } + if (/[^a-zA-Z0-9_]/.test(name)) { + return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i); + } + const value = context.parse(args[i + 1], i + 1); + if (!value) + return null; + bindings.push([ + name, + value + ]); + } + const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings); + if (!result) + return null; + return new Let(bindings, result); + } + outputDefined() { + return this.result.outputDefined(); + } + serialize() { + const serialized = ['let']; + for (const [name, expr] of this.bindings) { + serialized.push(name, expr.serialize()); + } + serialized.push(this.result.serialize()); + return serialized; + } +} +var Let$1 = Let; + +// +class At { + constructor(type, index, input) { + this.type = type; + this.index = index; + this.input = input; + } + static parse(args, context) { + if (args.length !== 3) + return context.error(`Expected 2 arguments, but found ${ args.length - 1 } instead.`); + const index = context.parse(args[1], 1, NumberType); + const input = context.parse(args[2], 2, array$1(context.expectedType || ValueType)); + if (!index || !input) + return null; + const t = input.type; + return new At(t.itemType, index, input); + } + evaluate(ctx) { + const index = this.index.evaluate(ctx); + const array = this.input.evaluate(ctx); + if (index < 0) { + throw new RuntimeError$1(`Array index out of bounds: ${ index } < 0.`); + } + if (index >= array.length) { + throw new RuntimeError$1(`Array index out of bounds: ${ index } > ${ array.length - 1 }.`); + } + if (index !== Math.floor(index)) { + throw new RuntimeError$1(`Array index must be an integer, but found ${ index } instead.`); + } + return array[index]; + } + eachChild(fn) { + fn(this.index); + fn(this.input); + } + outputDefined() { + return false; + } + serialize() { + return [ + 'at', + this.index.serialize(), + this.input.serialize() + ]; + } +} +var At$1 = At; + +// +class In { + constructor(needle, haystack) { + this.type = BooleanType; + this.needle = needle; + this.haystack = haystack; + } + static parse(args, context) { + if (args.length !== 3) { + return context.error(`Expected 2 arguments, but found ${ args.length - 1 } instead.`); + } + const needle = context.parse(args[1], 1, ValueType); + const haystack = context.parse(args[2], 2, ValueType); + if (!needle || !haystack) + return null; + if (!isValidType(needle.type, [ + BooleanType, + StringType, + NumberType, + NullType, + ValueType + ])) { + return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${ toString$1(needle.type) } instead`); + } + return new In(needle, haystack); + } + evaluate(ctx) { + const needle = this.needle.evaluate(ctx); + const haystack = this.haystack.evaluate(ctx); + if (haystack == null) + return false; + if (!isValidNativeType(needle, [ + 'boolean', + 'string', + 'number', + 'null' + ])) { + throw new RuntimeError$1(`Expected first argument to be of type boolean, string, number or null, but found ${ toString$1(typeOf(needle)) } instead.`); + } + if (!isValidNativeType(haystack, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(`Expected second argument to be of type array or string, but found ${ toString$1(typeOf(haystack)) } instead.`); + } + return haystack.indexOf(needle) >= 0; + } + eachChild(fn) { + fn(this.needle); + fn(this.haystack); + } + outputDefined() { + return true; + } + serialize() { + return [ + 'in', + this.needle.serialize(), + this.haystack.serialize() + ]; + } +} +var In$1 = In; + +// +class IndexOf { + constructor(needle, haystack, fromIndex) { + this.type = NumberType; + this.needle = needle; + this.haystack = haystack; + this.fromIndex = fromIndex; + } + static parse(args, context) { + if (args.length <= 2 || args.length >= 5) { + return context.error(`Expected 3 or 4 arguments, but found ${ args.length - 1 } instead.`); + } + const needle = context.parse(args[1], 1, ValueType); + const haystack = context.parse(args[2], 2, ValueType); + if (!needle || !haystack) + return null; + if (!isValidType(needle.type, [ + BooleanType, + StringType, + NumberType, + NullType, + ValueType + ])) { + return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${ toString$1(needle.type) } instead`); + } + if (args.length === 4) { + const fromIndex = context.parse(args[3], 3, NumberType); + if (!fromIndex) + return null; + return new IndexOf(needle, haystack, fromIndex); + } else { + return new IndexOf(needle, haystack); + } + } + evaluate(ctx) { + const needle = this.needle.evaluate(ctx); + const haystack = this.haystack.evaluate(ctx); + if (!isValidNativeType(needle, [ + 'boolean', + 'string', + 'number', + 'null' + ])) { + throw new RuntimeError$1(`Expected first argument to be of type boolean, string, number or null, but found ${ toString$1(typeOf(needle)) } instead.`); + } + if (!isValidNativeType(haystack, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(`Expected second argument to be of type array or string, but found ${ toString$1(typeOf(haystack)) } instead.`); + } + if (this.fromIndex) { + const fromIndex = this.fromIndex.evaluate(ctx); + return haystack.indexOf(needle, fromIndex); + } + return haystack.indexOf(needle); + } + eachChild(fn) { + fn(this.needle); + fn(this.haystack); + if (this.fromIndex) { + fn(this.fromIndex); + } + } + outputDefined() { + return false; + } + serialize() { + if (this.fromIndex != null && this.fromIndex !== undefined) { + const fromIndex = this.fromIndex.serialize(); + return [ + 'index-of', + this.needle.serialize(), + this.haystack.serialize(), + fromIndex + ]; + } + return [ + 'index-of', + this.needle.serialize(), + this.haystack.serialize() + ]; + } +} +var IndexOf$1 = IndexOf; + +// Map input label values to output expression index +class Match { + constructor(inputType, outputType, input, cases, outputs, otherwise) { + this.inputType = inputType; + this.type = outputType; + this.input = input; + this.cases = cases; + this.outputs = outputs; + this.otherwise = otherwise; + } + static parse(args, context) { + if (args.length < 5) + return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`); + if (args.length % 2 !== 1) + return context.error(`Expected an even number of arguments.`); + let inputType; + let outputType; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + const cases = {}; + const outputs = []; + for (let i = 2; i < args.length - 1; i += 2) { + let labels = args[i]; + const value = args[i + 1]; + if (!Array.isArray(labels)) { + labels = [labels]; + } + const labelContext = context.concat(i); + if (labels.length === 0) { + return labelContext.error('Expected at least one branch label.'); + } + for (const label of labels) { + if (typeof label !== 'number' && typeof label !== 'string') { + return labelContext.error(`Branch labels must be numbers or strings.`); + } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) { + return labelContext.error(`Branch labels must be integers no larger than ${ Number.MAX_SAFE_INTEGER }.`); + } else if (typeof label === 'number' && Math.floor(label) !== label) { + return labelContext.error(`Numeric branch labels must be integer values.`); + } else if (!inputType) { + inputType = typeOf(label); + } else if (labelContext.checkSubtype(inputType, typeOf(label))) { + return null; + } + if (typeof cases[String(label)] !== 'undefined') { + return labelContext.error('Branch labels must be unique.'); + } + cases[String(label)] = outputs.length; + } + const result = context.parse(value, i, outputType); + if (!result) + return null; + outputType = outputType || result.type; + outputs.push(result); + } + const input = context.parse(args[1], 1, ValueType); + if (!input) + return null; + const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType); + if (!otherwise) + return null; + if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) { + return null; + } + return new Match(inputType, outputType, input, cases, outputs, otherwise); + } + evaluate(ctx) { + const input = this.input.evaluate(ctx); + const output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise; + return output.evaluate(ctx); + } + eachChild(fn) { + fn(this.input); + this.outputs.forEach(fn); + fn(this.otherwise); + } + outputDefined() { + return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined(); + } + serialize() { + const serialized = [ + 'match', + this.input.serialize() + ]; + // Sort so serialization has an arbitrary defined order, even though + // branch order doesn't affect evaluation + const sortedLabels = Object.keys(this.cases).sort(); + // Group branches by unique match expression to support condensed + // serializations of the form [case1, case2, ...] -> matchExpression + const groupedByOutput = []; + const outputLookup = {}; + // lookup index into groupedByOutput for a given output expression + for (const label of sortedLabels) { + const outputIndex = outputLookup[this.cases[label]]; + if (outputIndex === undefined) { + // First time seeing this output, add it to the end of the grouped list + outputLookup[this.cases[label]] = groupedByOutput.length; + groupedByOutput.push([ + this.cases[label], + [label] + ]); + } else { + // We've seen this expression before, add the label to that output's group + groupedByOutput[outputIndex][1].push(label); + } + } + const coerceLabel = label => this.inputType.kind === 'number' ? Number(label) : label; + for (const [outputIndex, labels] of groupedByOutput) { + if (labels.length === 1) { + // Only a single label matches this output expression + serialized.push(coerceLabel(labels[0])); + } else { + // Array of literal labels pointing to this output expression + serialized.push(labels.map(coerceLabel)); + } + serialized.push(this.outputs[outputIndex].serialize()); + } + serialized.push(this.otherwise.serialize()); + return serialized; + } +} +var Match$1 = Match; + +class Case { + constructor(type, branches, otherwise) { + this.type = type; + this.branches = branches; + this.otherwise = otherwise; + } + static parse(args, context) { + if (args.length < 4) + return context.error(`Expected at least 3 arguments, but found only ${ args.length - 1 }.`); + if (args.length % 2 !== 0) + return context.error(`Expected an odd number of arguments.`); + let outputType; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + const branches = []; + for (let i = 1; i < args.length - 1; i += 2) { + const test = context.parse(args[i], i, BooleanType); + if (!test) + return null; + const result = context.parse(args[i + 1], i + 1, outputType); + if (!result) + return null; + branches.push([ + test, + result + ]); + outputType = outputType || result.type; + } + const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType); + if (!otherwise) + return null; + return new Case(outputType, branches, otherwise); + } + evaluate(ctx) { + for (const [test, expression] of this.branches) { + if (test.evaluate(ctx)) { + return expression.evaluate(ctx); + } + } + return this.otherwise.evaluate(ctx); + } + eachChild(fn) { + for (const [test, expression] of this.branches) { + fn(test); + fn(expression); + } + fn(this.otherwise); + } + outputDefined() { + return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined(); + } + serialize() { + const serialized = ['case']; + this.eachChild(child => { + serialized.push(child.serialize()); + }); + return serialized; + } +} +var Case$1 = Case; + +// +class Slice { + constructor(type, input, beginIndex, endIndex) { + this.type = type; + this.input = input; + this.beginIndex = beginIndex; + this.endIndex = endIndex; + } + static parse(args, context) { + if (args.length <= 2 || args.length >= 5) { + return context.error(`Expected 3 or 4 arguments, but found ${ args.length - 1 } instead.`); + } + const input = context.parse(args[1], 1, ValueType); + const beginIndex = context.parse(args[2], 2, NumberType); + if (!input || !beginIndex) + return null; + if (!isValidType(input.type, [ + array$1(ValueType), + StringType, + ValueType + ])) { + return context.error(`Expected first argument to be of type array or string, but found ${ toString$1(input.type) } instead`); + } + if (args.length === 4) { + const endIndex = context.parse(args[3], 3, NumberType); + if (!endIndex) + return null; + return new Slice(input.type, input, beginIndex, endIndex); + } else { + return new Slice(input.type, input, beginIndex); + } + } + evaluate(ctx) { + const input = this.input.evaluate(ctx); + const beginIndex = this.beginIndex.evaluate(ctx); + if (!isValidNativeType(input, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(`Expected first argument to be of type array or string, but found ${ toString$1(typeOf(input)) } instead.`); + } + if (this.endIndex) { + const endIndex = this.endIndex.evaluate(ctx); + return input.slice(beginIndex, endIndex); + } + return input.slice(beginIndex); + } + eachChild(fn) { + fn(this.input); + fn(this.beginIndex); + if (this.endIndex) { + fn(this.endIndex); + } + } + outputDefined() { + return false; + } + serialize() { + if (this.endIndex != null && this.endIndex !== undefined) { + const endIndex = this.endIndex.serialize(); + return [ + 'slice', + this.input.serialize(), + this.beginIndex.serialize(), + endIndex + ]; + } + return [ + 'slice', + this.input.serialize(), + this.beginIndex.serialize() + ]; + } +} +var Slice$1 = Slice; + +// +function isComparableType(op, type) { + if (op === '==' || op === '!=') { + // equality operator + return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value'; + } else { + // ordering operator + return type.kind === 'string' || type.kind === 'number' || type.kind === 'value'; + } +} +function eq(ctx, a, b) { + return a === b; +} +function neq(ctx, a, b) { + return a !== b; +} +function lt(ctx, a, b) { + return a < b; +} +function gt(ctx, a, b) { + return a > b; +} +function lteq(ctx, a, b) { + return a <= b; +} +function gteq(ctx, a, b) { + return a >= b; +} +function eqCollate(ctx, a, b, c) { + return c.compare(a, b) === 0; +} +function neqCollate(ctx, a, b, c) { + return !eqCollate(ctx, a, b, c); +} +function ltCollate(ctx, a, b, c) { + return c.compare(a, b) < 0; +} +function gtCollate(ctx, a, b, c) { + return c.compare(a, b) > 0; +} +function lteqCollate(ctx, a, b, c) { + return c.compare(a, b) <= 0; +} +function gteqCollate(ctx, a, b, c) { + return c.compare(a, b) >= 0; +} +/** + * Special form for comparison operators, implementing the signatures: + * - (T, T, ?Collator) => boolean + * - (T, value, ?Collator) => boolean + * - (value, T, ?Collator) => boolean + * + * For inequalities, T must be either value, string, or number. For ==/!=, it + * can also be boolean or null. + * + * Equality semantics are equivalent to Javascript's strict equality (===/!==) + * -- i.e., when the arguments' types don't match, == evaluates to false, != to + * true. + * + * When types don't match in an ordering comparison, a runtime error is thrown. + * + * @private + */ +function makeComparison(op, compareBasic, compareWithCollator) { + const isOrderComparison = op !== '==' && op !== '!='; + return class Comparison { + constructor(lhs, rhs, collator) { + this.type = BooleanType; + this.lhs = lhs; + this.rhs = rhs; + this.collator = collator; + this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value'; + } + static parse(args, context) { + if (args.length !== 3 && args.length !== 4) + return context.error(`Expected two or three arguments.`); + const op = args[0]; + let lhs = context.parse(args[1], 1, ValueType); + if (!lhs) + return null; + if (!isComparableType(op, lhs.type)) { + return context.concat(1).error(`"${ op }" comparisons are not supported for type '${ toString$1(lhs.type) }'.`); + } + let rhs = context.parse(args[2], 2, ValueType); + if (!rhs) + return null; + if (!isComparableType(op, rhs.type)) { + return context.concat(2).error(`"${ op }" comparisons are not supported for type '${ toString$1(rhs.type) }'.`); + } + if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') { + return context.error(`Cannot compare types '${ toString$1(lhs.type) }' and '${ toString$1(rhs.type) }'.`); + } + if (isOrderComparison) { + // typing rules specific to less/greater than operators + if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') { + // (value, T) + lhs = new Assertion$1(rhs.type, [lhs]); + } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') { + // (T, value) + rhs = new Assertion$1(lhs.type, [rhs]); + } + } + let collator = null; + if (args.length === 4) { + if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') { + return context.error(`Cannot use collator to compare non-string types.`); + } + collator = context.parse(args[3], 3, CollatorType); + if (!collator) + return null; + } + return new Comparison(lhs, rhs, collator); + } + evaluate(ctx) { + const lhs = this.lhs.evaluate(ctx); + const rhs = this.rhs.evaluate(ctx); + if (isOrderComparison && this.hasUntypedArgument) { + const lt = typeOf(lhs); + const rt = typeOf(rhs); + // check that type is string or number, and equal + if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) { + throw new RuntimeError$1(`Expected arguments for "${ op }" to be (string, string) or (number, number), but found (${ lt.kind }, ${ rt.kind }) instead.`); + } + } + if (this.collator && !isOrderComparison && this.hasUntypedArgument) { + const lt = typeOf(lhs); + const rt = typeOf(rhs); + if (lt.kind !== 'string' || rt.kind !== 'string') { + return compareBasic(ctx, lhs, rhs); + } + } + return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) : compareBasic(ctx, lhs, rhs); + } + eachChild(fn) { + fn(this.lhs); + fn(this.rhs); + if (this.collator) { + fn(this.collator); + } + } + outputDefined() { + return true; + } + serialize() { + const serialized = [op]; + this.eachChild(child => { + serialized.push(child.serialize()); + }); + return serialized; + } + }; +} +const Equals = makeComparison('==', eq, eqCollate); +const NotEquals = makeComparison('!=', neq, neqCollate); +const LessThan = makeComparison('<', lt, ltCollate); +const GreaterThan = makeComparison('>', gt, gtCollate); +const LessThanOrEqual = makeComparison('<=', lteq, lteqCollate); +const GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate); + +// +class NumberFormat { + // BCP 47 language tag + // ISO 4217 currency code, required if style=currency + // Simple units sanctioned for use in ECMAScript, required if style=unit. https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier + // Default 0 + // Default 3 + constructor(number, locale, currency, unit, minFractionDigits, maxFractionDigits) { + this.type = StringType; + this.number = number; + this.locale = locale; + this.currency = currency; + this.unit = unit; + this.minFractionDigits = minFractionDigits; + this.maxFractionDigits = maxFractionDigits; + } + static parse(args, context) { + if (args.length !== 3) + return context.error(`Expected two arguments.`); + const number = context.parse(args[1], 1, NumberType); + if (!number) + return null; + const options = args[2]; + if (typeof options !== 'object' || Array.isArray(options)) + return context.error(`NumberFormat options argument must be an object.`); + let locale = null; + if (options['locale']) { + locale = context.parse(options['locale'], 1, StringType); + if (!locale) + return null; + } + let currency = null; + if (options['currency']) { + currency = context.parse(options['currency'], 1, StringType); + if (!currency) + return null; + } + let unit = null; + if (options['unit']) { + unit = context.parse(options['unit'], 1, StringType); + if (!unit) + return null; + } + let minFractionDigits = null; + if (options['min-fraction-digits']) { + minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType); + if (!minFractionDigits) + return null; + } + let maxFractionDigits = null; + if (options['max-fraction-digits']) { + maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType); + if (!maxFractionDigits) + return null; + } + return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits); + } + evaluate(ctx) { + return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], { + style: this.currency && 'currency' || this.unit && 'unit' || 'decimal', + currency: this.currency ? this.currency.evaluate(ctx) : undefined, + unit: this.unit ? this.unit.evaluate(ctx) : undefined, + minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined, + maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined + }).format(this.number.evaluate(ctx)); + } + eachChild(fn) { + fn(this.number); + if (this.locale) { + fn(this.locale); + } + if (this.currency) { + fn(this.currency); + } + if (this.unit) { + fn(this.unit); + } + if (this.minFractionDigits) { + fn(this.minFractionDigits); + } + if (this.maxFractionDigits) { + fn(this.maxFractionDigits); + } + } + outputDefined() { + return false; + } + serialize() { + const options = {}; + if (this.locale) { + options['locale'] = this.locale.serialize(); + } + if (this.currency) { + options['currency'] = this.currency.serialize(); + } + if (this.unit) { + options['unit'] = this.unit.serialize(); + } + if (this.minFractionDigits) { + options['min-fraction-digits'] = this.minFractionDigits.serialize(); + } + if (this.maxFractionDigits) { + options['max-fraction-digits'] = this.maxFractionDigits.serialize(); + } + return [ + 'number-format', + this.number.serialize(), + options + ]; + } +} + +// +class Length { + constructor(input) { + this.type = NumberType; + this.input = input; + } + static parse(args, context) { + if (args.length !== 2) + return context.error(`Expected 1 argument, but found ${ args.length - 1 } instead.`); + const input = context.parse(args[1], 1); + if (!input) + return null; + if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value') + return context.error(`Expected argument of type string or array, but found ${ toString$1(input.type) } instead.`); + return new Length(input); + } + evaluate(ctx) { + const input = this.input.evaluate(ctx); + if (typeof input === 'string') { + return input.length; + } else if (Array.isArray(input)) { + return input.length; + } else { + throw new RuntimeError$1(`Expected value to be of type string or array, but found ${ toString$1(typeOf(input)) } instead.`); + } + } + eachChild(fn) { + fn(this.input); + } + outputDefined() { + return false; + } + serialize() { + const serialized = ['length']; + this.eachChild(child => { + serialized.push(child.serialize()); + }); + return serialized; + } +} +var Length$1 = Length; + +// +const expressions = { + // special forms + '==': Equals, + '!=': NotEquals, + '>': GreaterThan, + '<': LessThan, + '>=': GreaterThanOrEqual, + '<=': LessThanOrEqual, + 'array': Assertion$1, + 'at': At$1, + 'boolean': Assertion$1, + 'case': Case$1, + 'coalesce': Coalesce$1, + 'collator': CollatorExpression, + 'format': FormatExpression, + 'image': ImageExpression, + 'in': In$1, + 'index-of': IndexOf$1, + 'interpolate': Interpolate$1, + 'interpolate-hcl': Interpolate$1, + 'interpolate-lab': Interpolate$1, + 'length': Length$1, + 'let': Let$1, + 'literal': Literal$1, + 'match': Match$1, + 'number': Assertion$1, + 'number-format': NumberFormat, + 'object': Assertion$1, + 'slice': Slice$1, + 'step': Step$1, + 'string': Assertion$1, + 'to-boolean': Coercion$1, + 'to-color': Coercion$1, + 'to-number': Coercion$1, + 'to-string': Coercion$1, + 'var': Var$1, + 'within': Within$1 +}; +function rgba(ctx, [r, g, b, a]) { + r = r.evaluate(ctx); + g = g.evaluate(ctx); + b = b.evaluate(ctx); + const alpha = a ? a.evaluate(ctx) : 1; + const error = validateRGBA(r, g, b, alpha); + if (error) + throw new RuntimeError$1(error); + return new Color$1(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha); +} +function has(key, obj) { + return key in obj; +} +function get(key, obj) { + const v = obj[key]; + return typeof v === 'undefined' ? null : v; +} +function binarySearch(v, a, i, j) { + while (i <= j) { + const m = i + j >> 1; + if (a[m] === v) + return true; + if (a[m] > v) + j = m - 1; + else + i = m + 1; + } + return false; +} +function varargs(type) { + return { type }; +} +CompoundExpression$1.register(expressions, { + 'error': [ + ErrorType, + [StringType], + (ctx, [v]) => { + throw new RuntimeError$1(v.evaluate(ctx)); + } + ], + 'typeof': [ + StringType, + [ValueType], + (ctx, [v]) => toString$1(typeOf(v.evaluate(ctx))) + ], + 'to-rgba': [ + array$1(NumberType, 4), + [ColorType], + (ctx, [v]) => { + return v.evaluate(ctx).toArray(); + } + ], + 'rgb': [ + ColorType, + [ + NumberType, + NumberType, + NumberType + ], + rgba + ], + 'rgba': [ + ColorType, + [ + NumberType, + NumberType, + NumberType, + NumberType + ], + rgba + ], + 'has': { + type: BooleanType, + overloads: [ + [ + [StringType], + (ctx, [key]) => has(key.evaluate(ctx), ctx.properties()) + ], + [ + [ + StringType, + ObjectType + ], + (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx)) + ] + ] + }, + 'get': { + type: ValueType, + overloads: [ + [ + [StringType], + (ctx, [key]) => get(key.evaluate(ctx), ctx.properties()) + ], + [ + [ + StringType, + ObjectType + ], + (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx)) + ] + ] + }, + 'feature-state': [ + ValueType, + [StringType], + (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {}) + ], + 'properties': [ + ObjectType, + [], + ctx => ctx.properties() + ], + 'geometry-type': [ + StringType, + [], + ctx => ctx.geometryType() + ], + 'id': [ + ValueType, + [], + ctx => ctx.id() + ], + 'zoom': [ + NumberType, + [], + ctx => ctx.globals.zoom + ], + 'pitch': [ + NumberType, + [], + ctx => ctx.globals.pitch || 0 + ], + 'distance-from-center': [ + NumberType, + [], + ctx => ctx.distanceFromCenter() + ], + 'heatmap-density': [ + NumberType, + [], + ctx => ctx.globals.heatmapDensity || 0 + ], + 'line-progress': [ + NumberType, + [], + ctx => ctx.globals.lineProgress || 0 + ], + 'sky-radial-progress': [ + NumberType, + [], + ctx => ctx.globals.skyRadialProgress || 0 + ], + 'accumulated': [ + ValueType, + [], + ctx => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated + ], + '+': [ + NumberType, + varargs(NumberType), + (ctx, args) => { + let result = 0; + for (const arg of args) { + result += arg.evaluate(ctx); + } + return result; + } + ], + '*': [ + NumberType, + varargs(NumberType), + (ctx, args) => { + let result = 1; + for (const arg of args) { + result *= arg.evaluate(ctx); + } + return result; + } + ], + '-': { + type: NumberType, + overloads: [ + [ + [ + NumberType, + NumberType + ], + (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx) + ], + [ + [NumberType], + (ctx, [a]) => -a.evaluate(ctx) + ] + ] + }, + '/': [ + NumberType, + [ + NumberType, + NumberType + ], + (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx) + ], + '%': [ + NumberType, + [ + NumberType, + NumberType + ], + (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx) + ], + 'ln2': [ + NumberType, + [], + () => Math.LN2 + ], + 'pi': [ + NumberType, + [], + () => Math.PI + ], + 'e': [ + NumberType, + [], + () => Math.E + ], + '^': [ + NumberType, + [ + NumberType, + NumberType + ], + (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx)) + ], + 'sqrt': [ + NumberType, + [NumberType], + (ctx, [x]) => Math.sqrt(x.evaluate(ctx)) + ], + 'log10': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10 + ], + 'ln': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.log(n.evaluate(ctx)) + ], + 'log2': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2 + ], + 'sin': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.sin(n.evaluate(ctx)) + ], + 'cos': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.cos(n.evaluate(ctx)) + ], + 'tan': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.tan(n.evaluate(ctx)) + ], + 'asin': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.asin(n.evaluate(ctx)) + ], + 'acos': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.acos(n.evaluate(ctx)) + ], + 'atan': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.atan(n.evaluate(ctx)) + ], + 'min': [ + NumberType, + varargs(NumberType), + (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx))) + ], + 'max': [ + NumberType, + varargs(NumberType), + (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx))) + ], + 'abs': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.abs(n.evaluate(ctx)) + ], + 'round': [ + NumberType, + [NumberType], + (ctx, [n]) => { + const v = n.evaluate(ctx); + // Javascript's Math.round() rounds towards +Infinity for halfway + // values, even when they're negative. It's more common to round + // away from 0 (e.g., this is what python and C++ do) + return v < 0 ? -Math.round(-v) : Math.round(v); + } + ], + 'floor': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.floor(n.evaluate(ctx)) + ], + 'ceil': [ + NumberType, + [NumberType], + (ctx, [n]) => Math.ceil(n.evaluate(ctx)) + ], + 'filter-==': [ + BooleanType, + [ + StringType, + ValueType + ], + (ctx, [k, v]) => ctx.properties()[k.value] === v.value + ], + 'filter-id-==': [ + BooleanType, + [ValueType], + (ctx, [v]) => ctx.id() === v.value + ], + 'filter-type-==': [ + BooleanType, + [StringType], + (ctx, [v]) => ctx.geometryType() === v.value + ], + 'filter-<': [ + BooleanType, + [ + StringType, + ValueType + ], + (ctx, [k, v]) => { + const a = ctx.properties()[k.value]; + const b = v.value; + return typeof a === typeof b && a < b; + } + ], + 'filter-id-<': [ + BooleanType, + [ValueType], + (ctx, [v]) => { + const a = ctx.id(); + const b = v.value; + return typeof a === typeof b && a < b; + } + ], + 'filter->': [ + BooleanType, + [ + StringType, + ValueType + ], + (ctx, [k, v]) => { + const a = ctx.properties()[k.value]; + const b = v.value; + return typeof a === typeof b && a > b; + } + ], + 'filter-id->': [ + BooleanType, + [ValueType], + (ctx, [v]) => { + const a = ctx.id(); + const b = v.value; + return typeof a === typeof b && a > b; + } + ], + 'filter-<=': [ + BooleanType, + [ + StringType, + ValueType + ], + (ctx, [k, v]) => { + const a = ctx.properties()[k.value]; + const b = v.value; + return typeof a === typeof b && a <= b; + } + ], + 'filter-id-<=': [ + BooleanType, + [ValueType], + (ctx, [v]) => { + const a = ctx.id(); + const b = v.value; + return typeof a === typeof b && a <= b; + } + ], + 'filter->=': [ + BooleanType, + [ + StringType, + ValueType + ], + (ctx, [k, v]) => { + const a = ctx.properties()[k.value]; + const b = v.value; + return typeof a === typeof b && a >= b; + } + ], + 'filter-id->=': [ + BooleanType, + [ValueType], + (ctx, [v]) => { + const a = ctx.id(); + const b = v.value; + return typeof a === typeof b && a >= b; + } + ], + 'filter-has': [ + BooleanType, + [ValueType], + (ctx, [k]) => k.value in ctx.properties() + ], + 'filter-has-id': [ + BooleanType, + [], + ctx => ctx.id() !== null && ctx.id() !== undefined + ], + 'filter-type-in': [ + BooleanType, + [array$1(StringType)], + (ctx, [v]) => v.value.indexOf(ctx.geometryType()) >= 0 + ], + 'filter-id-in': [ + BooleanType, + [array$1(ValueType)], + (ctx, [v]) => v.value.indexOf(ctx.id()) >= 0 + ], + 'filter-in-small': [ + BooleanType, + [ + StringType, + array$1(ValueType) + ], + // assumes v is an array literal + (ctx, [k, v]) => v.value.indexOf(ctx.properties()[k.value]) >= 0 + ], + 'filter-in-large': [ + BooleanType, + [ + StringType, + array$1(ValueType) + ], + // assumes v is a array literal with values sorted in ascending order and of a single type + (ctx, [k, v]) => binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1) + ], + 'all': { + type: BooleanType, + overloads: [ + [ + [ + BooleanType, + BooleanType + ], + (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx) + ], + [ + varargs(BooleanType), + (ctx, args) => { + for (const arg of args) { + if (!arg.evaluate(ctx)) + return false; + } + return true; + } + ] + ] + }, + 'any': { + type: BooleanType, + overloads: [ + [ + [ + BooleanType, + BooleanType + ], + (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx) + ], + [ + varargs(BooleanType), + (ctx, args) => { + for (const arg of args) { + if (arg.evaluate(ctx)) + return true; + } + return false; + } + ] + ] + }, + '!': [ + BooleanType, + [BooleanType], + (ctx, [b]) => !b.evaluate(ctx) + ], + 'is-supported-script': [ + BooleanType, + [StringType], + // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant + (ctx, [s]) => { + const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript; + if (isSupportedScript) { + return isSupportedScript(s.evaluate(ctx)); + } + return true; + } + ], + 'upcase': [ + StringType, + [StringType], + (ctx, [s]) => s.evaluate(ctx).toUpperCase() + ], + 'downcase': [ + StringType, + [StringType], + (ctx, [s]) => s.evaluate(ctx).toLowerCase() + ], + 'concat': [ + StringType, + varargs(ValueType), + (ctx, args) => args.map(arg => toString(arg.evaluate(ctx))).join('') + ], + 'resolved-locale': [ + StringType, + [CollatorType], + (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale() + ] +}); +var definitions = expressions; + +// +/** + * A type used for returning and propagating errors. The first element of the union + * represents success and contains a value, and the second represents an error and + * contains an error value. + * @private + */ +function success(value) { + return { + result: 'success', + value + }; +} +function error(value) { + return { + result: 'error', + value + }; +} + +// +function supportsPropertyExpression(spec) { + return spec['property-type'] === 'data-driven'; +} +function supportsZoomExpression(spec) { + return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1; +} +function supportsInterpolation(spec) { + return !!spec.expression && spec.expression.interpolated; +} + +function isFunction(value) { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} + +class StyleExpression { + constructor(expression, propertySpec) { + this.expression = expression; + this._warningHistory = {}; + this._evaluator = new EvaluationContext$1(); + this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null; + this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null; + } + evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) { + this._evaluator.globals = globals; + this._evaluator.feature = feature; + this._evaluator.featureState = featureState; + this._evaluator.canonical = canonical || null; + this._evaluator.availableImages = availableImages || null; + this._evaluator.formattedSection = formattedSection; + this._evaluator.featureTileCoord = featureTileCoord || null; + this._evaluator.featureDistanceData = featureDistanceData || null; + return this.expression.evaluate(this._evaluator); + } + evaluate(globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) { + this._evaluator.globals = globals; + this._evaluator.feature = feature || null; + this._evaluator.featureState = featureState || null; + this._evaluator.canonical = canonical || null; + this._evaluator.availableImages = availableImages || null; + this._evaluator.formattedSection = formattedSection || null; + this._evaluator.featureTileCoord = featureTileCoord || null; + this._evaluator.featureDistanceData = featureDistanceData || null; + try { + const val = this.expression.evaluate(this._evaluator); + // eslint-disable-next-line no-self-compare + if (val === null || val === undefined || typeof val === 'number' && val !== val) { + return this._defaultValue; + } + if (this._enumValues && !(val in this._enumValues)) { + throw new RuntimeError$1(`Expected value to be one of ${ Object.keys(this._enumValues).map(v => JSON.stringify(v)).join(', ') }, but found ${ JSON.stringify(val) } instead.`); + } + return val; + } catch (e) { + if (!this._warningHistory[e.message]) { + this._warningHistory[e.message] = true; + if (typeof console !== 'undefined') { + console.warn(e.message); + } + } + return this._defaultValue; + } + } +} +function isExpression(expression) { + return Array.isArray(expression) && expression.length > 0 && typeof expression[0] === 'string' && expression[0] in definitions; +} +/** + * Parse and typecheck the given style spec JSON expression. If + * options.defaultValue is provided, then the resulting StyleExpression's + * `evaluate()` method will handle errors by logging a warning (once per + * message) and returning the default value. Otherwise, it will throw + * evaluation errors. + * + * @private + */ +function createExpression(expression, propertySpec) { + const parser = new ParsingContext$1(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined); + // For string-valued properties, coerce to string at the top level rather than asserting. + const parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined); + if (!parsed) { + return error(parser.errors); + } + return success(new StyleExpression(parsed, propertySpec)); +} +class ZoomConstantExpression { + constructor(kind, expression) { + this.kind = kind; + this._styleExpression = expression; + this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression); + } + evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection); + } + evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection); + } +} +class ZoomDependentExpression { + constructor(kind, expression, zoomStops, interpolationType) { + this.kind = kind; + this.zoomStops = zoomStops; + this._styleExpression = expression; + this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression); + this.interpolationType = interpolationType; + } + evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection); + } + evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection); + } + interpolationFactor(input, lower, upper) { + if (this.interpolationType) { + return Interpolate$1.interpolationFactor(this.interpolationType, input, lower, upper); + } else { + return 0; + } + } +} +function createPropertyExpression(expression, propertySpec) { + expression = createExpression(expression, propertySpec); + if (expression.result === 'error') { + return expression; + } + const parsed = expression.value.expression; + const isFeatureConstant$1 = isFeatureConstant(parsed); + if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) { + return error([new ParsingError$1('', 'data expressions not supported')]); + } + const isZoomConstant = isGlobalPropertyConstant(parsed, [ + 'zoom', + 'pitch', + 'distance-from-center' + ]); + if (!isZoomConstant && !supportsZoomExpression(propertySpec)) { + return error([new ParsingError$1('', 'zoom expressions not supported')]); + } + const zoomCurve = findZoomCurve(parsed); + if (!zoomCurve && !isZoomConstant) { + return error([new ParsingError$1('', '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]); + } else if (zoomCurve instanceof ParsingError$1) { + return error([zoomCurve]); + } else if (zoomCurve instanceof Interpolate$1 && !supportsInterpolation(propertySpec)) { + return error([new ParsingError$1('', '"interpolate" expressions cannot be used with this property')]); + } + if (!zoomCurve) { + return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpression('source', expression.value)); + } + const interpolationType = zoomCurve instanceof Interpolate$1 ? zoomCurve.interpolation : undefined; + return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType)); +} +// Zoom-dependent expressions may only use ["zoom"] as the input to a top-level "step" or "interpolate" +// expression (collectively referred to as a "curve"). The curve may be wrapped in one or more "let" or +// "coalesce" expressions. +function findZoomCurve(expression) { + let result = null; + if (expression instanceof Let$1) { + result = findZoomCurve(expression.result); + } else if (expression instanceof Coalesce$1) { + for (const arg of expression.args) { + result = findZoomCurve(arg); + if (result) { + break; + } + } + } else if ((expression instanceof Step$1 || expression instanceof Interpolate$1) && expression.input instanceof CompoundExpression$1 && expression.input.name === 'zoom') { + result = expression; + } + if (result instanceof ParsingError$1) { + return result; + } + expression.eachChild(child => { + const childResult = findZoomCurve(child); + if (childResult instanceof ParsingError$1) { + result = childResult; + } else if (!result && childResult) { + result = new ParsingError$1('', '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'); + } else if (result && childResult && result !== childResult) { + result = new ParsingError$1('', 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'); + } + }); + return result; +} +function getExpectedType(spec) { + const types = { + color: ColorType, + string: StringType, + number: NumberType, + enum: StringType, + boolean: BooleanType, + formatted: FormattedType, + resolvedImage: ResolvedImageType + }; + if (spec.type === 'array') { + return array$1(types[spec.value] || ValueType, spec.length); + } + return types[spec.type]; +} +function getDefaultValue(spec) { + if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) { + // Special case for heatmap-color: it uses the 'default:' to define a + // default color ramp, but createExpression expects a simple value to fall + // back to in case of runtime errors + return new Color$1(0, 0, 0, 0); + } else if (spec.type === 'color') { + return Color$1.parse(spec.default) || null; + } else if (spec.default === undefined) { + return null; + } else { + return spec.default; + } +} + +// +// Turn jsonlint-lines-primitives objects into primitive objects +function unbundle(value) { + if (value instanceof Number || value instanceof String || value instanceof Boolean) { + return value.valueOf(); + } else { + return value; + } +} +function deepUnbundle(value) { + if (Array.isArray(value)) { + return value.map(deepUnbundle); + } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) { + const unbundledValue = {}; + for (const key in value) { + unbundledValue[key] = deepUnbundle(value[key]); + } + return unbundledValue; + } + return unbundle(value); +} + +var spec = {"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"expression_name":{"type":"enum","values":{"let":{"group":"Variable binding"},"var":{"group":"Variable binding"},"literal":{"group":"Types"},"array":{"group":"Types"},"at":{"group":"Lookup"},"in":{"group":"Lookup"},"index-of":{"group":"Lookup"},"slice":{"group":"Lookup"},"case":{"group":"Decision"},"match":{"group":"Decision"},"coalesce":{"group":"Decision"},"step":{"group":"Ramps, scales, curves"},"interpolate":{"group":"Ramps, scales, curves"},"interpolate-hcl":{"group":"Ramps, scales, curves"},"interpolate-lab":{"group":"Ramps, scales, curves"},"ln2":{"group":"Math"},"pi":{"group":"Math"},"e":{"group":"Math"},"typeof":{"group":"Types"},"string":{"group":"Types"},"number":{"group":"Types"},"boolean":{"group":"Types"},"object":{"group":"Types"},"collator":{"group":"Types"},"format":{"group":"Types"},"image":{"group":"Types"},"number-format":{"group":"Types"},"to-string":{"group":"Types"},"to-number":{"group":"Types"},"to-boolean":{"group":"Types"},"to-rgba":{"group":"Color"},"to-color":{"group":"Types"},"rgb":{"group":"Color"},"rgba":{"group":"Color"},"get":{"group":"Lookup"},"has":{"group":"Lookup"},"length":{"group":"Lookup"},"properties":{"group":"Feature data"},"feature-state":{"group":"Feature data"},"geometry-type":{"group":"Feature data"},"id":{"group":"Feature data"},"zoom":{"group":"Camera"},"pitch":{"group":"Camera"},"distance-from-center":{"group":"Camera"},"heatmap-density":{"group":"Heatmap"},"line-progress":{"group":"Feature data"},"sky-radial-progress":{"group":"sky"},"accumulated":{"group":"Feature data"},"+":{"group":"Math"},"*":{"group":"Math"},"-":{"group":"Math"},"/":{"group":"Math"},"%":{"group":"Math"},"^":{"group":"Math"},"sqrt":{"group":"Math"},"log10":{"group":"Math"},"ln":{"group":"Math"},"log2":{"group":"Math"},"sin":{"group":"Math"},"cos":{"group":"Math"},"tan":{"group":"Math"},"asin":{"group":"Math"},"acos":{"group":"Math"},"atan":{"group":"Math"},"min":{"group":"Math"},"max":{"group":"Math"},"round":{"group":"Math"},"abs":{"group":"Math"},"ceil":{"group":"Math"},"floor":{"group":"Math"},"distance":{"group":"Math"},"==":{"group":"Decision"},"!=":{"group":"Decision"},">":{"group":"Decision"},"<":{"group":"Decision"},">=":{"group":"Decision"},"<=":{"group":"Decision"},"all":{"group":"Decision"},"any":{"group":"Decision"},"!":{"group":"Decision"},"within":{"group":"Decision"},"is-supported-script":{"group":"String"},"upcase":{"group":"String"},"downcase":{"group":"String"},"concat":{"group":"String"},"resolved-locale":{"group":"String"}}},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","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"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}; + +// +function isExpressionFilter(filter) { + if (filter === true || filter === false) { + return true; + } + if (!Array.isArray(filter) || filter.length === 0) { + return false; + } + switch (filter[0]) { + case 'has': + return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type'; + case 'in': + return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2])); + case '!in': + case '!has': + case 'none': + return false; + case '==': + case '!=': + case '>': + case '>=': + case '<': + case '<=': + return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2])); + case 'any': + case 'all': + for (const f of filter.slice(1)) { + if (!isExpressionFilter(f) && typeof f !== 'boolean') { + return false; + } + } + return true; + default: + return true; + } +} +/** + * Given a filter expressed as nested arrays, return a new function + * that evaluates whether a given feature (with a .properties or .tags property) + * passes its test. + * + * @private + * @param {Array} filter mapbox gl filter + * @param {string} layerType the type of the layer this filter will be applied to. + * @returns {Function} filter-evaluating function + */ +function createFilter(filter, layerType = 'fill') { + if (filter === null || filter === undefined) { + return { + filter: () => true, + needGeometry: false, + needFeature: false + }; + } + if (!isExpressionFilter(filter)) { + filter = convertFilter(filter); + } + const filterExp = filter; + let staticFilter = true; + try { + staticFilter = extractStaticFilter(filterExp); + } catch (e) { + console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. +This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md +and paste the contents of this message in the report. +Thank you! +Filter Expression: +${ JSON.stringify(filterExp, null, 2) } + `); + } + // Compile the static component of the filter + const filterSpec = spec[`filter_${ layerType }`]; + const compiledStaticFilter = createExpression(staticFilter, filterSpec); + let filterFunc = null; + if (compiledStaticFilter.result === 'error') { + throw new Error(compiledStaticFilter.value.map(err => `${ err.key }: ${ err.message }`).join(', ')); + } else { + filterFunc = (globalProperties, feature, canonical) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical); + } + // If the static component is not equal to the entire filter then we have a dynamic component + // Compile the dynamic component separately + let dynamicFilterFunc = null; + let needFeature = null; + if (staticFilter !== filterExp) { + const compiledDynamicFilter = createExpression(filterExp, filterSpec); + if (compiledDynamicFilter.result === 'error') { + throw new Error(compiledDynamicFilter.value.map(err => `${ err.key }: ${ err.message }`).join(', ')); + } else { + dynamicFilterFunc = (globalProperties, feature, canonical, featureTileCoord, featureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData); + needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression); + } + } + filterFunc = filterFunc; + const needGeometry = geometryNeeded(staticFilter); + return { + filter: filterFunc, + dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined, + needGeometry, + needFeature: !!needFeature + }; +} +function extractStaticFilter(filter) { + if (!isDynamicFilter(filter)) { + return filter; + } + // Shallow copy so we can replace expressions in-place + let result = deepUnbundle(filter); + // 1. Union branches + unionDynamicBranches(result); + // 2. Collapse dynamic conditions to `true` + result = collapseDynamicBooleanExpressions(result); + return result; +} +function collapseDynamicBooleanExpressions(expression) { + if (!Array.isArray(expression)) { + return expression; + } + const collapsed = collapsedExpression(expression); + if (collapsed === true) { + return collapsed; + } else { + return collapsed.map(subExpression => collapseDynamicBooleanExpressions(subExpression)); + } +} +/** + * Traverses the expression and replaces all instances of branching on a + * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`) + * into an `any` expression. + * This ensures that all possible outcomes of a `dynamic` branch are considered + * when evaluating the expression upfront during filtering. + * + * @param {Array} filter the filter expression mutated in-place. + */ +function unionDynamicBranches(filter) { + let isBranchingDynamically = false; + const branches = []; + if (filter[0] === 'case') { + for (let i = 1; i < filter.length - 1; i += 2) { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]); + branches.push(filter[i + 1]); + } + branches.push(filter[filter.length - 1]); + } else if (filter[0] === 'match') { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]); + for (let i = 2; i < filter.length - 1; i += 2) { + branches.push(filter[i + 1]); + } + branches.push(filter[filter.length - 1]); + } else if (filter[0] === 'step') { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]); + for (let i = 1; i < filter.length - 1; i += 2) { + branches.push(filter[i + 1]); + } + } + if (isBranchingDynamically) { + filter.length = 0; + filter.push('any', ...branches); + } + // traverse and recurse into children + for (let i = 1; i < filter.length; i++) { + unionDynamicBranches(filter[i]); + } +} +function isDynamicFilter(filter) { + // Base Cases + if (!Array.isArray(filter)) { + return false; + } + if (isRootExpressionDynamic(filter[0])) { + return true; + } + for (let i = 1; i < filter.length; i++) { + const child = filter[i]; + if (isDynamicFilter(child)) { + return true; + } + } + return false; +} +function isRootExpressionDynamic(expression) { + return expression === 'pitch' || expression === 'distance-from-center'; +} +const dynamicConditionExpressions = new Set([ + 'in', + '==', + '!=', + '>', + '>=', + '<', + '<=', + 'to-boolean' +]); +function collapsedExpression(expression) { + if (dynamicConditionExpressions.has(expression[0])) { + for (let i = 1; i < expression.length; i++) { + const param = expression[i]; + if (isDynamicFilter(param)) { + return true; + } + } + } + return expression; +} +// Comparison function to sort numbers and strings +function compare(a, b) { + return a < b ? -1 : a > b ? 1 : 0; +} +function geometryNeeded(filter) { + if (!Array.isArray(filter)) + return false; + if (filter[0] === 'within') + return true; + for (let index = 1; index < filter.length; index++) { + if (geometryNeeded(filter[index])) + return true; + } + return false; +} +function convertFilter(filter) { + if (!filter) + return true; + const op = filter[0]; + if (filter.length <= 1) + return op !== 'any'; + const 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; + return converted; +} +function convertComparisonOp(property, value, op) { + switch (property) { + case '$type': + return [ + `filter-type-${ op }`, + value + ]; + case '$id': + return [ + `filter-id-${ op }`, + value + ]; + default: + return [ + `filter-${ op }`, + property, + value + ]; + } +} +function convertDisjunctionOp(filters) { + return ['any'].concat(filters.map(convertFilter)); +} +function convertInOp(property, values) { + if (values.length === 0) { + return false; + } + switch (property) { + case '$type': + return [ + `filter-type-in`, + [ + 'literal', + values + ] + ]; + case '$id': + return [ + `filter-id-in`, + [ + 'literal', + values + ] + ]; + default: + if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) { + return [ + 'filter-in-large', + property, + [ + 'literal', + values.sort(compare) + ] + ]; + } else { + return [ + 'filter-in-small', + property, + [ + 'literal', + values + ] + ]; + } + } +} +function convertHasOp(property) { + switch (property) { + case '$type': + return true; + case '$id': + return [`filter-has-id`]; + default: + return [ + `filter-has`, + property + ]; + } +} +function convertNegation(filter) { + return [ + '!', + filter + ]; +} + +// +var refProperties = [ + 'type', + 'source', + 'source-layer', + 'minzoom', + 'maxzoom', + 'filter', + 'layout' +]; + +// +function deref(layer, parent) { + const result = {}; + for (const k in layer) { + if (k !== 'ref') { + result[k] = layer[k]; + } + } + refProperties.forEach(k => { + if (k in parent) { + result[k] = parent[k]; + } + }); + return result; +} +/** + * Given an array of layers, some of which may contain `ref` properties + * whose value is the `id` of another property, return a new array where + * such layers have been augmented with the 'type', 'source', etc. properties + * from the parent layer, and the `ref` property has been removed. + * + * The input is not modified. The output may contain references to portions + * of the input. + * + * @private + * @param {Array} layers + * @returns {Array} + */ +function derefLayers(layers) { + layers = layers.slice(); + const map = Object.create(null); + for (let i = 0; i < layers.length; i++) { + map[layers[i].id] = layers[i]; + } + for (let i = 0; i < layers.length; i++) { + if ('ref' in layers[i]) { + layers[i] = deref(layers[i], map[layers[i].ref]); + } + } + return layers; +} + +var fontWeights = { + thin: 100, + hairline: 100, + 'ultra-light': 100, + 'extra-light': 100, + light: 200, + book: 300, + regular: 400, + normal: 400, + plain: 400, + roman: 400, + standard: 400, + medium: 500, + 'semi-bold': 600, + 'demi-bold': 600, + bold: 700, + heavy: 800, + black: 800, + 'extra-bold': 800, + 'ultra-black': 900, + 'extra-black': 900, + 'ultra-bold': 900, + 'heavy-black': 900, + fat: 900, + poster: 900 +}; +var sp = ' '; +var italicRE = /(italic|oblique)$/i; +var fontCache = {}; +var mapboxToCssFont = function (fonts, size, lineHeight) { + var cssData = fontCache[fonts]; + if (!cssData) { + if (!Array.isArray(fonts)) { + fonts = [fonts]; + } + var weight = 400; + var style = 'normal'; + var fontFamilies = []; + var haveWeight, haveStyle; + for (var i = 0, ii = fonts.length; i < ii; ++i) { + var font = fonts[i]; + var parts = font.split(' '); + var maybeWeight = parts[parts.length - 1].toLowerCase(); + if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') { + style = haveStyle ? style : maybeWeight; + parts.pop(); + maybeWeight = parts[parts.length - 1].toLowerCase(); + } else if (italicRE.test(maybeWeight)) { + maybeWeight = maybeWeight.replace(italicRE, ''); + style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, ''); + } + for (var w in fontWeights) { + var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : ''; + if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) { + weight = haveWeight ? weight : fontWeights[w]; + parts.pop(); + if (previousPart && w.startsWith(previousPart)) { + parts.pop(); + } + break; + } + } + if (!haveWeight && typeof maybeWeight == 'number') { + weight = maybeWeight; + } + var fontFamily = parts.join(sp).replace('Klokantech Noto Sans', 'Noto Sans'); + if (fontFamily.indexOf(sp) !== -1) { + fontFamily = '"' + fontFamily + '"'; + } + fontFamilies.push(fontFamily); + } + // CSS font property: font-style font-weight font-size/line-height font-family + cssData = fontCache[fonts] = [ + style, + weight, + fontFamilies + ]; + } + return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2]; +}; + +var mb2css = /*@__PURE__*/getDefaultExportFromCjs(mapboxToCssFont); + +const mapboxBaseUrl = 'https://api.mapbox.com'; +/** + * Gets the path from a mapbox:// URL. + * @param {string} url The Mapbox URL. + * @return {string} The path. + * @private + */ +function getMapboxPath(url) { + const startsWith = 'mapbox://'; + if (url.indexOf(startsWith) !== 0) { + return ''; + } + return url.slice(startsWith.length); +} +/** + * Turns mapbox:// sprite URLs into resolvable URLs. + * @param {string} url The sprite URL. + * @param {string} token The access token. + * @param {string} styleUrl The style URL. + * @return {string} A resolvable URL. + * @private + */ +function normalizeSpriteUrl(url, token, styleUrl) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return decodeURI(new URL(url, styleUrl).href); + } + const startsWith = 'sprites/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(`unexpected sprites url: ${ url }`); + } + const sprite = mapboxPath.slice(startsWith.length); + return `${ mapboxBaseUrl }/styles/v1/${ sprite }/sprite?access_token=${ token }`; +} +/** + * Turns mapbox:// style URLs into resolvable URLs. + * @param {string} url The style URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +function normalizeStyleUrl(url, token) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return decodeURI(new URL(url, location.href).href); + } + const startsWith = 'styles/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(`unexpected style url: ${ url }`); + } + const style = mapboxPath.slice(startsWith.length); + return `${ mapboxBaseUrl }/styles/v1/${ style }?&access_token=${ token }`; +} +/** + * Turns mapbox:// source URLs into vector tile URL templates. + * @param {string} url The source URL. + * @param {string} token The access token. + * @param {string} tokenParam The access token key. + * @param {string} styleUrl The style URL. + * @return {string} A vector tile template. + * @private + */ +function normalizeSourceUrl(url, token, tokenParam, styleUrl) { + const urlObject = new URL(url, styleUrl); + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + if (!token) { + return decodeURI(urlObject.href); + } + urlObject.searchParams.set(tokenParam, token); + return decodeURI(urlObject.href); + } + if (mapboxPath === 'mapbox.satellite') { + const sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : ''; + return `https://api.mapbox.com/v4/${ mapboxPath }/{z}/{x}/{y}${ sizeFactor }.webp?access_token=${ token }`; + } + return `https://{a-d}.tiles.mapbox.com/v4/${ mapboxPath }/{z}/{x}/{y}.vector.pbf?access_token=${ token }`; +} + +/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */ +/** @typedef {import("ol").Map} Map */ +/** @typedef {import("ol/layer").Layer} Layer */ +/** @typedef {import("ol/layer").Group} LayerGroup */ +/** @typedef {import("ol/layer").Vector} VectorLayer */ +/** @typedef {import("ol/layer").VectorTile} VectorTileLayer */ +/** @typedef {import("ol/source").Source} Source */ +const functionCacheByStyleId = {}; +const filterCacheByStyleId = {}; +let styleId = 0; +function getStyleId(glStyle) { + if (!glStyle.id) { + glStyle.id = styleId++; + } + return glStyle.id; +} +function getStyleFunctionKey(glStyle, olLayer) { + return getStyleId(glStyle) + '.' + getUid(olLayer); +} +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Function cache. + */ +function getFunctionCache(glStyle) { + let functionCache = functionCacheByStyleId[glStyle.id]; + if (!functionCache) { + functionCache = {}; + functionCacheByStyleId[getStyleId(glStyle)] = functionCache; + } + return functionCache; +} +function clearFunctionCache() { + for (const key in functionCacheByStyleId) { + delete functionCacheByStyleId[key]; + } +} +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Filter cache. + */ +function getFilterCache(glStyle) { + let filterCache = filterCacheByStyleId[glStyle.id]; + if (!filterCache) { + filterCache = {}; + filterCacheByStyleId[getStyleId(glStyle)] = filterCache; + } + return filterCache; +} +function deg2rad(degrees) { + return degrees * Math.PI / 180; +} +const defaultResolutions = (function () { + const resolutions = []; + for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) { + resolutions.push(res); + } + return resolutions; +}()); +/** + * @param {number} width Width of the canvas. + * @param {number} height Height of the canvas. + * @return {HTMLCanvasElement} Canvas. + */ +function createCanvas(width, height) { + if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { + // eslint-disable-line + return new OffscreenCanvas(width, height); + } + const canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; +} +function getZoomForResolution(resolution, resolutions) { + let i = 0; + const ii = resolutions.length; + for (; i < ii; ++i) { + const candidate = resolutions[i]; + if (candidate < resolution && i + 1 < ii) { + const zoomFactor = resolutions[i] / resolutions[i + 1]; + return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor); + } + } + return ii - 1; +} +const pendingRequests = {}; +/** + * @param {ResourceType} resourceType Type of resource to load. + * @param {string} url Url of the resource. + * @param {Options} [options={}] Options. + * @param {{request?: Request}} [metadata] Object to be filled with the request. + * @return {Promise} Promise that resolves with the loaded resource + * or rejects with the Response object. + * @private + */ +function fetchResource(resourceType, url, options = {}, metadata) { + if (url in pendingRequests) { + if (metadata) { + metadata.request = pendingRequests[url][0]; + } + return pendingRequests[url][1]; + } + let transformedRequest = options.transformRequest ? options.transformRequest(url, resourceType) || url : url; + if (!(transformedRequest instanceof Request)) { + transformedRequest = new Request(transformedRequest); + } + if (!transformedRequest.headers.get('Accept')) { + transformedRequest.headers.set('Accept', 'application/json'); + } + if (metadata) { + metadata.request = transformedRequest; + } + const pendingRequest = fetch(transformedRequest).then(function (response) { + delete pendingRequests[url]; + return response.ok ? response.json() : Promise.reject(new Error('Error fetching source ' + url)); + }).catch(function (error) { + delete pendingRequests[url]; + return Promise.reject(new Error('Error fetching source ' + url)); + }); + pendingRequests[url] = [ + transformedRequest, + pendingRequest + ]; + return pendingRequest; +} +function getGlStyle(glStyleOrUrl, options) { + if (typeof glStyleOrUrl === 'string') { + if (glStyleOrUrl.trim().startsWith('{')) { + try { + const glStyle = JSON.parse(glStyleOrUrl); + return Promise.resolve(glStyle); + } catch (error) { + return Promise.reject(error); + } + } else { + glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken); + return fetchResource('Style', glStyleOrUrl, options); + } + } else { + return Promise.resolve(glStyleOrUrl); + } +} +const tilejsonCache = {}; +/** + * @param {Object} glSource glStyle source object. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Promise<{tileJson: Object, tileLoadFunction: import('ol/Tile.js').LoadFunction}?>} TileJson and load function + */ +function getTileJson(glSource, styleUrl, options = {}) { + const cacheKey = [ + styleUrl, + JSON.stringify(glSource) + ].toString(); + let promise = tilejsonCache[cacheKey]; + if (!promise || options.transformRequest) { + let tileLoadFunction; + if (options.transformRequest) { + tileLoadFunction = (tile, src) => { + const transformedRequest = options.transformRequest ? options.transformRequest(src, 'Tiles') || src : src; + if (tile instanceof VectorTile) { + tile.setLoader((extent, resolution, projection) => { + fetch(transformedRequest).then(response => response.arrayBuffer()).then(data => { + const format = tile.getFormat(); + const features = format.readFeatures(data, { + extent: extent, + featureProjection: projection + }); + // @ts-ignore + tile.setFeatures(features); + }).catch(e => tile.setState(TileState.ERROR)); + }); + } else { + const img = tile.getImage(); + if (transformedRequest instanceof Request) { + fetch(transformedRequest).then(response => response.blob()).then(blob => { + const url = URL.createObjectURL(blob); + img.addEventListener('load', () => URL.revokeObjectURL(url)); + img.addEventListener('error', () => URL.revokeObjectURL(url)); + img.src = url; + }).catch(e => tile.setState(TileState.ERROR)); + } else { + img.src = transformedRequest; + } + } + }; + } + const url = glSource.url; + if (url && !glSource.tiles) { + const normalizedSourceUrl = normalizeSourceUrl(url, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href); + if (url.startsWith('mapbox://')) { + promise = Promise.resolve({ + tileJson: Object.assign({}, glSource, { + url: undefined, + tiles: expandUrl(normalizedSourceUrl) + }), + tileLoadFunction + }); + } else { + const metadata = {}; + promise = fetchResource('Source', normalizedSourceUrl, options, metadata).then(function (tileJson) { + tileJson.tiles = tileJson.tiles.map(function (tileUrl) { + if (tileJson.scheme === 'tms') { + tileUrl = tileUrl.replace('{y}', '{-y}'); + } + return normalizeSourceUrl(tileUrl, options.accessToken, options.accessTokenParam || 'access_token', metadata.request.url); + }); + return Promise.resolve({ + tileJson, + tileLoadFunction + }); + }); + } + } else { + glSource = Object.assign({}, glSource, { + tiles: glSource.tiles.map(function (tileUrl) { + if (glSource.scheme === 'tms') { + tileUrl = tileUrl.replace('{y}', '{-y}'); + } + return normalizeSourceUrl(tileUrl, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href); + }) + }); + promise = Promise.resolve({ + tileJson: Object.assign({}, glSource), + tileLoadFunction + }); + } + tilejsonCache[cacheKey] = promise; + } + return promise; +} +/** + * @param {HTMLImageElement|HTMLCanvasElement} spriteImage Sprite image id. + * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data. + * @param {number} haloWidth Halo width. + * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color. + * @return {HTMLCanvasElement} Canvas element with the halo. + */ +function drawIconHalo(spriteImage, spriteImageData, haloWidth, haloColor) { + const imageCanvas = document.createElement('canvas'); + const imgSize = [ + 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width, + 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height + ]; + imageCanvas.width = imgSize[0]; + imageCanvas.height = imgSize[1]; + const imageContext = imageCanvas.getContext('2d'); + imageContext.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, haloWidth * spriteImageData.pixelRatio, haloWidth * spriteImageData.pixelRatio, spriteImageData.width, spriteImageData.height); + const imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]); + imageContext.globalCompositeOperation = 'destination-over'; + imageContext.fillStyle = `rgba(${ haloColor.r * 255 },${ haloColor.g * 255 },${ haloColor.b * 255 },${ haloColor.a })`; + const data = imageData.data; + for (let i = 0, ii = imageData.width; i < ii; ++i) { + for (let j = 0, jj = imageData.height; j < jj; ++j) { + const index = (j * ii + i) * 4; + const alpha = data[index + 3]; + if (alpha > 0) { + imageContext.arc(i, j, haloWidth * spriteImageData.pixelRatio, 0, 2 * Math.PI); + } + } + } + imageContext.fill(); + return imageCanvas; +} +function smoothstep(min, max, value) { + const x = Math.max(0, Math.min(1, (value - min) / (max - min))); + return x * x * (3 - 2 * x); +} +/** + * @param {HTMLImageElement} image SDF image + * @param {{x: number, y: number, width: number, height: number}} area Area to unSDF + * @param {{r: number, g: number, b: number, a: number}} color Color to use + * @return {HTMLCanvasElement} Regular image + */ +function drawSDF(image, area, color) { + const imageCanvas = document.createElement('canvas'); + imageCanvas.width = area.width; + imageCanvas.height = area.height; + const imageContext = imageCanvas.getContext('2d'); + imageContext.drawImage(image, area.x, area.y, area.width, area.height, 0, 0, area.width, area.height); + const imageData = imageContext.getImageData(0, 0, area.width, area.height); + const data = imageData.data; + for (let i = 0, ii = imageData.width; i < ii; ++i) { + for (let j = 0, jj = imageData.height; j < jj; ++j) { + const index = (j * ii + i) * 4; + const dist = data[index + 3] / 255; + const buffer = 0.75; + const gamma = 0.1; + const alpha = smoothstep(buffer - gamma, buffer + gamma, dist); + if (alpha > 0) { + data[index + 0] = Math.round(255 * color.r * alpha); + data[index + 1] = Math.round(255 * color.g * alpha); + data[index + 2] = Math.round(255 * color.b * alpha); + data[index + 3] = Math.round(255 * alpha); + } else { + data[index + 3] = 0; + } + } + } + imageContext.putImageData(imageData, 0, 0); + return imageCanvas; +} /** + * @typedef {import("./apply.js").Options} Options + * @private + */ + +const hairSpacePool = Array(256).join('\u200A'); +function applyLetterSpacing(text, letterSpacing) { + if (letterSpacing >= 0.05) { + let textWithLetterSpacing = ''; + const lines = text.split('\n'); + const joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1)); + for (let l = 0, ll = lines.length; l < ll; ++l) { + if (l > 0) { + textWithLetterSpacing += '\n'; + } + textWithLetterSpacing += lines[l].split('').join(joinSpaceString); + } + return textWithLetterSpacing; + } + return text; +} +let measureContext; +function getMeasureContext() { + if (!measureContext) { + measureContext = createCanvas(1, 1).getContext('2d'); + } + return measureContext; +} +function measureText(text, letterSpacing) { + return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing; +} +const measureCache = {}; +function wrapText(text, font, em, letterSpacing) { + if (text.indexOf('\n') !== -1) { + const hardLines = text.split('\n'); + const lines = []; + for (let i = 0, ii = hardLines.length; i < ii; ++i) { + lines.push(wrapText(hardLines[i], font, em, letterSpacing)); + } + return lines.join('\n'); + } + const key = em + ',' + font + ',' + text + ',' + letterSpacing; + let wrappedText = measureCache[key]; + if (!wrappedText) { + const words = text.split(' '); + if (words.length > 1) { + const ctx = getMeasureContext(); + ctx.font = font; + const oneEm = ctx.measureText('M').width; + const maxWidth = oneEm * em; + let line = ''; + const lines = []; + // Pass 1 - wrap lines to not exceed maxWidth + for (let i = 0, ii = words.length; i < ii; ++i) { + const word = words[i]; + const testLine = line + (line ? ' ' : '') + word; + if (measureText(testLine, letterSpacing) <= maxWidth) { + line = testLine; + } else { + if (line) { + lines.push(line); + } + line = word; + } + } + if (line) { + lines.push(line); + } + // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line + for (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) { + const line = lines[i]; + if (measureText(line, letterSpacing) < maxWidth * 0.35) { + const prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity; + const nextWidth = i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity; + lines.splice(i, 1); + ii -= 1; + if (prevWidth < nextWidth) { + lines[i - 1] += ' ' + line; + i -= 1; + } else { + lines[i] = line + ' ' + lines[i]; + } + } + } + // Pass 3 - try to fill 80% of maxWidth for each line + for (let i = 0, ii = lines.length - 1; i < ii; ++i) { + const line = lines[i]; + const next = lines[i + 1]; + if (measureText(line, letterSpacing) > maxWidth * 0.7 && measureText(next, letterSpacing) < maxWidth * 0.6) { + const lineWords = line.split(' '); + const lastWord = lineWords.pop(); + if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) { + lines[i] = lineWords.join(' '); + lines[i + 1] = lastWord + ' ' + next; + } + ii -= 1; + } + } + wrappedText = lines.join('\n'); + } else { + wrappedText = text; + } + wrappedText = applyLetterSpacing(wrappedText, letterSpacing); + measureCache[key] = wrappedText; + } + return wrappedText; +} +const fontFamilyRegEx = /font-family: ?([^;]*);/; +const stripQuotesRegEx = /("|')/g; +let loadedFontFamilies; +function hasFontFamily(family) { + if (!loadedFontFamilies) { + loadedFontFamilies = {}; + const styleSheets = document.styleSheets; + for (let i = 0, ii = styleSheets.length; i < ii; ++i) { + const styleSheet = styleSheets[i]; + try { + const cssRules = styleSheet.rules || styleSheet.cssRules; + if (cssRules) { + for (let j = 0, jj = cssRules.length; j < jj; ++j) { + const cssRule = cssRules[j]; + if (cssRule.type == 5) { + const match = cssRule.cssText.match(fontFamilyRegEx); + loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true; + } + } + } + } catch (e) { + } + } + } + return family in loadedFontFamilies; +} +const processedFontFamilies = {}; +/** + * @param {Array} fonts Fonts. + * @param {string} [templateUrl] Template URL. + * @return {Array} Processed fonts. + * @private + */ +function getFonts(fonts, templateUrl = 'https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css') { + const fontsKey = fonts.toString(); + if (fontsKey in processedFontFamilies) { + return processedFontFamilies[fontsKey]; + } + const fontDescriptions = []; + for (let i = 0, ii = fonts.length; i < ii; ++i) { + fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial'); + const font = fonts[i]; + const cssFont = mb2css(font, 1); + registerFont(cssFont); + const parts = cssFont.split(' '); + fontDescriptions.push([ + parts.slice(3).join(' ').replace(/"/g, ''), + parts[1], + parts[0] + ]); + } + for (let i = 0, ii = fontDescriptions.length; i < ii; ++i) { + const fontDescription = fontDescriptions[i]; + const family = fontDescription[0]; + if (!hasFontFamily(family)) { + if (checkedFonts.get(`${ fontDescription[2] }\n${ fontDescription[1] } \n${ family }`) !== 100) { + const fontUrl = templateUrl.replace('{font-family}', family.replace(/ /g, '-').toLowerCase()).replace('{Font+Family}', family.replace(/ /g, '+')).replace('{fontweight}', fontDescription[1]).replace('{-fontstyle}', fontDescription[2].replace('normal', '').replace(/(.+)/, '-$1')).replace('{fontstyle}', fontDescription[2]); + if (!document.querySelector('link[href="' + fontUrl + '"]')) { + const markup = document.createElement('link'); + markup.href = fontUrl; + markup.rel = 'stylesheet'; + document.head.appendChild(markup); + } + } + } + } + processedFontFamilies[fontsKey] = fonts; + return fonts; +} + +/* +ol-mapbox-style - Use Mapbox Style objects with OpenLayers +Copyright 2016-present ol-mapbox-style contributors +License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE +*/ +/** + * @typedef {import("ol/layer/Vector").default} VectorLayer + * @typedef {import("ol/layer/VectorTile").default} VectorTileLayer + * @typedef {import("ol/style/Style").StyleFunction} StyleFunction + * @typedef {import('./util.js').ResourceType} ResourceType + */ +const types = { + 'Point': 1, + 'MultiPoint': 1, + 'LineString': 2, + 'MultiLineString': 2, + 'Polygon': 3, + 'MultiPolygon': 3 +}; +const anchor = { + 'center': [ + 0.5, + 0.5 + ], + 'left': [ + 0, + 0.5 + ], + 'right': [ + 1, + 0.5 + ], + 'top': [ + 0.5, + 0 + ], + 'bottom': [ + 0.5, + 1 + ], + 'top-left': [ + 0, + 0 + ], + 'top-right': [ + 1, + 0 + ], + 'bottom-left': [ + 0, + 1 + ], + 'bottom-right': [ + 1, + 1 + ] +}; +const expressionData = function (rawExpression, propertySpec) { + const compiledExpression = createPropertyExpression(rawExpression, propertySpec); + if (compiledExpression.result === 'error') { + throw new Error(compiledExpression.value.map(err => `${ err.key }: ${ err.message }`).join(', ')); + } + return compiledExpression.value; +}; +const emptyObj$1 = {}; +const zoomObj = { zoom: 0 }; +let renderFeatureCoordinates, renderFeature; +/** + * @private + * @param {Object} layer Gl object layer. + * @param {string} layoutOrPaint 'layout' or 'paint'. + * @param {string} property Feature property. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @param {Object} [featureState] Feature state. + * @return {?} Value. + */ +function getValue(layer, layoutOrPaint, property, zoom, feature, functionCache, featureState) { + const layerId = layer.id; + if (!functionCache) { + functionCache = {}; + console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console + } + if (!functionCache[layerId]) { + functionCache[layerId] = {}; + } + const functions = functionCache[layerId]; + if (!functions[property]) { + let value = (layer[layoutOrPaint] || emptyObj$1)[property]; + const propertySpec = spec[`${ layoutOrPaint }_${ layer.type }`][property]; + if (value === undefined) { + value = propertySpec.default; + } + let isExpr = isExpression(value); + if (!isExpr && isFunction(value)) { + value = convertFunction(value, propertySpec); + isExpr = true; + } + if (isExpr) { + const compiledExpression = expressionData(value, propertySpec); + functions[property] = compiledExpression.evaluate.bind(compiledExpression); + } else { + if (propertySpec.type == 'color') { + value = Color$1.parse(value); + } + functions[property] = function () { + return value; + }; + } + } + zoomObj.zoom = zoom; + return functions[property](zoomObj, feature, featureState); +} +/** + * @private + * @param {Object} layer Gl object layer. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @return {"declutter"|"obstacle"|"none"} Value. + */ +function getIconDeclutterMode(layer, zoom, feature, functionCache) { + const allowOverlap = getValue(layer, 'layout', 'icon-allow-overlap', zoom, feature, functionCache); + if (!allowOverlap) { + return 'declutter'; + } + const ignorePlacement = getValue(layer, 'layout', 'icon-ignore-placement', zoom, feature, functionCache); + if (!ignorePlacement) { + return 'obstacle'; + } + return 'none'; +} +/** + * @private + * @param {string} layerId Layer id. + * @param {?} filter Filter. + * @param {Object} feature Feature. + * @param {number} zoom Zoom. + * @param {Object} [filterCache] Filter cache. + * @return {boolean} Filter result. + */ +function evaluateFilter(layerId, filter, feature, zoom, filterCache) { + if (!filterCache) { + console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console + } + if (!(layerId in filterCache)) { + filterCache[layerId] = createFilter(filter).filter; + } + zoomObj.zoom = zoom; + return filterCache[layerId](zoomObj, feature); +} +let renderTransparentEnabled = false; +/** + * Configure whether features with a transparent style should be rendered. When + * set to `true`, it will be possible to hit detect content that is not visible, + * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or + * `ol/Map#getFeaturesAtPixel()` + * @param {boolean} enabled Rendering of transparent elements is enabled. + * Default is `false`. + */ +function renderTransparent(enabled) { + if (enabled !== renderTransparentEnabled) { + clearFunctionCache(); + renderTransparentEnabled = enabled; + } +} +/** + * @private + * @param {?} color Color. + * @param {number} [opacity] Opacity. + * @return {string} Color. + */ +function colorWithOpacity(color, opacity) { + if (color) { + if (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) { + return undefined; + } + const a = color.a; + opacity = opacity === undefined ? 1 : opacity; + return a === 0 ? 'transparent' : 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) + ',' + Math.round(color.b * 255 / a) + ',' + a * opacity + ')'; + } + return color; +} +const templateRegEx = /\{[^{}}]*\}/g; +/** + * @private + * @param {string} text Text. + * @param {Object} properties Properties. + * @return {string} Text. + */ +function fromTemplate(text, properties) { + return text.replace(templateRegEx, function (match) { + return properties[match.slice(1, -1)] || ''; + }); +} +let recordLayer = false; +/** + * Turns recording of the Mapbox Style's `layer` on and off. When turned on, + * the layer that a rendered feature belongs to will be set as the feature's + * `mapbox-layer` property. + * @param {boolean} record Recording of the style layer is on. + */ +function recordStyleLayer(record = false) { + recordLayer = record; +} +const styleFunctionArgs = {}; +/** + * Creates a style function from the `glStyle` object for all layers that use + * the specified `source`, which needs to be a `"type": "vector"` or + * `"type": "geojson"` source and applies it to the specified OpenLayers layer. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function also works in a web worker. In worker mode, the main thread needs + * to listen to messages from the worker and respond with another message to make + * sure that sprite image loading works: + * + * ```js + * worker.addEventListener('message', event => { + * if (event.data.action === 'loadImage') { + * const image = new Image(); + * image.crossOrigin = 'anonymous'; + * image.addEventListener('load', function() { + * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { + * worker.postMessage({ + * action: 'imageLoaded', + * image: imageBitmap, + * src: event.data.src + * }, [imageBitmap]); + * }); + * }); + * image.src = event.data.src; + * } + * }); + * ``` + * + * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to + * apply the style to. In addition to the style, the layer will get two + * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used + * for the layer, and `mapbox-layers` will be an array of the `id`s of the + * `glStyle`'s layers. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array} sourceOrLayers `source` key or an array of layer `id`s + * from the Mapbox Style object. When a `source` key is provided, all layers for + * the specified source will be included in the style function. When layer `id`s + * are provided, they must be from layers that use the same source. + * @param {Array} resolutions + * Resolutions for mapping resolution to zoom level. + * @param {Object} spriteData Sprite data from the url specified in + * the Mapbox Style object's `sprite` property. Only required if a `sprite` + * property is specified in the Mapbox Style object. + * @param {string|Request} spriteImageUrl Sprite image url for the sprite + * specified in the Mapbox Style object's `sprite` property. Only required if a + * `sprite` property is specified in the Mapbox Style object. + * @param {function(Array, string=):Array} getFonts Function that + * receives a font stack and the url template from the GL style's `metadata['ol:webfonts']` + * property (if set) as arguments, and returns a (modified) font stack that + * is available. Font names are the names used in the Mapbox Style object. If + * not provided, the font stack will be used as-is. This function can also be + * used for loading web fonts. + * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function can be used for icons not in the sprite or to override sprite icons. + * @return {StyleFunction} Style function for use in + * `ol.layer.Vector` or `ol.layer.VectorTile`. + */ +function stylefunction(olLayer, glStyle, sourceOrLayers, resolutions = defaultResolutions, spriteData = undefined, spriteImageUrl = undefined, getFonts = undefined, getImage = undefined) { + if (typeof glStyle == 'string') { + glStyle = JSON.parse(glStyle); + } + if (glStyle.version != 8) { + throw new Error('glStyle version 8 required.'); + } + styleFunctionArgs[getStyleFunctionKey(glStyle, olLayer)] = Array.from(arguments); + let spriteImage, spriteImageSize; + let spriteImageUnSDFed; + if (spriteImageUrl) { + if (typeof Image !== 'undefined') { + const img = new Image(); + let blobUrl; + if (spriteImageUrl instanceof Request) { + fetch(spriteImageUrl).then(response => response.blob()).then(blob => { + blobUrl = URL.createObjectURL(blob); + img.src = blobUrl; + }).catch(() => { + }); + } else { + img.crossOrigin = 'anonymous'; + img.src = spriteImageUrl; + if (blobUrl) { + URL.revokeObjectURL(blobUrl); + } + } + img.onload = function () { + spriteImage = img; + spriteImageSize = [ + img.width, + img.height + ]; + olLayer.changed(); + img.onload = null; + }; + } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { + //eslint-disable-line + const worker = self; + // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded' + worker.postMessage({ + action: 'loadImage', + src: spriteImageUrl + }); + worker.addEventListener('message', function handler(event) { + if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) { + spriteImage = event.data.image; + spriteImageSize = [ + spriteImage.width, + spriteImage.height + ]; + } + }); + } + } + const allLayers = derefLayers(glStyle.layers); + const layersBySourceLayer = {}; + const mapboxLayers = []; + const iconImageCache = {}; + const patternCache = {}; + const functionCache = getFunctionCache(glStyle); + const filterCache = getFilterCache(glStyle); + let mapboxSource; + for (let i = 0, ii = allLayers.length; i < ii; ++i) { + const layer = allLayers[i]; + const layerId = layer.id; + if (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers || sourceOrLayers.indexOf(layerId) !== -1) { + const sourceLayer = layer['source-layer']; + if (!mapboxSource) { + mapboxSource = layer.source; + const source = glStyle.sources[mapboxSource]; + if (!source) { + throw new Error(`Source "${ mapboxSource }" is not defined`); + } + const type = source.type; + if (type !== 'vector' && type !== 'geojson') { + throw new Error(`Source "${ mapboxSource }" is not of type "vector" or "geojson", but "${ type }"`); + } + } else if (layer.source !== mapboxSource) { + throw new Error(`Layer "${ layerId }" does not use source "${ mapboxSource }`); + } + let layers = layersBySourceLayer[sourceLayer]; + if (!layers) { + layers = []; + layersBySourceLayer[sourceLayer] = layers; + } + layers.push({ + layer: layer, + index: i + }); + mapboxLayers.push(layerId); + } + } + const textHalo = new Stroke(); + const textColor = new Fill(); + const styles = []; + /** + * @param {import("ol/Feature").default|import("ol/render/Feature").default} feature Feature. + * @param {number} resolution Resolution. + * @param {string} [onlyLayer] Calculate style for this layer only. + * @return {Array} Style. + */ + const styleFunction = function (feature, resolution, onlyLayer) { + const properties = feature.getProperties(); + const layers = layersBySourceLayer[properties.layer]; + if (!layers) { + return undefined; + } + let zoom = resolutions.indexOf(resolution); + if (zoom == -1) { + zoom = getZoomForResolution(resolution, resolutions); + } + const type = types[feature.getGeometry().getType()]; + const f = { + id: feature.getId(), + properties: properties, + type: type + }; + const featureState = olLayer.get('mapbox-featurestate')[feature.getId()]; + let stylesLength = -1; + let featureBelongsToLayer; + for (let i = 0, ii = layers.length; i < ii; ++i) { + const layerData = layers[i]; + const layer = layerData.layer; + const layerId = layer.id; + if (onlyLayer !== undefined && onlyLayer !== layerId) { + continue; + } + const layout = layer.layout || emptyObj$1; + const paint = layer.paint || emptyObj$1; + if (layout.visibility === 'none' || 'minzoom' in layer && zoom < layer.minzoom || 'maxzoom' in layer && zoom >= layer.maxzoom) { + continue; + } + const filter = layer.filter; + if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) { + featureBelongsToLayer = layer; + let color, opacity, fill, stroke, strokeColor, style; + const index = layerData.index; + if (type == 3 && (layer.type == 'fill' || layer.type == 'fill-extrusion')) { + opacity = getValue(layer, 'paint', layer.type + '-opacity', zoom, f, functionCache, featureState); + if (layer.type + '-pattern' in paint) { + const fillIcon = getValue(layer, 'paint', layer.type + '-pattern', zoom, f, functionCache, featureState); + if (fillIcon) { + const icon = typeof fillIcon === 'string' ? fromTemplate(fillIcon, properties) : fillIcon.toString(); + if (spriteImage && spriteData && spriteData[icon]) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getFill() || style.getStroke() || style.getText()) { + style = new Style({ fill: new Fill() }); + styles[stylesLength] = style; + } + fill = style.getFill(); + style.setZIndex(index); + const icon_cache_key = icon + '.' + opacity; + let pattern = patternCache[icon_cache_key]; + if (!pattern) { + const spriteImageData = spriteData[icon]; + const canvas = createCanvas(spriteImageData.width, spriteImageData.height); + const ctx = canvas.getContext('2d'); + ctx.globalAlpha = opacity; + ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height); + pattern = ctx.createPattern(canvas, 'repeat'); + patternCache[icon_cache_key] = pattern; + } + fill.setColor(pattern); + } + } + } else { + color = colorWithOpacity(getValue(layer, 'paint', layer.type + '-color', zoom, f, functionCache, featureState), opacity); + if (layer.type + '-outline-color' in paint) { + strokeColor = colorWithOpacity(getValue(layer, 'paint', layer.type + '-outline-color', zoom, f, functionCache, featureState), opacity); + } + if (!strokeColor) { + strokeColor = color; + } + if (color || strokeColor) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || color && !style.getFill() || !color && style.getFill() || strokeColor && !style.getStroke() || !strokeColor && style.getStroke() || style.getText()) { + style = new Style({ + fill: color ? new Fill() : undefined, + stroke: strokeColor ? new Stroke() : undefined + }); + styles[stylesLength] = style; + } + if (color) { + fill = style.getFill(); + fill.setColor(color); + } + if (strokeColor) { + stroke = style.getStroke(); + stroke.setColor(strokeColor); + stroke.setWidth(0.5); + } + style.setZIndex(index); + } + } + } + if (type != 1 && layer.type == 'line') { + color = !('line-pattern' in paint) && 'line-color' in paint ? colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'line-opacity', zoom, f, functionCache, featureState)) : undefined; + const width = getValue(layer, 'paint', 'line-width', zoom, f, functionCache, featureState); + if (color && width > 0) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getStroke() || style.getFill() || style.getText()) { + style = new Style({ stroke: new Stroke() }); + styles[stylesLength] = style; + } + stroke = style.getStroke(); + stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f, functionCache, featureState)); + stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f, functionCache, featureState)); + stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f, functionCache, featureState)); + stroke.setColor(color); + stroke.setWidth(width); + stroke.setLineDash(paint['line-dasharray'] ? getValue(layer, 'paint', 'line-dasharray', zoom, f, functionCache, featureState).map(function (x) { + return x * width; + }) : null); + style.setZIndex(index); + } + } + let hasImage = false; + let text = null; + let placementAngle = 0; + let icon, iconImg, skipLabel; + if ((type == 1 || type == 2) && 'icon-image' in layout) { + const iconImage = getValue(layer, 'layout', 'icon-image', zoom, f, functionCache, featureState); + if (iconImage) { + icon = typeof iconImage === 'string' ? fromTemplate(iconImage, properties) : iconImage.toString(); + let styleGeom = undefined; + const imageElement = getImage ? getImage(olLayer, icon) : undefined; + if (spriteImage && spriteData && spriteData[icon] || imageElement) { + const iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f, functionCache, featureState); + if (type == 2) { + const geom = feature.getGeometry(); + // ol package and ol-debug.js only + if (geom.getFlatMidpoint || geom.getFlatMidpoints) { + const extent = geom.getExtent(); + const size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] - extent[1]) / resolution, 2))); + if (size > 150) { + //FIXME Do not hard-code a size of 150 + const midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint(); + if (!renderFeature) { + renderFeatureCoordinates = [ + NaN, + NaN + ]; + renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null); + } + styleGeom = renderFeature; + renderFeatureCoordinates[0] = midpoint[0]; + renderFeatureCoordinates[1] = midpoint[1]; + const placement = getValue(layer, 'layout', 'symbol-placement', zoom, f, functionCache, featureState); + if (placement === 'line' && iconRotationAlignment === 'map') { + const stride = geom.getStride(); + const coordinates = geom.getFlatCoordinates(); + for (let i = 0, ii = coordinates.length - stride; i < ii; i += stride) { + const x1 = coordinates[i]; + const y1 = coordinates[i + 1]; + const x2 = coordinates[i + stride]; + const y2 = coordinates[i + stride + 1]; + const minX = Math.min(x1, x2); + const minY = Math.min(y1, y2); + const maxX = Math.max(x1, x2); + const maxY = Math.max(y1, y2); + if (midpoint[0] >= minX && midpoint[0] <= maxX && midpoint[1] >= minY && midpoint[1] <= maxY) { + placementAngle = Math.atan2(y1 - y2, x2 - x1); + break; + } + } + } + } + } + } + if (type !== 2 || styleGeom) { + const iconSize = getValue(layer, 'layout', 'icon-size', zoom, f, functionCache, featureState); + const iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f, functionCache, featureState) : null; + if (!iconColor || iconColor.a !== 0) { + const haloColor = getValue(layer, 'paint', 'icon-halo-color', zoom, f, functionCache, featureState); + const haloWidth = getValue(layer, 'paint', 'icon-halo-width', zoom, f, functionCache, featureState); + let iconCacheKey = `${ icon }.${ iconSize }.${ haloWidth }.${ haloColor }`; + if (iconColor !== null) { + iconCacheKey += `.${ iconColor }`; + } + iconImg = iconImageCache[iconCacheKey]; + if (!iconImg) { + const declutterMode = getIconDeclutterMode(layer, zoom, f, functionCache); + let displacement; + if ('icon-offset' in layout) { + displacement = getValue(layer, 'layout', 'icon-offset', zoom, f, functionCache, featureState).slice(0); + displacement[1] *= -1; + } + let color = iconColor ? [ + iconColor.r * 255, + iconColor.g * 255, + iconColor.b * 255, + iconColor.a + ] : undefined; + if (imageElement) { + const iconOptions = { + color: color, + rotateWithView: iconRotationAlignment === 'map', + displacement: displacement, + declutterMode: declutterMode + }; + if (typeof imageElement === 'string') { + // it is a src URL + iconOptions.src = imageElement; + } else { + iconOptions.img = imageElement; + iconOptions.imgSize = [ + imageElement.width, + imageElement.height + ]; + } + iconImg = new Icon(iconOptions); + } else { + const spriteImageData = spriteData[icon]; + let img, size, offset; + if (haloWidth) { + if (spriteImageData.sdf) { + img = drawIconHalo(drawSDF(spriteImage, spriteImageData, iconColor), { + x: 0, + y: 0, + width: spriteImageData.width, + height: spriteImageData.height, + pixelRatio: spriteImageData.pixelRatio + }, haloWidth, haloColor); + color = undefined; // do not tint haloed icons + } else { + img = drawIconHalo(spriteImage, spriteImageData, haloWidth, haloColor); + } + } else { + if (spriteImageData.sdf) { + if (!spriteImageUnSDFed) { + spriteImageUnSDFed = drawSDF(spriteImage, { + x: 0, + y: 0, + width: spriteImageSize[0], + height: spriteImageSize[1] + }, { + r: 1, + g: 1, + b: 1, + a: 1 + }); + } + img = spriteImageUnSDFed; + } else { + img = spriteImage; + } + size = [ + spriteImageData.width, + spriteImageData.height + ]; + offset = [ + spriteImageData.x, + spriteImageData.y + ]; + } + iconImg = new Icon({ + color: color, + img: img, + // @ts-ignore + imgSize: spriteImageSize, + size: size, + offset: offset, + rotateWithView: iconRotationAlignment === 'map', + scale: iconSize / spriteImageData.pixelRatio, + displacement: displacement, + declutterMode: declutterMode + }); + } + iconImageCache[iconCacheKey] = iconImg; + } + } + if (iconImg) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getImage() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + style.setGeometry(styleGeom); + iconImg.setRotation(placementAngle + deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f, functionCache, featureState))); + iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f, functionCache, featureState)); + iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f, functionCache, featureState)]); + style.setImage(iconImg); + text = style.getText(); + style.setText(undefined); + style.setZIndex(index); + hasImage = true; + skipLabel = false; + } + } else { + skipLabel = true; + } + } + } + } + if (type == 1 && layer.type === 'circle') { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getImage() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + const circleRadius = 'circle-radius' in paint ? getValue(layer, 'paint', 'circle-radius', zoom, f, functionCache, featureState) : 5; + const circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f, functionCache, featureState)); + const circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'circle-opacity', zoom, f, functionCache, featureState)); + const circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f, functionCache, featureState); + const cache_key = circleRadius + '.' + circleStrokeColor + '.' + circleColor + '.' + circleStrokeWidth; + iconImg = iconImageCache[cache_key]; + if (!iconImg) { + iconImg = new Circle({ + radius: circleRadius, + stroke: circleStrokeColor && circleStrokeWidth > 0 ? new Stroke({ + width: circleStrokeWidth, + color: circleStrokeColor + }) : undefined, + fill: circleColor ? new Fill({ color: circleColor }) : undefined, + declutterMode: 'none' + }); + iconImageCache[cache_key] = iconImg; + } + style.setImage(iconImg); + text = style.getText(); + style.setText(undefined); + style.setGeometry(undefined); + style.setZIndex(index); + hasImage = true; + } + let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth; + if ('text-field' in layout) { + textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f, functionCache, featureState)); + const fontArray = getValue(layer, 'layout', 'text-font', zoom, f, functionCache, featureState); + textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f, functionCache, featureState); + font = mb2css(getFonts ? getFonts(fontArray, glStyle.metadata ? glStyle.metadata['ol:webfonts'] : undefined) : fontArray, textSize, textLineHeight); + if (!font.includes('sans-serif')) { + font += ',sans-serif'; + } + letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f, functionCache, featureState); + maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f, functionCache, featureState); + const textField = getValue(layer, 'layout', 'text-field', zoom, f, functionCache, featureState); + if (typeof textField === 'object' && textField.sections) { + if (textField.sections.length === 1) { + label = textField.toString(); + } else { + label = textField.sections.reduce((acc, chunk, i) => { + const fonts = chunk.fontStack ? chunk.fontStack.split(',') : fontArray; + const chunkFont = mb2css(getFonts ? getFonts(fonts) : fonts, textSize * (chunk.scale || 1), textLineHeight); + let text = chunk.text; + if (text === '\n') { + acc.push('\n', ''); + return acc; + } + if (type == 2) { + acc.push(applyLetterSpacing(text, letterSpacing), chunkFont); + return; + } + text = wrapText(text, chunkFont, maxTextWidth, letterSpacing).split('\n'); + for (let i = 0, ii = text.length; i < ii; ++i) { + if (i > 0) { + acc.push('\n', ''); + } + acc.push(text[i], chunkFont); + } + return acc; + }, []); + } + } else { + label = fromTemplate(textField, properties).trim(); + } + opacity = getValue(layer, 'paint', 'text-opacity', zoom, f, functionCache, featureState); + } + if (label && opacity && !skipLabel) { + if (!hasImage) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getText() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + style.setImage(undefined); + style.setGeometry(undefined); + } + if (!style.getText()) { + style.setText(text || new Text({ + padding: [ + 2, + 2, + 2, + 2 + ] + })); + } + text = style.getText(); + const textTransform = layout['text-transform']; + if (textTransform == 'uppercase') { + label = Array.isArray(label) ? label.map((t, i) => i % 2 ? t : t.toUpperCase()) : label.toUpperCase(); + } else if (textTransform == 'lowercase') { + label = Array.isArray(label) ? label.map((t, i) => i % 2 ? t : t.toLowerCase()) : label.toLowerCase(); + } + const wrappedLabel = Array.isArray(label) ? label : type == 2 ? applyLetterSpacing(label, letterSpacing) : wrapText(label, font, maxTextWidth, letterSpacing); + text.setText(wrappedLabel); + text.setFont(font); + text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f, functionCache, featureState))); + const textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f, functionCache, featureState); + const placement = hasImage || type == 1 ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f, functionCache, featureState); + let textAlign; + if (placement === 'line-center') { + text.setPlacement('line'); + textAlign = 'center'; + } else { + text.setPlacement(placement); + } + if (placement === 'line' && typeof text.setRepeat === 'function') { + const symbolSpacing = getValue(layer, 'layout', 'symbol-spacing', zoom, f, functionCache, featureState); + text.setRepeat(symbolSpacing * 2); + } + text.setOverflow(placement === 'point'); + let textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f, functionCache, featureState); + const textOffset = getValue(layer, 'layout', 'text-offset', zoom, f, functionCache, featureState); + const textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f, functionCache, featureState); + // Text offset has to take halo width and line height into account + let vOffset = 0; + let hOffset = 0; + if (placement == 'point') { + textAlign = 'center'; + if (textAnchor.indexOf('left') !== -1) { + textAlign = 'left'; + hOffset = textHaloWidth; + } else if (textAnchor.indexOf('right') !== -1) { + textAlign = 'right'; + hOffset = -textHaloWidth; + } + const textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f, functionCache, featureState); + text.setRotateWithView(textRotationAlignment == 'map'); + } else { + text.setMaxAngle(deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f, functionCache, featureState)) * label.length / wrappedLabel.length); + text.setRotateWithView(false); + } + text.setTextAlign(textAlign); + let textBaseline = 'middle'; + if (textAnchor.indexOf('bottom') == 0) { + textBaseline = 'bottom'; + vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize; + } else if (textAnchor.indexOf('top') == 0) { + textBaseline = 'top'; + vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize; + } + text.setTextBaseline(textBaseline); + const textJustify = getValue(layer, 'layout', 'text-justify', zoom, f, functionCache, featureState); + text.setJustify(textJustify === 'auto' ? undefined : textJustify); + text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]); + text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]); + textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f, functionCache, featureState), opacity)); + text.setFill(textColor); + const haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f, functionCache, featureState), opacity); + if (haloColor) { + textHalo.setColor(haloColor); + // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width + // Halo width must be doubled because it is applied around the center of the text outline + textHaloWidth *= 2; + // 1/4 of text size (spec) x 2 + const halfTextSize = 0.5 * textSize; + textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize); + text.setStroke(textHalo); + } else { + text.setStroke(undefined); + } + const textPadding = getValue(layer, 'layout', 'text-padding', zoom, f, functionCache, featureState); + const padding = text.getPadding(); + if (textPadding !== padding[0]) { + padding[0] = textPadding; + padding[1] = textPadding; + padding[2] = textPadding; + padding[3] = textPadding; + } + style.setZIndex(index); + } + } + } + if (stylesLength > -1) { + styles.length = stylesLength + 1; + if (recordLayer) { + if ('set' in feature) { + // ol/Feature + feature.set('mapbox-layer', featureBelongsToLayer); + } else { + // ol/render/Feature + feature.getProperties()['mapbox-layer'] = featureBelongsToLayer; + } + } + return styles; + } + return undefined; + }; + olLayer.setStyle(styleFunction); + olLayer.set('mapbox-source', mapboxSource); + olLayer.set('mapbox-layers', mapboxLayers); + olLayer.set('mapbox-featurestate', olLayer.get('mapbox-featurestate') || {}); + return styleFunction; +} +/** + * Get the the style for a specific Mapbox layer only. This can be useful for creating a legend. + * @param {import("ol/Feature").default|import("ol/render/Feature").default} feature OpenLayers feature. + * @param {number} resolution View resolution. + * @param {import("ol/layer").Vector|import("ol/layer").VectorTile} olLayer OpenLayers layer. + * @param {string} layerId Id of the Mapbox layer to get the style for + * @return {Array} Styles for the provided Mapbox layer. + */ +function getStyleForLayer(feature, resolution, olLayer, layerId) { + const evaluateStyle = olLayer.getStyleFunction(); + if (evaluateStyle.length === 3) { + // @ts-ignore + return evaluateStyle(feature, resolution, layerId); + } + return undefined; +} + +/** + * Generates a shaded relief image given elevation data. Uses a 3x3 + * neighborhood for determining slope and aspect. + * @param {Array} inputs Array of input images. + * @param {Object} data Data added in the "beforeoperations" event. + * @return {ImageData} Output image. + */ +function hillshade(inputs, data) { + const elevationImage = inputs[0]; + const width = elevationImage.width; + const height = elevationImage.height; + const elevationData = elevationImage.data; + const shadeData = new Uint8ClampedArray(elevationData.length); + const dp = data.resolution * 2; + const maxX = width - 1; + const maxY = height - 1; + const pixel = [ + 0, + 0, + 0, + 0 + ]; + const twoPi = 2 * Math.PI; + const halfPi = Math.PI / 2; + const sunEl = Math.PI * data.sunEl / 180; + const sunAz = Math.PI * data.sunAz / 180; + const cosSunEl = Math.cos(sunEl); + const sinSunEl = Math.sin(sunEl); + const highlightColor = data.highlightColor; + const shadowColor = data.shadowColor; + const accentColor = data.accentColor; + const encoding = data.encoding; + let pixelX, pixelY, x0, x1, y0, y1, offset, z0, z1, dzdx, dzdy, slope, aspect, accent, scaled, shade, scaledAccentColor, compositeShadeColor, clamp, slopeScaleBase, scaledSlope, cosIncidence; + function calculateElevation(pixel, encoding = 'mapbox') { + // The method used to extract elevations from the DEM. + // + // The supported methods are the Mapbox format + // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000 + // and the Terrarium format + // (red * 256 + green + blue / 256) - 32768 + // + if (encoding === 'mapbox') { + return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000; + } + if (encoding === 'terrarium') { + return pixel[0] * 256 + pixel[1] + pixel[2] / 256 - 32768; + } + } + for (pixelY = 0; pixelY <= maxY; ++pixelY) { + y0 = pixelY === 0 ? 0 : pixelY - 1; + y1 = pixelY === maxY ? maxY : pixelY + 1; + for (pixelX = 0; pixelX <= maxX; ++pixelX) { + x0 = pixelX === 0 ? 0 : pixelX - 1; + x1 = pixelX === maxX ? maxX : pixelX + 1; + // determine elevation for (x0, pixelY) + offset = (pixelY * width + x0) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z0 = data.vert * calculateElevation(pixel, encoding); + // determine elevation for (x1, pixelY) + offset = (pixelY * width + x1) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z1 = data.vert * calculateElevation(pixel, encoding); + dzdx = (z1 - z0) / dp; + // determine elevation for (pixelX, y0) + offset = (y0 * width + pixelX) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z0 = data.vert * calculateElevation(pixel, encoding); + // determine elevation for (pixelX, y1) + offset = (y1 * width + pixelX) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z1 = data.vert * calculateElevation(pixel, encoding); + dzdy = (z1 - z0) / dp; + aspect = Math.atan2(dzdy, -dzdx); + if (aspect < 0) { + aspect = halfPi - aspect; + } else if (aspect > halfPi) { + aspect = twoPi - aspect + halfPi; + } else { + aspect = halfPi - aspect; + } + // Bootstrap slope and corresponding incident values + slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy)); + cosIncidence = sinSunEl * Math.cos(slope) + cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect); + accent = Math.cos(slope); + // 255 for Hex colors + scaled = 255 * cosIncidence; + /* + * The following is heavily inspired + * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl) + */ + // Forces given value to stay between two given extremes + clamp = Math.min(Math.max(2 * data.sunEl, 0), 1); + // Intensity basis for hillshade opacity + slopeScaleBase = 1.875 - data.opacity * 1.75; + // Intensity interpolation so that higher intensity values create more opaque hillshading + scaledSlope = data.opacity !== 0.5 ? halfPi * ((Math.pow(slopeScaleBase, slope) - 1) / (Math.pow(slopeScaleBase, halfPi) - 1)) : slope; + // Accent hillshade color with given accentColor to emphasize rougher terrain + scaledAccentColor = { + r: (1 - accent) * accentColor.r * clamp * 255, + g: (1 - accent) * accentColor.g * clamp * 255, + b: (1 - accent) * accentColor.b * clamp * 255, + a: (1 - accent) * accentColor.a * clamp * 255 + }; + // Allows highlight vs shadow discrimination + shade = Math.abs(((aspect + sunAz) / Math.PI + 0.5) % 2 - 1); + // Creates a composite color mix between highlight & shadow colors to emphasize slopes + compositeShadeColor = { + r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled, + g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled, + b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled, + a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled + }; + // Fill in result color value + offset = (pixelY * width + pixelX) * 4; + shadeData[offset] = scaledAccentColor.r * (1 - shade) + compositeShadeColor.r; + shadeData[offset + 1] = scaledAccentColor.g * (1 - shade) + compositeShadeColor.g; + shadeData[offset + 2] = scaledAccentColor.b * (1 - shade) + compositeShadeColor.b; + // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast + shadeData[offset + 3] = elevationData[offset + 3] * data.opacity * clamp * Math.sin(scaledSlope); + } + } + return new ImageData(shadeData, width, height); +} + +/* +ol-mapbox-style - Use Mapbox Style objects with OpenLayers +Copyright 2016-present ol-mapbox-style contributors +License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE +*/ +/** + * @typedef {Object} FeatureIdentifier + * @property {string|number} id The feature id. + * @property {string} source The source id. + */ +/** + * @typedef {Object} Options + * @property {string} [accessToken] Access token for 'mapbox://' urls. + * @property {function(string, import("./util.js").ResourceType): (Request|string|void)} [transformRequest] + * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying + * the url, adding headers or setting credentials options. Called with the url and the resource + * type as arguments, this function is supposed to return a `Request` or a url `string`. Without a return value, + * the original request will not be modified. + * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections. + * Code of a projection registered with OpenLayers. All sources of the style must be provided in this + * projection. The projection must also have a valid extent defined, which will be used to determine the + * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox + * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g. + * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`. + * @property {Array} [resolutions] Only useful when working with non-standard projections. + * Resolutions for mapping resolution to the `zoom` used in the Mapbox style. + * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided + * as object, when they contain a relative sprite url, or sources referencing data by relative url. + * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function be used for icons not in the sprite or to override sprite icons. + * @property {string} [accessTokenParam='access_token'] Access token param. For internal use. + */ +/** + * @typedef {Object} ApplyStyleOptions + * @property {string} [source=''] Source. Default is `''`, which causes the first source in the + * style to be used. + * @property {Array} [layers] Layers. If no source is provided, the layers with the + * provided ids will be used from the style's `layers` array. All layers need to use the same source. + * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters + * specified for the source in the mapbox style definition. + */ +/** + * @param {import("ol/proj/Projection.js").default} projection Projection. + * @param {number} [tileSize=512] Tile size. + * @return {Array} Resolutions. + */ +function getTileResolutions(projection, tileSize = 512) { + return projection.getExtent() ? createXYZ({ + extent: projection.getExtent(), + tileSize: tileSize, + maxZoom: 22 + }).getResolutions() : defaultResolutions; +} +/** + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Options} Completed options with accessToken and accessTokenParam. + */ +function completeOptions(styleUrl, options) { + if (!options.accessToken) { + options = Object.assign({}, options); + const searchParams = new URL(styleUrl).searchParams; + // The last search parameter is the access token + searchParams.forEach((value, key) => { + options.accessToken = value; + options.accessTokenParam = key; + }); + } + return options; +} +/** + * Applies a style function to an `ol/layer/VectorTile` or `ol/layer/Vector` + * with an `ol/source/VectorTile` or an `ol/source/Vector`. If the layer does not have a source + * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is + * set to `false`). + * + * **Example:** + * ```js + * import {applyStyle} from 'ol-mapbox-style'; + * import {VectorTile} from 'ol/layer.js'; + * + * const layer = new VectorTile({declutter: true}); + * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * + * The style function will render all layers from the `glStyle` object that use the source + * of the first layer, the specified `source`, or a subset of layers from the same source. The + * source needs to be a `"type": "vector"` or `"type": "geojson"` source. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer. When the layer has a source configured, + * it will be modified to use the configuration from the glStyle's `source`. Options specified on the + * layer's source will override those from the glStyle's `source`, except for `url` and + * `tileUrlFunction`. When the source projection is the default (`EPSG:3857`), the `tileGrid` will + * also be overridden. If you'd rather not have ol-mapbox-style modify the source, configure `applyStyle()` + * with the `updateSource: false` option. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or + * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is + * provided, all layers for the specified source will be included in the style function. When layer + * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey + * value, all layers using the first source specified in the glStyle will be rendered. + * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file + * (only required when a relative path is used for the `"sprite"` property of the style). + * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level. + * Only needed when working with non-standard tile grids or projections, can also be supplied with + * options. + * @return {Promise} Promise which will be resolved when the style can be used + * for rendering. + */ +function applyStyle(layer, glStyle, sourceOrLayersOrOptions = '', optionsOrPath = {}, resolutions = undefined) { + let styleUrl, sourceId; + /** @type {Options&ApplyStyleOptions} */ + let options; + let sourceOrLayers; + let updateSource = true; + if (typeof sourceOrLayersOrOptions !== 'string' && !Array.isArray(sourceOrLayersOrOptions)) { + options = sourceOrLayersOrOptions; + sourceOrLayers = options.source || options.layers; + optionsOrPath = options; + } else { + sourceOrLayers = sourceOrLayersOrOptions; + } + if (typeof optionsOrPath === 'string') { + styleUrl = optionsOrPath; + options = {}; + } else { + styleUrl = optionsOrPath.styleUrl; + options = optionsOrPath; + } + if (options.updateSource === false) { + updateSource = false; + } + if (!resolutions) { + resolutions = options.resolutions; + } + if (!styleUrl && typeof glStyle === 'string' && !glStyle.trim().startsWith('{')) { + styleUrl = glStyle; + } + if (styleUrl) { + styleUrl = styleUrl.startsWith('data:') ? location.href : normalizeStyleUrl(styleUrl, options.accessToken); + options = completeOptions(styleUrl, options); + } + return new Promise(function (resolve, reject) { + // TODO: figure out where best place to check source type is + // Note that the source arg is an array of gl layer ids and each must be + // dereferenced to get source type to validate + getGlStyle(glStyle, options).then(function (glStyle) { + if (glStyle.version != 8) { + return reject(new Error('glStyle version 8 required.')); + } + if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) { + return reject(new Error('Can only apply to VectorLayer or VectorTileLayer')); + } + const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson'; + if (!sourceOrLayers) { + sourceId = Object.keys(glStyle.sources).find(function (key) { + return glStyle.sources[key].type === type; + }); + sourceOrLayers = sourceId; + } else if (Array.isArray(sourceOrLayers)) { + sourceId = glStyle.layers.find(function (layer) { + return layer.id === sourceOrLayers[0]; + }).source; + } else { + sourceId = sourceOrLayers; + } + if (!sourceId) { + return reject(new Error(`No ${ type } source found in the glStyle.`)); + } + function assignSource() { + if (!updateSource) { + return Promise.resolve(); + } + if (layer instanceof VectorTileLayer) { + return setupVectorSource(glStyle.sources[sourceId], styleUrl, options).then(function (source) { + const targetSource = layer.getSource(); + if (!targetSource) { + layer.setSource(source); + } else if (source !== targetSource) { + targetSource.setTileUrlFunction(source.getTileUrlFunction()); + if (typeof targetSource.setUrls === 'function' && typeof source.getUrls === 'function') { + // to get correct keys for tile cache and queue + targetSource.setUrls(source.getUrls()); + } + //@ts-ignore + if (!targetSource.format_) { + //@ts-ignore + targetSource.format_ = source.format_; + } + if (!targetSource.getAttributions()) { + targetSource.setAttributions(source.getAttributions()); + } + if (targetSource.getTileLoadFunction() === defaultLoadFunction) { + targetSource.setTileLoadFunction(source.getTileLoadFunction()); + } + if (equivalent(targetSource.getProjection(), source.getProjection())) { + targetSource.tileGrid = source.getTileGrid(); + } + } + if (!isFinite(layer.getMaxResolution()) && !isFinite(layer.getMinZoom())) { + const tileGrid = layer.getSource().getTileGrid(); + layer.setMaxResolution(tileGrid.getResolution(tileGrid.getMinZoom())); + } + }); + } + const glSource = glStyle.sources[sourceId]; + let source = layer.getSource(); + if (!source || source.get('mapbox-source') !== glSource) { + source = setupGeoJSONSource(glSource, styleUrl, options); + } + const targetSource = layer.getSource(); + if (!targetSource) { + layer.setSource(source); + } else if (source !== targetSource) { + if (!targetSource.getAttributions()) { + targetSource.setAttributions(source.getAttributions()); + } + //@ts-ignore + if (!targetSource.format_) { + //@ts-ignore + targetSource.format_ = source.getFormat(); + } + //@ts-ignore + targetSource.url_ = source.getUrl(); + } + return Promise.resolve(); + } + let spriteScale, spriteData, spriteImageUrl, style; + function onChange() { + if (!style && (!glStyle.sprite || spriteData)) { + if (options.projection && !resolutions) { + const projection = get$1(options.projection); + const units = projection.getUnits(); + if (units !== 'm') { + resolutions = defaultResolutions.map(resolution => resolution / METERS_PER_UNIT[units]); + } + } + style = stylefunction(layer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, options.getImage); + if (!layer.getStyle()) { + reject(new Error(`Nothing to show for source [${ sourceId }]`)); + } else { + assignSource().then(resolve).catch(reject); + } + } else if (style) { + layer.setStyle(style); + assignSource().then(resolve).catch(reject); + } else { + reject(new Error('Something went wrong trying to apply style.')); + } + } + if (glStyle.sprite) { + const sprite = new URL(normalizeSpriteUrl(glStyle.sprite, options.accessToken, styleUrl || location.href)); + spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1; + const sizeFactor = spriteScale == 0.5 ? '@2x' : ''; + let spriteUrl = sprite.origin + sprite.pathname + sizeFactor + '.json' + sprite.search; + new Promise(function (resolve, reject) { + fetchResource('Sprite', spriteUrl, options).then(resolve).catch(function (error) { + spriteUrl = sprite.origin + sprite.pathname + '.json' + sprite.search; + fetchResource('Sprite', spriteUrl, options).then(resolve).catch(reject); + }); + }).then(function (spritesJson) { + if (spritesJson === undefined) { + reject(new Error('No sprites found.')); + } + spriteData = spritesJson; + spriteImageUrl = sprite.origin + sprite.pathname + sizeFactor + '.png' + sprite.search; + if (options.transformRequest) { + const transformed = options.transformRequest(spriteImageUrl, 'SpriteImage') || spriteImageUrl; + if (transformed instanceof Request) { + spriteImageUrl = transformed; + } + } + onChange(); + }).catch(function (err) { + reject(new Error(`Sprites cannot be loaded: ${ spriteUrl }: ${ err.message }`)); + }); + } else { + onChange(); + } + }).catch(reject); + }); +} +const emptyObj = {}; +function setFirstBackground(mapOrLayer, glStyle, options) { + glStyle.layers.some(function (layer) { + if (layer.type === 'background') { + if (mapOrLayer instanceof Layer) { + mapOrLayer.setBackground(function (resolution) { + return getBackgroundColor(layer, resolution, options, {}); + }); + return true; + } + if (mapOrLayer instanceof Map || mapOrLayer instanceof LayerGroup) { + mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {})); + return true; + } + } + }); +} +/** + * Applies properties of the Mapbox Style's first `background` layer to the + * provided map or layer (group). + * + * **Example:** + * ```js + * import {applyBackground} from 'ol-mapbox-style'; + * import {Map} from 'ol'; + * + * const map = new Map({target: 'map'}); + * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * @param {Map|import("ol/layer/Base.js").default} mapOrLayer OpenLayers Map or layer (group). + * @param {Object|string} glStyle Mapbox Style object or url. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the background is applied. + */ +function applyBackground(mapOrLayer, glStyle, options = {}) { + return getGlStyle(glStyle, options).then(function (glStyle) { + setFirstBackground(mapOrLayer, glStyle, options); + }); +} +function getSourceIdByRef(layers, ref) { + let sourceId; + layers.some(function (layer) { + if (layer.id == ref) { + sourceId = layer.source; + return true; + } + }); + return sourceId; +} +function extentFromTileJSON(tileJSON, projection) { + const bounds = tileJSON.bounds; + if (bounds) { + const ll = fromLonLat([ + bounds[0], + bounds[1] + ], projection); + const tr = fromLonLat([ + bounds[2], + bounds[3] + ], projection); + return [ + ll[0], + ll[1], + tr[0], + tr[1] + ]; + } + return get$1(projection).getExtent(); +} +function sourceOptionsFromTileJSON(glSource, tileJSON, options) { + const tileJSONSource = new TileJSON({ + tileJSON: tileJSON, + tileSize: glSource.tileSize || tileJSON.tileSize || 512 + }); + const tileJSONDoc = tileJSONSource.getTileJSON(); + const tileGrid = tileJSONSource.getTileGrid(); + const projection = get$1(options.projection || 'EPSG:3857'); + const extent = extentFromTileJSON(tileJSONDoc, projection); + const projectionExtent = projection.getExtent(); + const minZoom = tileJSONDoc.minzoom || 0; + const maxZoom = tileJSONDoc.maxzoom || 22; + /** @type {import("ol/source/VectorTile.js").Options} */ + const sourceOptions = { + attributions: tileJSONSource.getAttributions(), + projection: projection, + tileGrid: new TileGrid({ + origin: projectionExtent ? getTopLeft(projectionExtent) : tileGrid.getOrigin(0), + extent: extent || tileGrid.getExtent(), + minZoom: minZoom, + resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(0, maxZoom + 1), + tileSize: tileGrid.getTileSize(0) + }) + }; + if (Array.isArray(tileJSONDoc.tiles)) { + sourceOptions.urls = tileJSONDoc.tiles; + } else { + sourceOptions.url = tileJSONDoc.tiles; + } + return sourceOptions; +} +function getBackgroundColor(glLayer, resolution, options, functionCache) { + const background = { + id: glLayer.id, + type: glLayer.type + }; + const layout = glLayer.layout || {}; + const paint = glLayer.paint || {}; + background['paint'] = paint; + const zoom = getZoomForResolution(resolution, options.resolutions || defaultResolutions); + let bg, opacity; + if (paint['background-color'] !== undefined) { + bg = getValue(background, 'paint', 'background-color', zoom, emptyObj, functionCache); + } + if (paint['background-opacity'] !== undefined) { + opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj, functionCache); + } + return layout.visibility == 'none' ? undefined : colorWithOpacity(bg, opacity); +} +/** + * @param {Object} glLayer Mapbox Style layer object. + * @param {Options} options Options. + * @param {Object} functionCache Cache for functions. + * @return {Layer} OpenLayers layer. + */ +function setupBackgroundLayer(glLayer, options, functionCache) { + const div = document.createElement('div'); + div.className = 'ol-mapbox-style-background'; + div.style.position = 'absolute'; + div.style.width = '100%'; + div.style.height = '100%'; + return new Layer({ + source: new Source({}), + render(frameState) { + const color = getBackgroundColor(glLayer, frameState.viewState.resolution, options, functionCache); + div.style.backgroundColor = color; + return div; + } + }); +} +/** + * Creates an OpenLayers VectorTile source for a gl source entry. + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url, + * with access key applied. + * @param {Options} options Options. + * @return {Promise} Promise resolving to a VectorTile source. + * @private + */ +function setupVectorSource(glSource, styleUrl, options) { + return new Promise(function (resolve, reject) { + getTileJson(glSource, styleUrl, options).then(function ({tileJson, tileLoadFunction}) { + const sourceOptions = sourceOptionsFromTileJSON(glSource, tileJson, options); + sourceOptions.tileLoadFunction = tileLoadFunction; + sourceOptions.format = new MVT(); + resolve(new VectorTileSource(sourceOptions)); + }).catch(reject); + }); +} +function setupVectorLayer(glSource, styleUrl, options) { + const layer = new VectorTileLayer({ + declutter: true, + visible: false + }); + setupVectorSource(glSource, styleUrl, options).then(function (source) { + source.set('mapbox-source', glSource); + layer.setSource(source); + }).catch(function (error) { + layer.setSource(undefined); + }); + return layer; +} +function getBboxTemplate(projection) { + const projCode = projection ? projection.getCode() : 'EPSG:3857'; + return `{bbox-${ projCode.toLowerCase().replace(/[^a-z0-9]/g, '-') }}`; +} +function setupRasterLayer(glSource, styleUrl, options) { + const layer = new TileLayer(); + getTileJson(glSource, styleUrl, options).then(function ({tileJson, tileLoadFunction}) { + const source = new TileJSON({ + interpolate: options.interpolate === undefined ? true : options.interpolate, + transition: 0, + crossOrigin: 'anonymous', + tileJSON: tileJson + }); + source.tileGrid = sourceOptionsFromTileJSON(glSource, tileJson, options).tileGrid; + if (options.projection) { + //@ts-ignore + source.projection = get$1(options.projection); + } + const getTileUrl = source.getTileUrlFunction(); + if (tileLoadFunction) { + source.setTileLoadFunction(tileLoadFunction); + } + source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) { + const bboxTemplate = getBboxTemplate(projection); + let src = getTileUrl(tileCoord, pixelRatio, projection); + if (src.indexOf(bboxTemplate) != -1) { + const bbox = source.getTileGrid().getTileCoordExtent(tileCoord); + src = src.replace(bboxTemplate, bbox.toString()); + } + return src; + }); + source.set('mapbox-source', glSource); + layer.setSource(source); + }).catch(function (error) { + layer.setSource(undefined); + }); + return layer; +} +/** + * + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string} styleUrl Style url + * @param {Options} options ol-mapbox-style options. + * @return {ImageLayer} The raster layer + */ +function setupHillshadeLayer(glSource, styleUrl, options) { + const tileLayer = setupRasterLayer(glSource, styleUrl, options); + /** @type {ImageLayer} */ + const layer = new ImageLayer({ + source: new Raster({ + operationType: 'image', + operation: hillshade, + sources: [tileLayer] + }) + }); + return layer; +} +/** + * @param {Object} glSource glStyle source. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {VectorSource} Configured vector source. + */ +function setupGeoJSONSource(glSource, styleUrl, options) { + const geoJsonFormat = options.projection ? new GeoJSON({ dataProjection: options.projection }) : new GeoJSON(); + const data = glSource.data; + const sourceOptions = {}; + if (typeof data == 'string') { + const geoJsonUrl = normalizeSourceUrl(data, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href); + if (/\{bbox-[0-9a-z-]+\}/.test(geoJsonUrl)) { + const extentUrl = (extent, resolution, projection) => { + const bboxTemplate = getBboxTemplate(projection); + return geoJsonUrl.replace(bboxTemplate, `${ extent.join(',') }`); + }; + const source = new VectorSource({ + attributions: glSource.attribution, + format: geoJsonFormat, + loader: (extent, resolution, projection, success, failure) => { + const url = typeof extentUrl === 'function' ? extentUrl(extent, resolution, projection) : extentUrl; + fetchResource('GeoJSON', url, options).then(json => { + const features = source.getFormat().readFeatures(json, { featureProjection: projection }); + source.addFeatures(features); + success(features); + }).catch(response => { + source.removeLoadedExtent(extent); + failure(); + }); + }, + strategy: bbox + }); + source.set('mapbox-source', glSource); + return source; + } + const source = new VectorSource({ + attributions: glSource.attribution, + format: geoJsonFormat, + url: geoJsonUrl, + loader: (extent, resolution, projection, success, failure) => { + fetchResource('GeoJSON', geoJsonUrl, options).then(json => { + const features = source.getFormat().readFeatures(json, { featureProjection: projection }); + source.addFeatures(features); + success(features); + }).catch(response => { + source.removeLoadedExtent(extent); + failure(); + }); + } + }); + return source; + } + sourceOptions.features = geoJsonFormat.readFeatures(data, { featureProjection: getUserProjection() || 'EPSG:3857' }); + const source = new VectorSource(Object.assign({ + attributions: glSource.attribution, + format: geoJsonFormat + }, sourceOptions)); + source.set('mapbox-source', glSource); + return source; +} +function setupGeoJSONLayer(glSource, styleUrl, options) { + return new VectorLayer({ + declutter: true, + source: setupGeoJSONSource(glSource, styleUrl, options), + visible: false + }); +} +function prerenderRasterLayer(glLayer, layer, functionCache) { + let zoom = null; + return function (event) { + if (glLayer.paint && 'raster-opacity' in glLayer.paint && event.frameState.viewState.zoom !== zoom) { + zoom = event.frameState.viewState.zoom; + delete functionCache[glLayer.id]; + updateRasterLayerProperties(glLayer, layer, zoom, functionCache); + } + }; +} +function updateRasterLayerProperties(glLayer, layer, zoom, functionCache) { + const opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj, functionCache); + layer.setOpacity(opacity); +} +function manageVisibility(layer, mapOrGroup) { + function onChange() { + const glStyle = mapOrGroup.get('mapbox-style'); + if (!glStyle) { + return; + } + const mapboxLayers = derefLayers(glStyle.layers); + const layerMapboxLayerids = layer.get('mapbox-layers'); + const visible = mapboxLayers.filter(function (mapboxLayer) { + return layerMapboxLayerids.includes(mapboxLayer.id); + }).some(function (mapboxLayer) { + return !mapboxLayer.layout || !mapboxLayer.layout.visibility || mapboxLayer.layout.visibility === 'visible'; + }); + if (layer.get('visible') !== visible) { + layer.setVisible(visible); + } + } + layer.on('change', onChange); + onChange(); +} +function setupLayer(glStyle, styleUrl, glLayer, options) { + const functionCache = getFunctionCache(glStyle); + const glLayers = glStyle.layers; + const type = glLayer.type; + const id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref); + const glSource = glStyle.sources[id]; + let layer; + if (type == 'background') { + layer = setupBackgroundLayer(glLayer, options, functionCache); + } else if (glSource.type == 'vector') { + layer = setupVectorLayer(glSource, styleUrl, options); + } else if (glSource.type == 'raster') { + layer = setupRasterLayer(glSource, styleUrl, options); + layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true); + layer.on('prerender', prerenderRasterLayer(glLayer, layer, functionCache)); + } else if (glSource.type == 'geojson') { + layer = setupGeoJSONLayer(glSource, styleUrl, options); + } else if (glSource.type == 'raster-dem' && glLayer.type == 'hillshade') { + const hillshadeLayer = setupHillshadeLayer(glSource, styleUrl, options); + layer = hillshadeLayer; + hillshadeLayer.getSource().on('beforeoperations', function (event) { + const data = event.data; + data.resolution = event.resolution; + const zoom = getZoomForResolution(event.resolution, options.resolutions || defaultResolutions); + data.encoding = glSource.encoding; + data.vert = 5 * getValue(glLayer, 'paint', 'hillshade-exaggeration', zoom, emptyObj, functionCache); + data.sunAz = getValue(glLayer, 'paint', 'hillshade-illumination-direction', zoom, emptyObj, functionCache); + data.sunEl = 35; + data.opacity = 0.3; + data.highlightColor = getValue(glLayer, 'paint', 'hillshade-highlight-color', zoom, emptyObj, functionCache); + data.shadowColor = getValue(glLayer, 'paint', 'hillshade-shadow-color', zoom, emptyObj, functionCache); + data.accentColor = getValue(glLayer, 'paint', 'hillshade-accent-color', zoom, emptyObj, functionCache); + }); + layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true); + } + const glSourceId = id; + if (layer) { + layer.set('mapbox-source', glSourceId); + } + return layer; +} +/** + * @param {*} glStyle Mapbox Style. + * @param {Map|LayerGroup} mapOrGroup Map or layer group. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the style is loaded. + */ +function processStyle(glStyle, mapOrGroup, styleUrl, options) { + const promises = []; + let view = null; + if (mapOrGroup instanceof Map) { + view = mapOrGroup.getView(); + if (!view.isDef() && !view.getRotation() && !view.getResolutions()) { + const projection = options.projection ? get$1(options.projection) : view.getProjection(); + view = new View(Object.assign(view.getProperties(), { + maxResolution: defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()], + projection: options.projection || view.getProjection() + })); + mapOrGroup.setView(view); + } + if ('center' in glStyle && !view.getCenter()) { + view.setCenter(fromLonLat(glStyle.center, view.getProjection())); + } + if ('zoom' in glStyle && view.getZoom() === undefined) { + view.setResolution(defaultResolutions[0] / METERS_PER_UNIT[view.getProjection().getUnits()] / Math.pow(2, glStyle.zoom)); + } + if (!view.getCenter() || view.getZoom() === undefined) { + view.fit(view.getProjection().getExtent(), { + nearest: true, + size: mapOrGroup.getSize() + }); + } + } + mapOrGroup.set('mapbox-style', glStyle); + mapOrGroup.set('mapbox-metadata', { + styleUrl, + options + }); + const glLayers = glStyle.layers; + let layerIds = []; + let layer, glSourceId, id; + for (let i = 0, ii = glLayers.length; i < ii; ++i) { + const glLayer = glLayers[i]; + const type = glLayer.type; + if (type == 'heatmap') { + //FIXME Unsupported layer type + throw new Error(`${ type } layers are not supported`); + } else { + id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref); + // this technique assumes gl layers will be in a particular order + if (!id || id != glSourceId) { + if (layerIds.length) { + promises.push(finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)); + layerIds = []; + } + layer = setupLayer(glStyle, styleUrl, glLayer, options); + if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) { + layerIds = []; + } + glSourceId = layer.get('mapbox-source'); + } + layerIds.push(glLayer.id); + } + } + promises.push(finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)); + return Promise.all(promises); +} +/** + * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup. + * This includes the map background, the layers, and for Map instances that did not + * have a View defined yet also the center and the zoom. + * + * **Example:** + * ```js + * import apply from 'ol-mapbox-style'; + * + * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'}); + * ``` + * + * The center and zoom will only be set if present in the Mapbox Style document, + * and if not already set on the OpenLayers map. + * + * Layers will be added to the OpenLayers map, without affecting any layers that + * might already be set on the map. + * + * Layers added by `apply()` will have two additional properties: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function sets an additional `mapbox-style` property on the OpenLayers + * Map or LayerGroup instance, which holds the Mapbox Style object. + * + * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing + * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be + * the target of a new OpenLayers Map, or a layer group. If layer group, styles + * releated to the map and view will be ignored. + * @param {string|Object} style JSON style object or style url pointing to a + * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl` + * shown in Mapbox Studio's "share" panel. In addition, the `accessToken` option + * (see below) must be set. + * When passed as JSON style object, all OpenLayers layers created by `apply()` + * will be immediately available, but they may not have a source yet (i.e. when + * they are defined by a TileJSON url in the Mapbox Style document). When passed + * as style url, layers will be added to the map when the Mapbox Style document + * is loaded and parsed. + * @param {Options} options Options. + * @return {Promise} A promise that resolves after all layers have been added to + * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The + * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as + * argument. + */ +function apply(mapOrGroupOrElement, style, options = {}) { + let promise; + /** @type {Map|LayerGroup} */ + let mapOrGroup; + if (typeof mapOrGroupOrElement === 'string' || mapOrGroupOrElement instanceof HTMLElement) { + mapOrGroup = new Map({ target: mapOrGroupOrElement }); + } else { + mapOrGroup = mapOrGroupOrElement; + } + if (typeof style === 'string') { + const styleUrl = style.startsWith('data:') ? location.href : normalizeStyleUrl(style, options.accessToken); + options = completeOptions(styleUrl, options); + promise = new Promise(function (resolve, reject) { + getGlStyle(style, options).then(function (glStyle) { + processStyle(glStyle, mapOrGroup, styleUrl, options).then(function () { + resolve(mapOrGroup); + }).catch(reject); + }).catch(function (err) { + reject(new Error(`Could not load ${ style }: ${ err.message }`)); + }); + }); + } else { + promise = new Promise(function (resolve, reject) { + processStyle(style, mapOrGroup, !options.styleUrl || options.styleUrl.startsWith('data:') ? location.href : normalizeStyleUrl(options.styleUrl, options.accessToken), options).then(function () { + resolve(mapOrGroup); + }).catch(reject); + }); + } + return promise; +} +/** + * If layerIds is not empty, applies the style specified in glStyle to the layer, + * and adds the layer to the map. + * + * The layer may not yet have a source when the function is called. If so, the style + * is applied to the layer via a once listener on the 'change:source' event. + * + * @param {Layer} layer An OpenLayers layer instance. + * @param {Array} layerIds Array containing layer ids of already-processed layers. + * @param {Object} glStyle Style as a JSON object. + * @param {string|undefined} styleUrl The original style URL. Only required + * when a relative path is used with the `"sprite"` property of the style. + * @param {Map|LayerGroup} mapOrGroup OpenLayers Map. + * @param {Options} options Options. + * @return {Promise} Returns a promise that resolves after the source has + * been set on the specified layer, and the style has been applied. + */ +function finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options = {}) { + let minZoom = 24; + let maxZoom = 0; + const glLayers = glStyle.layers; + for (let i = 0, ii = glLayers.length; i < ii; ++i) { + const glLayer = glLayers[i]; + if (layerIds.indexOf(glLayer.id) !== -1) { + minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom); + maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom); + } + } + return new Promise(function (resolve, reject) { + const setStyle = function () { + const source = layer.getSource(); + if (!source || source.getState() === 'error') { + reject(new Error('Error accessing data for source ' + layer.get('mapbox-source'))); + return; + } + if ('getTileGrid' in source) { + const tileGrid = /** @type {import("ol/source/Tile.js").default|import("ol/source/VectorTile.js").default} */ + source.getTileGrid(); + if (tileGrid) { + const sourceMinZoom = tileGrid.getMinZoom(); + if (minZoom > 0 || sourceMinZoom > 0) { + layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9); + } + if (maxZoom < 24) { + layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9); + } + } + } else { + if (minZoom > 0) { + layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9); + } + } + if (source instanceof VectorSource || source instanceof VectorTileSource) { + applyStyle(layer, glStyle, layerIds, Object.assign({ styleUrl: styleUrl }, options)).then(function () { + manageVisibility(layer, mapOrGroup); + resolve(); + }).catch(reject); + } else { + resolve(); + } + }; + layer.set('mapbox-layers', layerIds); + const layers = mapOrGroup.getLayers(); + if (layers.getArray().indexOf(layer) === -1) { + layers.push(layer); + } + if (layer.getSource()) { + setStyle(); + } else { + layer.once('change:source', setStyle); + } + }); +} +/** + * Get the Mapbox Layer object for the provided `layerId`. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {string} layerId Mapbox Layer id. + * @return {Object} Mapbox Layer object. + */ +function getMapboxLayer(mapOrGroup, layerId) { + const style = mapOrGroup.get('mapbox-style'); + const layerStyle = style.layers.find(function (layer) { + return layer.id === layerId; + }); + return layerStyle; +} +/** + * Add a new Mapbox Layer object to the style. The map will be re-rendered. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {Object} mapboxLayer Mapbox Layer object. + * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added. + * @return {Promise} Resolves when the added layer is available. + */ +function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) { + const glStyle = mapOrGroup.get('mapbox-style'); + const mapboxLayers = glStyle.layers; + let spliceIndex; + let sourceIndex = -1; + if (beforeLayerId !== undefined) { + const beforeMapboxLayer = getMapboxLayer(mapOrGroup, beforeLayerId); + if (beforeMapboxLayer === undefined) { + throw new Error(`Layer with id "${ beforeLayerId }" not found.`); + } + spliceIndex = mapboxLayers.indexOf(beforeMapboxLayer); + } else { + spliceIndex = mapboxLayers.length; + } + let sourceOffset; + if (spliceIndex > 0 && mapboxLayers[spliceIndex - 1].source === mapboxLayer.source) { + sourceIndex = spliceIndex - 1; + sourceOffset = -1; + } else if (spliceIndex < mapboxLayers.length && mapboxLayers[spliceIndex].source === mapboxLayer.source) { + sourceIndex = spliceIndex; + sourceOffset = 0; + } + if (sourceIndex === -1) { + const {options, styleUrl} = mapOrGroup.get('mapbox-metadata'); + const layer = setupLayer(glStyle, styleUrl, mapboxLayer, options); + if (beforeLayerId) { + const beforeLayer = getLayer(mapOrGroup, beforeLayerId); + const beforeLayerIndex = mapOrGroup.getLayers().getArray().indexOf(beforeLayer); + mapOrGroup.getLayers().insertAt(beforeLayerIndex, layer); + } + mapboxLayers.splice(spliceIndex, 0, mapboxLayer); + return finalizeLayer(layer, [mapboxLayer.id], glStyle, styleUrl, mapOrGroup, options); + } + if (mapboxLayers.some(layer => layer.id === mapboxLayer.id)) { + throw new Error(`Layer with id "${ mapboxLayer.id }" already exists.`); + } + const sourceLayerId = mapboxLayers[sourceIndex].id; + const args = styleFunctionArgs[getStyleFunctionKey(mapOrGroup.get('mapbox-style'), getLayer(mapOrGroup, sourceLayerId))]; + mapboxLayers.splice(spliceIndex, 0, mapboxLayer); + if (args) { + const [olLayer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, getImage] = args; + if (Array.isArray(sourceOrLayers)) { + const layerIndex = sourceOrLayers.indexOf(sourceLayerId) + sourceOffset; + sourceOrLayers.splice(layerIndex, 0, mapboxLayer.id); + } + stylefunction(olLayer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, getImage); + } else { + getLayer(mapOrGroup, mapboxLayers[sourceIndex].id).changed(); + } + return Promise.resolve(); +} +/** + * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {Object} mapboxLayer Updated Mapbox Layer object. + */ +function updateMapboxLayer(mapOrGroup, mapboxLayer) { + const glStyle = mapOrGroup.get('mapbox-style'); + const mapboxLayers = glStyle.layers; + const index = mapboxLayers.findIndex(function (layer) { + return layer.id === mapboxLayer.id; + }); + if (index === -1) { + throw new Error(`Layer with id "${ mapboxLayer.id }" not found.`); + } + const oldLayer = mapboxLayers[index]; + if (oldLayer.source !== mapboxLayer.source) { + throw new Error('Updated layer and previous version must use the same source.'); + } + delete getFunctionCache(glStyle)[mapboxLayer.id]; + delete getFilterCache(glStyle)[mapboxLayer.id]; + mapboxLayers[index] = mapboxLayer; + const args = styleFunctionArgs[getStyleFunctionKey(mapOrGroup.get('mapbox-style'), getLayer(mapOrGroup, mapboxLayer.id))]; + if (args) { + stylefunction.apply(undefined, args); + } else { + getLayer(mapOrGroup, mapboxLayer.id).changed(); + } +} +/** + * Remove a Mapbox Layer object from the style. The map will be re-rendered. + * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on. + * @param {string|Object} mapboxLayerIdOrLayer Mapbox Layer id or Mapbox Layer object. + */ +function removeMapboxLayer(mapOrGroup, mapboxLayerIdOrLayer) { + const mapboxLayerId = typeof mapboxLayerIdOrLayer === 'string' ? mapboxLayerIdOrLayer : mapboxLayerIdOrLayer.id; + const layer = getLayer(mapOrGroup, mapboxLayerId); + /** @type {Array} */ + const layerMapboxLayers = layer.get('mapbox-layers'); + if (layerMapboxLayers.length === 1) { + throw new Error('Cannot remove last Mapbox layer from an OpenLayers layer.'); + } + layerMapboxLayers.splice(layerMapboxLayers.indexOf(mapboxLayerId), 1); + const glStyle = mapOrGroup.get('mapbox-style'); + const layers = glStyle.layers; + layers.splice(layers.findIndex(layer => layer.id === mapboxLayerId), 1); + const args = styleFunctionArgs[getStyleFunctionKey(glStyle, layer)]; + if (args) { + const [olLayer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, getImage] = args; + if (Array.isArray(sourceOrLayers)) { + sourceOrLayers.splice(sourceOrLayers.findIndex(layer => layer === mapboxLayerId), 1); + } + stylefunction(olLayer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, getImage); + } else { + getLayer(mapOrGroup, mapboxLayerId).changed(); + } +} +/** + * Get the OpenLayers layer instance that contains the provided Mapbox Style + * `layer`. Note that multiple Mapbox Style layers are combined in a single + * OpenLayers layer instance when they use the same Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} layerId Mapbox Style layer id. + * @return {Layer} OpenLayers layer instance. + */ +function getLayer(map, layerId) { + const layers = map.getLayers().getArray(); + for (let i = 0, ii = layers.length; i < ii; ++i) { + const mapboxLayers = layers[i].get('mapbox-layers'); + if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) { + return layers[i]; + } + } + return undefined; +} +/** + * Get the OpenLayers layer instances for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Array} OpenLayers layer instances. + */ +function getLayers(map, sourceId) { + const result = []; + const layers = map.getLayers().getArray(); + for (let i = 0, ii = layers.length; i < ii; ++i) { + if (layers[i].get('mapbox-source') === sourceId) { + result.push(layers[i]); + } + } + return result; +} +/** + * Get the OpenLayers source instance for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Source} OpenLayers source instance. + */ +function getSource(map, sourceId) { + const layers = map.getLayers().getArray(); + for (let i = 0, ii = layers.length; i < ii; ++i) { + const source = /** @type {Layer} */ + layers[i].getSource(); + if (layers[i].get('mapbox-source') === sourceId) { + return source; + } + } + return undefined; +} +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * + * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the + * `mapbox-featurestate` property. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature + * state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @param {Object|null} state Feature state. Set to `null` to remove the feature state. + */ +function setFeatureState(mapOrLayer, feature, state) { + const layers = 'getLayers' in mapOrLayer ? getLayers(mapOrLayer, feature.source) : [mapOrLayer]; + for (let i = 0, ii = layers.length; i < ii; ++i) { + const featureState = layers[i].get('mapbox-featurestate'); + if (featureState) { + if (state) { + featureState[feature.id] = state; + } else { + delete featureState[feature.id]; + } + layers[i].changed(); + } else { + throw new Error(`Map or layer for source "${ feature.source }" not found.`); + } + } +} +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @return {Object|null} Feature state or `null` when no feature state is set for the given + * feature identifier. + */ +function getFeatureState(mapOrLayer, feature) { + const layers = 'getLayers' in mapOrLayer ? getLayers(mapOrLayer, feature.source) : [mapOrLayer]; + for (let i = 0, ii = layers.length; i < ii; ++i) { + const featureState = layers[i].get('mapbox-featurestate'); + if (featureState && featureState[feature.id]) { + return featureState[feature.id]; + } + } + return undefined; +} + +/** @typedef {import("ol/Map.js").default} Map */ +/** + * @classdesc + * Event emitted on configuration or loading error. + */ +class ErrorEvent extends BaseEvent { + /** + * @param {Error} error error object. + */ + constructor(error) { + super(EventType.ERROR); + /** + * @type {Error} + */ + this.error = error; + } +} +/** + * @typedef {Object} Options + * @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a + * style created with Mapbox Studio and hosted on Mapbox, this will look like + * 'mapbox://styles/you/your-style'. + * @property {string} [accessToken] The access token for your Mapbox style. This has to be provided + * for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query + * parameter of the style url. + * @property {string} [source] If your style uses more than one source, you need to use either the + * `source` property or the `layers` property to limit rendering to a single vector source. The + * `source` property corresponds to the id of a vector source in your Mapbox style. + * @property {Array} [layers] Limit rendering to the list of included layers. All layers + * must share the same vector source. If your style uses more than one source, you need to use + * either the `source` property or the `layers` property to limit rendering to a single vector + * source. + * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all + * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority + * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features. + * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has + * higher priority. + * + * As an optimization decluttered features from layers with the same `className` are rendered above + * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this + * behavior and place declutterd features with their own layer configure the layer with a `className` + * other than `ol-layer`. + * @property {import("ol/layer/Base.js").BackgroundColor|false} [background] Background color for the layer. + * If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent + * the Mapbox style's background from being used. + * @property {string} [className='ol-layer'] A CSS class name to set to the layer element. + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {import("ol/extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will + * match the style source's `minzoom`. + * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will + * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match + * the style source's `minzoom`. + * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will + * be visible. + * @property {import("ol/render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting + * features before rendering. By default features are drawn in the order that they are created. Use + * `null` to avoid the sort, but get an undefined draw order. + * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the + * renderer when getting features from the vector tile for the rendering or hit-detection. + * Recommended value: Vector tiles are usually generated with a buffer, so this value should match + * the largest possible buffer of the used tiles. It should be at least the size of the largest + * point symbol or line width. + * @property {import("ol/layer/VectorTile.js").VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles: + * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom + * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on + * rotated views. + * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector + * tile layers with only a few rendered features (e.g. for highlighting a subset of features of + * another layer with the same source). + * @property {import("ol/Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage + * this layer in its layers collection, and the layer will be rendered on top. This is useful for + * temporary layers. The standard way to add a layer to a map and have it managed by the map is to + * use `map.addLayer()`. + * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be + * recreated during animations. This means that no vectors will be shown clipped, but the setting + * will have a performance impact for large amounts of vector data. When set to `false`, batches + * will be recreated when no animation is active. + * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be + * recreated during interactions. See also `updateWhileAnimating`. + * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0` + * means no preloading. + * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. + * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ +/** + * @classdesc + * ```js + * import {MapboxVectorLayer} from 'ol-mapbox-style'; + * ``` + * A vector tile layer based on a Mapbox style that uses a single vector source. Configure + * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel. + * If the style uses more than one source, use the `source` property to choose a single + * vector source. If you want to render a subset of the layers in the style, use the `layers` + * property (all layers must share the same vector source). See the constructor options for + * more detail. + * + * const map = new Map({ + * view: new View({ + * center: [0, 0], + * zoom: 1, + * }), + * layers: [ + * new MapboxVectorLayer({ + * styleUrl: 'mapbox://styles/mapbox/bright-v9', + * accessToken: 'your-mapbox-access-token-here', + * }), + * ], + * target: 'map', + * }); + * + * On configuration or loading error, the layer will trigger an `'error'` event. Listeners + * will receive an object with an `error` property that can be used to diagnose the problem. + * + * **Note for users of the full build**: The `MapboxVectorLayer` requires the + * [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) library to be loaded as well. + * + * @param {Options} options Options. + * @extends {VectorTileLayer} + * @fires module:ol/events/Event~BaseEvent#event:error + * @api + */ +class MapboxVectorLayer extends VectorTileLayer { + /** + * @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken` + * must be provided. + */ + constructor(options) { + const declutter = 'declutter' in options ? options.declutter : true; + const source = new VectorTileSource({ + state: 'loading', + format: new MVT() + }); + super({ + source: source, + background: options.background, + declutter: declutter, + className: options.className, + opacity: options.opacity, + visible: options.visible, + zIndex: options.zIndex, + minResolution: options.minResolution, + maxResolution: options.maxResolution, + minZoom: options.minZoom, + maxZoom: options.maxZoom, + renderOrder: options.renderOrder, + renderBuffer: options.renderBuffer, + renderMode: options.renderMode, + map: options.map, + updateWhileAnimating: options.updateWhileAnimating, + updateWhileInteracting: options.updateWhileInteracting, + preload: options.preload, + useInterimTilesOnError: options.useInterimTilesOnError, + properties: options.properties + }); + if (options.accessToken) { + this.accessToken = options.accessToken; + } + const url = options.styleUrl; + const promises = [applyStyle(this, url, options.layers || options.source, { accessToken: this.accessToken })]; + if (this.getBackground() === undefined) { + promises.push(applyBackground(this, options.styleUrl, { accessToken: this.accessToken })); + } + Promise.all(promises).then(() => { + source.setState('ready'); + }).catch(error => { + this.dispatchEvent(new ErrorEvent(error)); + const source = this.getSource(); + source.setState('error'); + }); + } +} + +export { MapboxVectorLayer, addMapboxLayer, apply, applyBackground, applyStyle, apply as default, getFeatureState, getLayer, getLayers, getMapboxLayer, getSource, getStyleForLayer, recordStyleLayer, removeMapboxLayer, renderTransparent, setFeatureState, stylefunction, updateMapboxLayer }; +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 00000000..a87f9114 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../node_modules/csscolorparser/csscolorparser.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/color.js","../node_modules/@mapbox/mapbox-gl-style-spec/function/convert.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_error.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/scope.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/collator.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/formatted.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/resolved_image.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/values.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/literal.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/runtime_error.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/assertion.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/format.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/image.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coercion.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/evaluation_context.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/compound_expression.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/collator.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/within.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/is_constant.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/var.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_context.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/stops.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/step.js","../node_modules/@mapbox/unitbezier/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/interpolate.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/color_spaces.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coalesce.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/let.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/at.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/in.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index_of.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/match.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/case.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/slice.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/comparison.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/number_format.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/length.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/result.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/properties.js","../node_modules/@mapbox/mapbox-gl-style-spec/function/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/unbundle_jsonlint.js","../node_modules/@mapbox/mapbox-gl-style-spec/reference/v8.json","../node_modules/@mapbox/mapbox-gl-style-spec/feature_filter/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/ref_properties.js","../node_modules/@mapbox/mapbox-gl-style-spec/deref.js","../node_modules/mapbox-to-css-font/index.js","../src/mapbox.js","../src/util.js","../src/text.js","../src/stylefunction.js","../src/shaders.js","../src/apply.js","../src/MapboxVectorLayer.js"],"sourcesContent":["// (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/\nvar 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\nfunction clamp_css_byte(i) { // 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\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction 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) return kCSSColorTable[str].slice(); // 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)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 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)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), 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) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\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),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n /**\n * Returns an RGBA array of values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 255].\n */\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n\n /**\n * Returns a RGBA array of float values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r / a,\n g / a,\n b / a,\n a\n ];\n }\n\n /**\n * Returns an RGBA array of values representing the color, premultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01PremultipliedAlpha(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return [\n r,\n g,\n b,\n a\n ];\n }\n}\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);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\nimport assert from 'assert';\n\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {ExpressionSpecification} from '../types.js';\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport default function convertFunction(parameters: any, propertySpec: StylePropertySpecification): ExpressionSpecification {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((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\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}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : get;\n } else if (propertySpec.type === 'enum') {\n return [\n 'match',\n get,\n Object.keys(propertySpec.values),\n get,\n parameters.default\n ];\n } else {\n const 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}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n 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\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string): string | ExpressionSpecification {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\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\n return result;\n}\n\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>): Scope {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (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 (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array): boolean {\n return allowedTypes.some(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 === 'object';\n } else {\n return t === typeof provided;\n }\n });\n}\n","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\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, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n // combine characters so that diacritic marks are not separate code points\n this.text = text.normalize ? text.normalize() : text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array;\n\n constructor(sections: Array) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array {\n const serialized: Array = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\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\"]: Array).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const 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\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\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 (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\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 const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const 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\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value): string {\n const type = 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\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value} from '../values.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Literal {\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 const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate(): Value {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON(): string {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\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\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const 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\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const 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(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array;\n\n constructor(sections: Array) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const firstArg = args[1];\n if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n return context.error(`First argument must be an image or text section.`);\n }\n\n const sections: Array = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const 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({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext): Formatted {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\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 }\n\n outputDefined(): boolean {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const 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}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext): null | ResolvedImage {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): null | boolean | number | string | Color | Formatted | ResolvedImage {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\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]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\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 let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array;\n canonical: null | CanonicalTileID;\n featureTileCoord: ?Point;\n featureDistanceData: ?FeatureDistanceData;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n this.featureTileCoord = null;\n this.featureDistanceData = null;\n }\n\n id(): number | null {\n return this.feature && this.feature.id !== undefined ? this.feature.id : null;\n }\n\n geometryType(): null | string {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry(): ?Array> {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID(): null | CanonicalTileID {\n return this.canonical;\n }\n\n properties(): {[string]: any} {\n return (this.feature && this.feature.properties) || {};\n }\n\n distanceFromCenter(): number {\n if (this.featureTileCoord && this.featureDistanceData) {\n\n const c = this.featureDistanceData.center;\n const scale = this.featureDistanceData.scale;\n const {x, y} = this.featureTileCoord;\n\n // Calculate the distance vector `d` (left handed)\n const dX = x * scale - c[0];\n const dY = y * scale - c[1];\n\n // The bearing vector `b` (left handed)\n const bX = this.featureDistanceData.bearing[0];\n const bY = this.featureDistanceData.bearing[1];\n\n // Distance is calculated as `dot(d, v)`\n const dist = (bX * dX + bY * dY);\n return dist;\n }\n\n return 0;\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array | Varargs;\ntype Evaluate = (EvaluationContext, Array) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext): Value {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const 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\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const 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 // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\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\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext): Collator {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined(): boolean {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: [number, number]) {\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}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\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}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let 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}\n\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox: BBox, canonical: CanonicalTileID) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical: CanonicalTileID) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let 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}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n if (!geometry) return tilePoints;\n for (const points of geometry) {\n for (const point of points) {\n const 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}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n if (!geometry) return tileLines;\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const 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 (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Within {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const 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 const type = geojson.geometry.type;\n if (type === 'Polygon' || type === '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 }\n\n evaluate(ctx: EvaluationContext): boolean {\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 }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression): boolean {\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 (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression): boolean {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array): boolean {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Var {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const 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\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array;\n key: string;\n scope: Scope;\n errors: Array;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\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\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\n const op = expr[0];\n if (typeof op !== 'string') {\n this.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\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\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const 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\n return parsed;\n }\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 === 'object') {\n return this.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n } else {\n return this.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>): ParsingContext {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: 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 // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\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\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script', 'pitch', 'distance-from-center']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array, input: number): number {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\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\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Step {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"step\", this.input.serialize()];\n for (let 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\nexport default Step;\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\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = 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') epsilon = 1e-6;\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) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\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) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\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","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number): number {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number): Color {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array, to: Array, t: number): Array {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\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;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const 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.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let 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(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number): LABColor {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const 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,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number): HCLColor {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\nimport Color from '../../util/color.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number): number {\n let 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 const c = interpolation.controlPoints;\n const 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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Interpolate {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => 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\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\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\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): Color {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n let 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\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Coalesce {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n let result = null;\n let argCount = 0;\n let firstImage;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n // set to first image\n if (!firstImage) {\n firstImage = result;\n }\n result = null;\n // if we reach the end, return the first image\n if (argCount === this.args.length) {\n return firstImage;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Let {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined(): boolean {\n return this.result.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?At {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext): Value {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?In {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) 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\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (haystack == null) 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\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\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?IndexOf {\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\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\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\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\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\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\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const 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}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array, otherwise: Expression) {\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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Match {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\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\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Case {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Slice {\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\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) 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\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\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\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const 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}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression, ExpressionRegistration} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx: EvaluationContext, a: any, b: any): boolean { return a === b; }\nfunction neq(ctx: EvaluationContext, a: any, b: any): boolean { return a !== b; }\nfunction lt(ctx: EvaluationContext, a: any, b: any): boolean { return a < b; }\nfunction gt(ctx: EvaluationContext, a: any, b: any): boolean { return a > b; }\nfunction lteq(ctx: EvaluationContext, a: any, b: any): boolean { return a <= b; }\nfunction gteq(ctx: EvaluationContext, a: any, b: any): boolean { return a >= b; }\n\nfunction eqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic: (EvaluationContext, any, any) => boolean, compareWithCollator: (EvaluationContext, any, any, any) => boolean): ExpressionRegistration {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\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\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\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\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals: $Call = makeComparison('==', eq, eqCollate);\nexport const NotEquals: $Call = makeComparison('<', lt, ltCollate);\nexport const GreaterThan: $Call', typeof gt, typeof gtCollate> = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual: $Call=', typeof gteq, typeof gteqCollate> = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n NumberFormat: Class\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent' | 'unit';\n currency?: null | string;\n unit?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n unit: Expression | null; // Simple units sanctioned for use in ECMAScript, required if style=unit. https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n unit: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.unit = unit;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let unit = null;\n if (options['unit']) {\n unit = context.parse(options['unit'], 1, StringType);\n if (!unit) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext): string {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style:\n (this.currency && \"currency\") ||\n (this.unit && \"unit\") ||\n \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n unit: this.unit ? this.unit.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 }\n\n eachChild(fn: (_: Expression) => void) {\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.unit) {\n fn(this.unit);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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.unit) {\n options['unit'] = this.unit.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}\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Length {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) 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 }\n\n evaluate(ctx: EvaluationContext): any | number {\n const 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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n // special forms\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};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'pitch': [\n NumberType,\n [],\n (ctx) => ctx.globals.pitch || 0\n ],\n 'distance-from-center': [\n NumberType,\n [],\n (ctx) => ctx.distanceFromCenter()\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }\n ],\n 'upcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success(value: T): Result {\n return {result: 'success', value};\n}\n\nexport function error(value: E): Result {\n return {result: 'error', value};\n}\n","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], Color.parse(stop[1])];\n });\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\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let 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\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n 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[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const 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}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\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}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'LineString' | 'Polygon',\n +id?: number | null,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: string},\n +geometry?: Array>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n pitch?: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\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 }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\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(v => JSON.stringify(v)).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 }\n}\n\nexport function isExpression(expression: mixed): boolean {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression {\n kind: Kind;\n zoomStops: Array;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom', 'pitch', 'distance-from-center']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const 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\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction {\n _parameters: PropertyValueSpecification;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array;\n\n constructor(parameters: PropertyValueSpecification, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification}): StylePropertyFunction {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n }\n\n static serialize(input: StylePropertyFunction): {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification} {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression(value: PropertyValueSpecification, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const 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\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\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","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed): mixed {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\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 const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","{\n \"$version\": 8,\n \"$root\": {\n \"version\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": [\n 8\n ],\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\": [\n -73.9749,\n 40.7736\n ]\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 \"terrain\": {\n \"type\": \"terrain\",\n \"doc\": \"A global modifier that elevates layers and markers based on a DEM data source.\"\n },\n \"fog\": {\n \"type\": \"fog\",\n \"doc\": \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0.\"\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 \"projection\": {\n \"type\": \"projection\",\n \"doc\": \"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.\",\n \"example\": {\n \"name\": \"albers\",\n \"center\": [-154, 50],\n \"parallels\": [55, 65]\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 {\n \"id\": \"water\",\n \"source\": \"mapbox-streets\",\n \"source-layer\": \"water\",\n \"type\": \"fill\",\n \"paint\": {\n \"fill-color\": \"#00ffff\"\n }\n }\n ]\n }\n },\n \"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 },\n \"source\": [\n \"source_vector\",\n \"source_raster\",\n \"source_raster_dem\",\n \"source_geojson\",\n \"source_video\",\n \"source_image\"\n ],\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id\"\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 },\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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 },\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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 },\n \"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 },\n \"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 },\n \"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 },\n \"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 \"sky\": {\n \"doc\": \"A spherical dome around the map that is always rendered behind all other layers.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.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\": \"An 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. The `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions are supported only for filter expressions on the symbol layer.\"\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 },\n \"layout\": [\n \"layout_fill\",\n \"layout_line\",\n \"layout_circle\",\n \"layout_heatmap\",\n \"layout_fill-extrusion\",\n \"layout_symbol\",\n \"layout_raster\",\n \"layout_hillshade\",\n \"layout_background\",\n \"layout_sky\"\n ],\n \"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 },\n \"layout_sky\": {\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\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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 },\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 \"fill-extrusion-edge-radius\": {\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"v2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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 \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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 {\n \"line-join\": \"miter\"\n }\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\": [\n \"zoom\"\n ]\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 {\n \"line-join\": \"round\"\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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\": [\n \"zoom\"\n ]\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 {\n \"symbol-placement\": \"line\"\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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 \"`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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\",\n \"text-field\"\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 \"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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-text-fit-padding\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n 0,\n 0,\n 0,\n 0\n ],\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\": [\n \"icon-image\",\n \"text-field\",\n {\n \"icon-text-fit\": [\n \"both\",\n \"width\",\n \"height\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n {\n \"icon-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\n ],\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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 \"`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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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 \"`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\": [\n \"zoom\"\n ]\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. SDF images are not supported in formatted text and will be ignored.\",\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-font\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"default\": [\n \"Open Sans Regular\",\n \"Arial Unicode MS Regular\"\n ],\n \"doc\": \"Font stack to use for displaying text.\",\n \"requires\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": \"2.3.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-letter-spacing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"ems\",\n \"doc\": \"Text tracking amount.\",\n \"requires\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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 \"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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\n ],\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n {\n \"!\": \"text-variable-anchor\"\n }\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\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 would be laid out horizontally.\"\n },\n \"vertical\": {\n \"doc\": \"If a text's language supports vertical writing mode, symbols 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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.\",\n \"requires\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n {\n \"text-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n 0,\n 0\n ],\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-radial-offset\"\n }\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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 },\n \"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 },\n \"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 },\n \"filter\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"doc\": \"A filter selects specific features from a layer.\"\n },\n \"filter_symbol\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\", \"pitch\", \"distance-from-center\"]\n }\n },\n \"filter_fill\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_line\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_circle\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_fill-extrusion\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_heatmap\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"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 },\n \"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 },\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\": {\n \"type\": \"array\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"value\": [\n \"number\",\n \"color\"\n ],\n \"length\": 2,\n \"doc\": \"Zoom level and value pair.\"\n },\n \"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 },\n \"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. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).\",\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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.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 for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf 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 valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.\",\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 a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-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 \"android\" : \"8.4.0\",\n \"ios\": \"5.4.0\",\n \"macos\": \"0.15.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`](#types-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`](#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. If the input is an [`'image'`](#types-image) expression, `'to-string'` returns the image name. 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\": \"Returns 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\": \"Returns 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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"geometry-type\": {\n \"doc\": \"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.\",\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\": \"Returns 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\": \"Returns 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\": \"Camera\",\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 \"pitch\": {\n \"doc\": \"Returns the current pitch in degrees. `[\\\"pitch\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"distance-from-center\": {\n \"doc\": \"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\\"distance-from-center\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"heatmap-density\": {\n \"doc\": \"Returns 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\": \"Returns 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 \"sky-radial-progress\": {\n \"doc\": \"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n \"group\": \"sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"accumulated\": {\n \"doc\": \"Returns 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 \"android\": \"8.4.0\",\n \"ios\": \"5.5.0\",\n \"macos\": \"0.15.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 \"ios\": \"4.1.0\",\n \"macos\": \"0.8.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 },\n \"fog\": {\n \"range\": {\n \"type\": \"array\",\n \"default\": [\n 0.5,\n 10\n ],\n \"minimum\": -20,\n \"maximum\": 20,\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n \"example\": [\n 0.5,\n 10\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"high-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#245cdf\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"space-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n \"#010b19\",\n 7,\n \"#367ab9\"\n ],\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"horizon-blend\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n 0.2,\n 7,\n 0.1\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"star-intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 5,\n 0.35,\n 6,\n 0\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n 1.15,\n 210,\n 30\n ],\n \"length\": 3,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\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\": [\n 1.5,\n 90,\n 80\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 }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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 },\n \"projection\": {\n \"name\": {\n \"type\": \"enum\",\n \"values\": {\n \"albers\": {\n \"doc\": \"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"equalEarth\": {\n \"doc\": \"An Equal Earth projection.\"\n },\n \"equirectangular\": {\n \"doc\": \"An Equirectangular projection. This projection is very similar to the Plate Carrée projection.\"\n },\n \"lambertConformalConic\": {\n \"doc\": \"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"mercator\": {\n \"doc\": \"The Mercator projection is the default projection.\"\n },\n \"naturalEarth\": {\n \"doc\": \"A Natural Earth projection.\"\n },\n \"winkelTripel\": {\n \"doc\": \"A Winkel Tripel projection.\"\n },\n \"globe\": {\n \"doc\": \"A globe projection.\"\n }\n },\n \"default\": \"mercator\",\n \"doc\": \"The name of the projection to be used for rendering the map.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"center\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-180, -90],\n \"maximum\": [180, 90],\n \"transition\": false,\n \"doc\": \"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].\",\n \"example\": [\n -96,\n 37.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"parallels\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-90, -90],\n \"maximum\": [90, 90],\n \"transition\": false,\n \"doc\": \"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).\",\n \"example\": [\n 29.5,\n 45.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n }\n },\n \"terrain\" : {\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"exaggeration\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 1.0,\n \"minimum\": 0,\n \"maximum\": 1000,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n \"requires\": [\n \"source\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"paint\": [\n \"paint_fill\",\n \"paint_line\",\n \"paint_circle\",\n \"paint_heatmap\",\n \"paint_fill-extrusion\",\n \"paint_symbol\",\n \"paint_raster\",\n \"paint_hillshade\",\n \"paint_background\",\n \"paint_sky\"\n ],\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"fill-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"fill-pattern\"\n },\n {\n \"fill-antialias\": true\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"fill-translate\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\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\": [\n \"zoom\"\n ]\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 {\n \"!\": \"fill-extrusion-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"fill-extrusion-translate\"\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 },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"fill-extrusion-height\"\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 \"android\": \"7.0.0\",\n \"ios\": \"4.7.0\",\n \"macos\": \"0.13.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-ambient-occlusion-intensity\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0.0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n },\n \"fill-extrusion-ambient-occlusion-radius\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 3.0,\n \"minimum\": 0,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.\",\n \"requires\": [\n \"fill-extrusion-edge-radius\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"line-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"line-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": false,\n \"units\": \"line widths\",\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\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\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"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 {\n \"!\": \"line-pattern\"\n },\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\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\": [\n \"line-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"line-trim-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"doc\": \"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].\",\n \"length\": 2,\n \"default\": [0.0, 0.0],\n \"minimum\": [0.0, 0.0],\n \"maximum\": [1.0, 1.0],\n \"transition\": false,\n \"requires\": [\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.5.0\",\n \"ios\": \"10.5.0\",\n \"macos\": \"10.5.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"circle-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"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. `queryRenderedFeatures` on heatmap layers will return points within this radius.\",\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"heatmap-color\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"heatmap-density\"\n ],\n 0,\n \"rgba(0, 0, 255, 0)\",\n 0.1,\n \"royalblue\",\n 0.3,\n \"cyan\",\n 0.5,\n \"lime\",\n 0.7,\n \"yellow\",\n 1,\n \"red\"\n ],\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\": [\n \"heatmap-density\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n \"icon-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n \"text-translate\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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 {\n \"!\": \"background-pattern\"\n }\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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 },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_sky\": {\n \"sky-type\": {\n \"type\": \"enum\",\n \"values\": {\n \"gradient\": {\n \"doc\": \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n },\n \"atmosphere\": {\n \"doc\": \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n }\n },\n \"default\": \"atmosphere\",\n \"doc\": \"The type of the sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun-intensity\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"default\": 10,\n \"minimum\": 0,\n \"maximum\": 100,\n \"transition\": false,\n \"doc\": \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-center\": {\n \"type\": \"array\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"value\": \"number\",\n \"default\": [\n 0,\n 0\n ],\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-radius\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"default\": 90,\n \"minimum\": 0,\n \"maximum\": 180,\n \"transition\": false,\n \"doc\": \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"sky-radial-progress\"\n ],\n 0.8,\n \"#87ceeb\",\n 1,\n \"white\"\n ],\n \"doc\": \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"sky-radial-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"sky-atmosphere-halo-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity of the entire sky layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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 },\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 \"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\": {\n \"*\": {\n \"type\": \"string\",\n \"doc\": \"A name of a feature property to use as ID for feature state.\"\n }\n }\n}\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport {isFeatureConstant} from '../expression/is_constant.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport latest from '../reference/latest.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type Point from '@mapbox/point-geometry';\n\nexport type FeatureDistanceData = {bearing: [number, number], center: [number, number], scale: number};\nexport type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => boolean;\nexport type FeatureFilter = {filter: FilterExpression, dynamicFilter?: FilterExpression, needGeometry: boolean, needFeature: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter, isDynamicFilter, extractStaticFilter};\n\nfunction isExpressionFilter(filter: any): boolean {\n if (filter === true || filter === false) {\n return true;\n }\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\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\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\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @param {string} layerType the type of the layer this filter will be applied to.\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any, layerType?: string = 'fill'): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false, needFeature: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n const filterExp = ((filter: any): string[] | string | boolean);\n\n let staticFilter = true;\n try {\n staticFilter = extractStaticFilter(filterExp);\n } catch (e) {\n console.warn(\n`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(filterExp, null, 2)}\n `);\n }\n\n // Compile the static component of the filter\n const filterSpec = latest[`filter_${layerType}`];\n const compiledStaticFilter = createExpression(staticFilter, filterSpec);\n\n let filterFunc = null;\n if (compiledStaticFilter.result === 'error') {\n throw new Error(compiledStaticFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n filterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical);\n }\n\n // If the static component is not equal to the entire filter then we have a dynamic component\n // Compile the dynamic component separately\n let dynamicFilterFunc = null;\n let needFeature = null;\n if (staticFilter !== filterExp) {\n const compiledDynamicFilter = createExpression(filterExp, filterSpec);\n\n if (compiledDynamicFilter.result === 'error') {\n throw new Error(compiledDynamicFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n dynamicFilterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData);\n needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression);\n }\n }\n\n filterFunc = ((filterFunc: any): FilterExpression);\n const needGeometry = geometryNeeded(staticFilter);\n\n return {\n filter: filterFunc,\n dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined,\n needGeometry,\n needFeature: !!needFeature\n };\n}\n\nfunction extractStaticFilter(filter: any): any {\n if (!isDynamicFilter(filter)) {\n return filter;\n }\n\n // Shallow copy so we can replace expressions in-place\n let result = deepUnbundle(filter);\n\n // 1. Union branches\n unionDynamicBranches(result);\n\n // 2. Collapse dynamic conditions to `true`\n result = collapseDynamicBooleanExpressions(result);\n\n return result;\n}\n\nfunction collapseDynamicBooleanExpressions(expression: any): any {\n if (!Array.isArray(expression)) {\n return expression;\n }\n\n const collapsed = collapsedExpression(expression);\n if (collapsed === true) {\n return collapsed;\n } else {\n return collapsed.map((subExpression) => collapseDynamicBooleanExpressions(subExpression));\n }\n}\n\n/**\n * Traverses the expression and replaces all instances of branching on a\n * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`)\n * into an `any` expression.\n * This ensures that all possible outcomes of a `dynamic` branch are considered\n * when evaluating the expression upfront during filtering.\n *\n * @param {Array} filter the filter expression mutated in-place.\n */\nfunction unionDynamicBranches(filter: any) {\n let isBranchingDynamically = false;\n const branches = [];\n\n if (filter[0] === 'case') {\n for (let i = 1; i < filter.length - 1; i += 2) {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]);\n branches.push(filter[i + 1]);\n }\n\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'match') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 2; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'step') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 1; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n }\n\n if (isBranchingDynamically) {\n filter.length = 0;\n filter.push('any', ...branches);\n }\n\n // traverse and recurse into children\n for (let i = 1; i < filter.length; i++) {\n unionDynamicBranches(filter[i]);\n }\n}\n\nfunction isDynamicFilter(filter: any): boolean {\n // Base Cases\n if (!Array.isArray(filter)) {\n return false;\n }\n if (isRootExpressionDynamic(filter[0])) {\n return true;\n }\n\n for (let i = 1; i < filter.length; i++) {\n const child = filter[i];\n if (isDynamicFilter(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isRootExpressionDynamic(expression: string): boolean {\n return expression === 'pitch' ||\n expression === 'distance-from-center';\n}\n\nconst dynamicConditionExpressions = new Set([\n 'in',\n '==',\n '!=',\n '>',\n '>=',\n '<',\n '<=',\n 'to-boolean'\n]);\n\nfunction collapsedExpression(expression: any): any {\n if (dynamicConditionExpressions.has(expression[0])) {\n\n for (let i = 1; i < expression.length; i++) {\n const param = expression[i];\n if (isDynamicFilter(param)) {\n return true;\n }\n }\n }\n return expression;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\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}\n\nfunction convertDisjunctionOp(filters: Array>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array) {\n if (values.length === 0) { return false; }\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(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\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}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","// @flow\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// @flow\n\nimport refProperties from './util/ref_properties.js';\n\nimport type {LayerSpecification} from './types.js';\n\nfunction deref(layer: LayerSpecification, parent: LayerSpecification): LayerSpecification {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = (parent: any)[k];\n }\n });\n\n return ((result: any): LayerSpecification);\n}\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nexport default function derefLayers(layers: Array): Array {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[(layers[i]: any).ref]);\n }\n }\n\n return layers;\n}\n","var 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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp)\n .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","const mapboxBaseUrl = 'https://api.mapbox.com';\n\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n const startsWith = 'mapbox://';\n if (url.indexOf(startsWith) !== 0) {\n return '';\n }\n return url.slice(startsWith.length);\n}\n\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @param {string} styleUrl The style URL.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token, styleUrl) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, styleUrl).href);\n }\n const startsWith = 'sprites/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected sprites url: ${url}`);\n }\n const sprite = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, location.href).href);\n }\n const startsWith = 'styles/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected style url: ${url}`);\n }\n const style = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @param {string} tokenParam The access token key.\n * @param {string} styleUrl The style URL.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token, tokenParam, styleUrl) {\n const urlObject = new URL(url, styleUrl);\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n if (!token) {\n return decodeURI(urlObject.href);\n }\n urlObject.searchParams.set(tokenParam, token);\n return decodeURI(urlObject.href);\n }\n\n if (mapboxPath === 'mapbox.satellite') {\n const sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : '';\n return `https://api.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}${sizeFactor}.webp?access_token=${token}`;\n }\n return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n","import TileState from 'ol/TileState.js';\nimport {VectorTile} from 'ol';\nimport {expandUrl} from 'ol/tileurlfunction.js';\nimport {getUid} from 'ol/util.js';\nimport {normalizeSourceUrl, normalizeStyleUrl} from './mapbox.js';\n\n/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */\n\n/** @typedef {import(\"ol\").Map} Map */\n/** @typedef {import(\"ol/layer\").Layer} Layer */\n/** @typedef {import(\"ol/layer\").Group} LayerGroup */\n/** @typedef {import(\"ol/layer\").Vector} VectorLayer */\n/** @typedef {import(\"ol/layer\").VectorTile} VectorTileLayer */\n/** @typedef {import(\"ol/source\").Source} Source */\n\nconst functionCacheByStyleId = {};\nconst filterCacheByStyleId = {};\n\nlet styleId = 0;\nexport function getStyleId(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n return glStyle.id;\n}\n\nexport function getStyleFunctionKey(glStyle, olLayer) {\n return getStyleId(glStyle) + '.' + getUid(olLayer);\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Function cache.\n */\nexport function getFunctionCache(glStyle) {\n let functionCache = functionCacheByStyleId[glStyle.id];\n if (!functionCache) {\n functionCache = {};\n functionCacheByStyleId[getStyleId(glStyle)] = functionCache;\n }\n return functionCache;\n}\n\nexport function clearFunctionCache() {\n for (const key in functionCacheByStyleId) {\n delete functionCacheByStyleId[key];\n }\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Filter cache.\n */\nexport function getFilterCache(glStyle) {\n let filterCache = filterCacheByStyleId[glStyle.id];\n if (!filterCache) {\n filterCache = {};\n filterCacheByStyleId[getStyleId(glStyle)] = filterCache;\n }\n return filterCache;\n}\n\nexport function deg2rad(degrees) {\n return (degrees * Math.PI) / 180;\n}\n\nexport const defaultResolutions = (function () {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\n\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n return /** @type {?} */ (new OffscreenCanvas(width, height));\n }\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst pendingRequests = {};\n/**\n * @param {ResourceType} resourceType Type of resource to load.\n * @param {string} url Url of the resource.\n * @param {Options} [options={}] Options.\n * @param {{request?: Request}} [metadata] Object to be filled with the request.\n * @return {Promise} Promise that resolves with the loaded resource\n * or rejects with the Response object.\n * @private\n */\nexport function fetchResource(resourceType, url, options = {}, metadata) {\n if (url in pendingRequests) {\n if (metadata) {\n metadata.request = pendingRequests[url][0];\n }\n return pendingRequests[url][1];\n }\n let transformedRequest = options.transformRequest\n ? options.transformRequest(url, resourceType) || url\n : url;\n if (!(transformedRequest instanceof Request)) {\n transformedRequest = new Request(transformedRequest);\n }\n if (!transformedRequest.headers.get('Accept')) {\n transformedRequest.headers.set('Accept', 'application/json');\n }\n if (metadata) {\n metadata.request = transformedRequest;\n }\n const pendingRequest = fetch(transformedRequest)\n .then(function (response) {\n delete pendingRequests[url];\n return response.ok\n ? response.json()\n : Promise.reject(new Error('Error fetching source ' + url));\n })\n .catch(function (error) {\n delete pendingRequests[url];\n return Promise.reject(new Error('Error fetching source ' + url));\n });\n pendingRequests[url] = [transformedRequest, pendingRequest];\n return pendingRequest;\n}\n\nexport function getGlStyle(glStyleOrUrl, options) {\n if (typeof glStyleOrUrl === 'string') {\n if (glStyleOrUrl.trim().startsWith('{')) {\n try {\n const glStyle = JSON.parse(glStyleOrUrl);\n return Promise.resolve(glStyle);\n } catch (error) {\n return Promise.reject(error);\n }\n } else {\n glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken);\n return fetchResource('Style', glStyleOrUrl, options);\n }\n } else {\n return Promise.resolve(glStyleOrUrl);\n }\n}\n\nconst tilejsonCache = {};\n/**\n * @param {Object} glSource glStyle source object.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise<{tileJson: Object, tileLoadFunction: import('ol/Tile.js').LoadFunction}?>} TileJson and load function\n */\nexport function getTileJson(glSource, styleUrl, options = {}) {\n const cacheKey = [styleUrl, JSON.stringify(glSource)].toString();\n let promise = tilejsonCache[cacheKey];\n if (!promise || options.transformRequest) {\n let tileLoadFunction;\n if (options.transformRequest) {\n tileLoadFunction = (tile, src) => {\n const transformedRequest = options.transformRequest\n ? options.transformRequest(src, 'Tiles') || src\n : src;\n if (tile instanceof VectorTile) {\n tile.setLoader((extent, resolution, projection) => {\n fetch(transformedRequest)\n .then((response) => response.arrayBuffer())\n .then((data) => {\n const format = tile.getFormat();\n const features = format.readFeatures(data, {\n extent: extent,\n featureProjection: projection,\n });\n // @ts-ignore\n tile.setFeatures(features);\n })\n .catch((e) => tile.setState(TileState.ERROR));\n });\n } else {\n const img = tile.getImage();\n if (transformedRequest instanceof Request) {\n fetch(transformedRequest)\n .then((response) => response.blob())\n .then((blob) => {\n const url = URL.createObjectURL(blob);\n img.addEventListener('load', () => URL.revokeObjectURL(url));\n img.addEventListener('error', () => URL.revokeObjectURL(url));\n img.src = url;\n })\n .catch((e) => tile.setState(TileState.ERROR));\n } else {\n img.src = transformedRequest;\n }\n }\n };\n }\n const url = glSource.url;\n if (url && !glSource.tiles) {\n const normalizedSourceUrl = normalizeSourceUrl(\n url,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (url.startsWith('mapbox://')) {\n promise = Promise.resolve({\n tileJson: Object.assign({}, glSource, {\n url: undefined,\n tiles: expandUrl(normalizedSourceUrl),\n }),\n tileLoadFunction,\n });\n } else {\n const metadata = {};\n promise = fetchResource(\n 'Source',\n normalizedSourceUrl,\n options,\n metadata\n ).then(function (tileJson) {\n tileJson.tiles = tileJson.tiles.map(function (tileUrl) {\n if (tileJson.scheme === 'tms') {\n tileUrl = tileUrl.replace('{y}', '{-y}');\n }\n return normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n metadata.request.url\n );\n });\n return Promise.resolve({tileJson, tileLoadFunction});\n });\n }\n } else {\n glSource = Object.assign({}, glSource, {\n tiles: glSource.tiles.map(function (tileUrl) {\n if (glSource.scheme === 'tms') {\n tileUrl = tileUrl.replace('{y}', '{-y}');\n }\n return normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n }),\n });\n promise = Promise.resolve({\n tileJson: Object.assign({}, glSource),\n tileLoadFunction,\n });\n }\n tilejsonCache[cacheKey] = promise;\n }\n return promise;\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} spriteImage Sprite image id.\n * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data.\n * @param {number} haloWidth Halo width.\n * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color.\n * @return {HTMLCanvasElement} Canvas element with the halo.\n */\nexport function drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n) {\n const imageCanvas = document.createElement('canvas');\n const imgSize = [\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width,\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height,\n ];\n imageCanvas.width = imgSize[0];\n imageCanvas.height = imgSize[1];\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n haloWidth * spriteImageData.pixelRatio,\n haloWidth * spriteImageData.pixelRatio,\n spriteImageData.width,\n spriteImageData.height\n );\n const imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]);\n imageContext.globalCompositeOperation = 'destination-over';\n imageContext.fillStyle = `rgba(${haloColor.r * 255},${haloColor.g * 255},${\n haloColor.b * 255\n },${haloColor.a})`;\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const alpha = data[index + 3];\n if (alpha > 0) {\n imageContext.arc(\n i,\n j,\n haloWidth * spriteImageData.pixelRatio,\n 0,\n 2 * Math.PI\n );\n }\n }\n }\n imageContext.fill();\n return imageCanvas;\n}\n\nfunction smoothstep(min, max, value) {\n const x = Math.max(0, Math.min(1, (value - min) / (max - min)));\n return x * x * (3 - 2 * x);\n}\n\n/**\n * @param {HTMLImageElement} image SDF image\n * @param {{x: number, y: number, width: number, height: number}} area Area to unSDF\n * @param {{r: number, g: number, b: number, a: number}} color Color to use\n * @return {HTMLCanvasElement} Regular image\n */\nexport function drawSDF(image, area, color) {\n const imageCanvas = document.createElement('canvas');\n imageCanvas.width = area.width;\n imageCanvas.height = area.height;\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n image,\n area.x,\n area.y,\n area.width,\n area.height,\n 0,\n 0,\n area.width,\n area.height\n );\n const imageData = imageContext.getImageData(0, 0, area.width, area.height);\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const dist = data[index + 3] / 255;\n\n const buffer = 0.75;\n const gamma = 0.1;\n\n const alpha = smoothstep(buffer - gamma, buffer + gamma, dist);\n if (alpha > 0) {\n data[index + 0] = Math.round(255 * color.r * alpha);\n data[index + 1] = Math.round(255 * color.g * alpha);\n data[index + 2] = Math.round(255 * color.b * alpha);\n data[index + 3] = Math.round(255 * alpha);\n } else {\n data[index + 3] = 0;\n }\n }\n }\n imageContext.putImageData(imageData, 0, 0);\n return imageCanvas;\n}\n\n/**\n * @typedef {import(\"./apply.js\").Options} Options\n * @private\n */\n","import mb2css from 'mapbox-to-css-font';\nimport {checkedFonts, registerFont} from 'ol/render/canvas.js';\nimport {createCanvas} from './util.js';\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(\n 0,\n Math.round(letterSpacing / 0.1)\n );\n for (let 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}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return (\n getMeasureContext().measureText(text).width +\n (text.length - 1) * letterSpacing\n );\n}\n\nconst measureCache = {};\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let 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 const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const 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 (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth =\n i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth =\n 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;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (\n measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6\n ) {\n const lineWords = line.split(' ');\n const 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\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const 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}\n\nconst processedFontFamilies = {};\n\n/**\n * @param {Array} fonts Fonts.\n * @param {string} [templateUrl] Template URL.\n * @return {Array} Processed fonts.\n * @private\n */\nexport function getFonts(\n fonts,\n templateUrl = 'https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css'\n) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return processedFontFamilies[fontsKey];\n }\n const fontDescriptions = [];\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial');\n const font = fonts[i];\n const cssFont = mb2css(font, 1);\n registerFont(cssFont);\n const parts = cssFont.split(' ');\n fontDescriptions.push([\n parts.slice(3).join(' ').replace(/\"/g, ''),\n parts[1],\n parts[0],\n ]);\n }\n for (let i = 0, ii = fontDescriptions.length; i < ii; ++i) {\n const fontDescription = fontDescriptions[i];\n const family = fontDescription[0];\n if (!hasFontFamily(family)) {\n if (\n checkedFonts.get(\n `${fontDescription[2]}\\n${fontDescription[1]} \\n${family}`\n ) !== 100\n ) {\n const fontUrl = templateUrl\n .replace('{font-family}', family.replace(/ /g, '-').toLowerCase())\n .replace('{Font+Family}', family.replace(/ /g, '+'))\n .replace('{fontweight}', fontDescription[1])\n .replace(\n '{-fontstyle}',\n fontDescription[2].replace('normal', '').replace(/(.+)/, '-$1')\n )\n .replace('{fontstyle}', fontDescription[2]);\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n }\n processedFontFamilies[fontsKey] = fonts;\n return fonts;\n}\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport convertFunction from '@mapbox/mapbox-gl-style-spec/function/convert.js';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter/index.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport mb2css from 'mapbox-to-css-font';\nimport spec from '@mapbox/mapbox-gl-style-spec/reference/v8.json';\nimport {applyLetterSpacing, wrapText} from './text.js';\nimport {\n clearFunctionCache,\n createCanvas,\n defaultResolutions,\n deg2rad,\n drawIconHalo,\n drawSDF,\n getFilterCache,\n getFunctionCache,\n getStyleFunctionKey,\n getZoomForResolution,\n} from './util.js';\nimport {\n createPropertyExpression,\n isExpression,\n} from '@mapbox/mapbox-gl-style-spec/expression/index.js';\nimport {isFunction} from '@mapbox/mapbox-gl-style-spec/function/index.js';\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 * @typedef {import('./util.js').ResourceType} ResourceType\n */\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3,\n};\nconst 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};\n\nconst expressionData = function (rawExpression, propertySpec) {\n const compiledExpression = createPropertyExpression(\n rawExpression,\n propertySpec\n );\n if (compiledExpression.result === 'error') {\n throw new Error(\n compiledExpression.value\n .map((err) => `${err.key}: ${err.message}`)\n .join(', ')\n );\n }\n return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\nlet renderFeatureCoordinates, renderFeature;\n\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 * @param {Object} [functionCache] Function cache.\n * @param {Object} [featureState] Feature state.\n * @return {?} Value.\n */\nexport function getValue(\n layer,\n layoutOrPaint,\n property,\n zoom,\n feature,\n functionCache,\n featureState\n) {\n const layerId = layer.id;\n if (!functionCache) {\n functionCache = {};\n console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console\n }\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = (layer[layoutOrPaint] || emptyObj)[property];\n const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n if (value === undefined) {\n value = propertySpec.default;\n }\n let isExpr = isExpression(value);\n if (!isExpr && isFunction(value)) {\n value = convertFunction(value, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n const compiledExpression = expressionData(value, propertySpec);\n functions[property] =\n compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value = Color.parse(value);\n }\n functions[property] = function () {\n return value;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature, featureState);\n}\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @param {Object} [functionCache] Function cache.\n * @return {\"declutter\"|\"obstacle\"|\"none\"} Value.\n */\nfunction getIconDeclutterMode(layer, zoom, feature, functionCache) {\n const allowOverlap = getValue(\n layer,\n 'layout',\n 'icon-allow-overlap',\n zoom,\n feature,\n functionCache\n );\n if (!allowOverlap) {\n return 'declutter';\n }\n const ignorePlacement = getValue(\n layer,\n 'layout',\n 'icon-ignore-placement',\n zoom,\n feature,\n functionCache\n );\n if (!ignorePlacement) {\n return 'obstacle';\n }\n return 'none';\n}\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @param {Object} [filterCache] Filter cache.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom, filterCache) {\n if (!filterCache) {\n console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console\n }\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n\nlet renderTransparentEnabled = false;\n\n/**\n * Configure whether features with a transparent style should be rendered. When\n * set to `true`, it will be possible to hit detect content that is not visible,\n * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or\n * `ol/Map#getFeaturesAtPixel()`\n * @param {boolean} enabled Rendering of transparent elements is enabled.\n * Default is `false`.\n */\nexport function renderTransparent(enabled) {\n if (enabled !== renderTransparentEnabled) {\n clearFunctionCache();\n renderTransparentEnabled = enabled;\n }\n}\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 (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) {\n return undefined;\n }\n const a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return a === 0\n ? 'transparent'\n : 'rgba(' +\n Math.round((color.r * 255) / a) +\n ',' +\n Math.round((color.g * 255) / a) +\n ',' +\n Math.round((color.b * 255) / a) +\n ',' +\n a * opacity +\n ')';\n }\n return color;\n}\n\nconst templateRegEx = /\\{[^{}}]*\\}/g;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n return text.replace(templateRegEx, function (match) {\n return properties[match.slice(1, -1)] || '';\n });\n}\n\nlet recordLayer = false;\n\n/**\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} record Recording of the style layer is on.\n */\nexport function recordStyleLayer(record = false) {\n recordLayer = record;\n}\n\nexport const styleFunctionArgs = {};\n\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} sourceOrLayers `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\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} spriteData 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 {string|Request} spriteImageUrl 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, string=):Array} getFonts Function that\n * receives a font stack and the url template from the GL style's `metadata['ol:webfonts']`\n * property (if set) 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 * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function can be used for icons not in the sprite or to override sprite icons.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport function stylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions = defaultResolutions,\n spriteData = undefined,\n spriteImageUrl = undefined,\n getFonts = undefined,\n getImage = undefined\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 styleFunctionArgs[getStyleFunctionKey(glStyle, olLayer)] =\n Array.from(arguments);\n\n let spriteImage, spriteImageSize;\n let spriteImageUnSDFed;\n\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n const img = new Image();\n let blobUrl;\n if (spriteImageUrl instanceof Request) {\n fetch(spriteImageUrl)\n .then((response) => response.blob())\n .then((blob) => {\n blobUrl = URL.createObjectURL(blob);\n img.src = blobUrl;\n })\n .catch(() => {});\n } else {\n img.crossOrigin = 'anonymous';\n img.src = spriteImageUrl;\n if (blobUrl) {\n URL.revokeObjectURL(blobUrl);\n }\n }\n img.onload = function () {\n spriteImage = img;\n spriteImageSize = [img.width, img.height];\n olLayer.changed();\n img.onload = null;\n };\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n const 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 (\n event.data.action === 'imageLoaded' &&\n event.data.src === spriteImageUrl\n ) {\n spriteImage = event.data.image;\n spriteImageSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n\n const iconImageCache = {};\n const patternCache = {};\n const functionCache = getFunctionCache(glStyle);\n const filterCache = getFilterCache(glStyle);\n\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n const layerId = layer.id;\n if (\n (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers) ||\n sourceOrLayers.indexOf(layerId) !== -1\n ) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n const source = glStyle.sources[mapboxSource];\n if (!source) {\n throw new Error(`Source \"${mapboxSource}\" is not defined`);\n }\n const type = source.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(\n `Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`\n );\n }\n } else if (layer.source !== mapboxSource) {\n throw new Error(\n `Layer \"${layerId}\" does not use source \"${mapboxSource}`\n );\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = [];\n layersBySourceLayer[sourceLayer] = layers;\n }\n layers.push({\n layer: layer,\n index: i,\n });\n mapboxLayers.push(layerId);\n }\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const styles = [];\n\n /**\n * @param {import(\"ol/Feature\").default|import(\"ol/render/Feature\").default} feature Feature.\n * @param {number} resolution Resolution.\n * @param {string} [onlyLayer] Calculate style for this layer only.\n * @return {Array} Style.\n */\n const styleFunction = function (feature, resolution, onlyLayer) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return undefined;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n id: feature.getId(),\n properties: properties,\n type: type,\n };\n const featureState = olLayer.get('mapbox-featurestate')[feature.getId()];\n let stylesLength = -1;\n let featureBelongsToLayer;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n if (onlyLayer !== undefined && onlyLayer !== layerId) {\n continue;\n }\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (\n layout.visibility === 'none' ||\n ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)\n ) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) {\n featureBelongsToLayer = layer;\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (\n type == 3 &&\n (layer.type == 'fill' || layer.type == 'fill-extrusion')\n ) {\n opacity = getValue(\n layer,\n 'paint',\n layer.type + '-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (layer.type + '-pattern' in paint) {\n const fillIcon = getValue(\n layer,\n 'paint',\n layer.type + '-pattern',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (fillIcon) {\n const icon =\n typeof fillIcon === 'string'\n ? fromTemplate(fillIcon, properties)\n : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getFill() ||\n style.getStroke() ||\n style.getText()\n ) {\n style = new Style({\n fill: new Fill(),\n });\n styles[stylesLength] = style;\n }\n fill = style.getFill();\n style.setZIndex(index);\n const icon_cache_key = icon + '.' + opacity;\n let pattern = patternCache[icon_cache_key];\n if (!pattern) {\n const spriteImageData = spriteData[icon];\n const canvas = createCanvas(\n spriteImageData.width,\n spriteImageData.height\n );\n const ctx = /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d')\n );\n ctx.globalAlpha = opacity;\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n if (layer.type + '-outline-color' in paint) {\n strokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-outline-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n if (color || strokeColor) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n (color && !style.getFill()) ||\n (!color && style.getFill()) ||\n (strokeColor && !style.getStroke()) ||\n (!strokeColor && style.getStroke()) ||\n style.getText()\n ) {\n style = new Style({\n fill: color ? new Fill() : undefined,\n stroke: strokeColor ? new Stroke() : undefined,\n });\n styles[stylesLength] = style;\n }\n if (color) {\n fill = style.getFill();\n fill.setColor(color);\n }\n if (strokeColor) {\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(0.5);\n }\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color =\n !('line-pattern' in paint) && 'line-color' in paint\n ? colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'line-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'line-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n : undefined;\n const width = getValue(\n layer,\n 'paint',\n 'line-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getStroke() ||\n style.getFill() ||\n style.getText()\n ) {\n style = new Style({\n stroke: new Stroke(),\n });\n styles[stylesLength] = style;\n }\n stroke = style.getStroke();\n stroke.setLineCap(\n getValue(\n layer,\n 'layout',\n 'line-cap',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setLineJoin(\n getValue(\n layer,\n 'layout',\n 'line-join',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setMiterLimit(\n getValue(\n layer,\n 'layout',\n 'line-miter-limit',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(\n paint['line-dasharray']\n ? getValue(\n layer,\n 'paint',\n 'line-dasharray',\n zoom,\n f,\n functionCache,\n featureState\n ).map(function (x) {\n return x * width;\n })\n : null\n );\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let placementAngle = 0;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(\n layer,\n 'layout',\n 'icon-image',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (iconImage) {\n icon =\n typeof iconImage === 'string'\n ? fromTemplate(iconImage, properties)\n : iconImage.toString();\n let styleGeom = undefined;\n const imageElement = getImage ? getImage(olLayer, icon) : undefined;\n if (\n (spriteImage && spriteData && spriteData[icon]) ||\n imageElement\n ) {\n const iconRotationAlignment = getValue(\n layer,\n 'layout',\n 'icon-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (type == 2) {\n const geom = /** @type {*} */ (feature.getGeometry());\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n const extent = geom.getExtent();\n const size = Math.sqrt(\n Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2)\n )\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n const midpoint =\n geom.getType() === 'MultiLineString'\n ? geom.getFlatMidpoints()\n : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new RenderFeature(\n 'Point',\n renderFeatureCoordinates,\n [],\n {},\n null\n );\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n const placement = getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (\n placement === 'line' &&\n iconRotationAlignment === 'map'\n ) {\n const stride = geom.getStride();\n const coordinates = geom.getFlatCoordinates();\n for (\n let i = 0, ii = coordinates.length - stride;\n i < ii;\n i += stride\n ) {\n const x1 = coordinates[i];\n const y1 = coordinates[i + 1];\n const x2 = coordinates[i + stride];\n const y2 = coordinates[i + stride + 1];\n const minX = Math.min(x1, x2);\n const minY = Math.min(y1, y2);\n const maxX = Math.max(x1, x2);\n const maxY = Math.max(y1, y2);\n if (\n midpoint[0] >= minX &&\n midpoint[0] <= maxX &&\n midpoint[1] >= minY &&\n midpoint[1] <= maxY\n ) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n const iconSize = getValue(\n layer,\n 'layout',\n 'icon-size',\n zoom,\n f,\n functionCache,\n featureState\n );\n const iconColor =\n paint['icon-color'] !== undefined\n ? getValue(\n layer,\n 'paint',\n 'icon-color',\n zoom,\n f,\n functionCache,\n featureState\n )\n : null;\n if (!iconColor || iconColor.a !== 0) {\n const haloColor = getValue(\n layer,\n 'paint',\n 'icon-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n );\n const haloWidth = getValue(\n layer,\n 'paint',\n 'icon-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n let iconCacheKey = `${icon}.${iconSize}.${haloWidth}.${haloColor}`;\n if (iconColor !== null) {\n iconCacheKey += `.${iconColor}`;\n }\n iconImg = iconImageCache[iconCacheKey];\n if (!iconImg) {\n const declutterMode = getIconDeclutterMode(\n layer,\n zoom,\n f,\n functionCache\n );\n let displacement;\n if ('icon-offset' in layout) {\n displacement = getValue(\n layer,\n 'layout',\n 'icon-offset',\n zoom,\n f,\n functionCache,\n featureState\n ).slice(0);\n displacement[1] *= -1;\n }\n let color = iconColor\n ? [\n iconColor.r * 255,\n iconColor.g * 255,\n iconColor.b * 255,\n iconColor.a,\n ]\n : undefined;\n if (imageElement) {\n const iconOptions = {\n color: color,\n rotateWithView: iconRotationAlignment === 'map',\n displacement: displacement,\n declutterMode: declutterMode,\n };\n if (typeof imageElement === 'string') {\n // it is a src URL\n iconOptions.src = imageElement;\n } else {\n iconOptions.img = imageElement;\n iconOptions.imgSize = [\n imageElement.width,\n imageElement.height,\n ];\n }\n iconImg = new Icon(iconOptions);\n } else {\n const spriteImageData = spriteData[icon];\n let img, size, offset;\n if (haloWidth) {\n if (spriteImageData.sdf) {\n img = drawIconHalo(\n drawSDF(spriteImage, spriteImageData, iconColor),\n {\n x: 0,\n y: 0,\n width: spriteImageData.width,\n height: spriteImageData.height,\n pixelRatio: spriteImageData.pixelRatio,\n },\n haloWidth,\n haloColor\n );\n color = undefined; // do not tint haloed icons\n } else {\n img = drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n );\n }\n } else {\n if (spriteImageData.sdf) {\n if (!spriteImageUnSDFed) {\n spriteImageUnSDFed = drawSDF(\n spriteImage,\n {\n x: 0,\n y: 0,\n width: spriteImageSize[0],\n height: spriteImageSize[1],\n },\n {r: 1, g: 1, b: 1, a: 1}\n );\n }\n img = spriteImageUnSDFed;\n } else {\n img = spriteImage;\n }\n size = [spriteImageData.width, spriteImageData.height];\n offset = [spriteImageData.x, spriteImageData.y];\n }\n iconImg = new Icon({\n color: color,\n img: img,\n // @ts-ignore\n imgSize: spriteImageSize,\n size: size,\n offset: offset,\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio,\n displacement: displacement,\n declutterMode: declutterMode,\n });\n }\n iconImageCache[iconCacheKey] = iconImg;\n }\n }\n if (iconImg) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setGeometry(styleGeom);\n iconImg.setRotation(\n placementAngle +\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'icon-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n iconImg.setOpacity(\n getValue(\n layer,\n 'paint',\n 'icon-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n iconImg.setAnchor(\n anchor[\n getValue(\n layer,\n 'layout',\n 'icon-anchor',\n zoom,\n f,\n functionCache,\n featureState\n )\n ]\n );\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setZIndex(index);\n hasImage = true;\n skipLabel = false;\n }\n } else {\n skipLabel = true;\n }\n }\n }\n }\n\n if (type == 1 && layer.type === 'circle') {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n const circleRadius =\n 'circle-radius' in paint\n ? getValue(\n layer,\n 'paint',\n 'circle-radius',\n zoom,\n f,\n functionCache,\n featureState\n )\n : 5;\n const circleStrokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-stroke-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-stroke-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleStrokeWidth = getValue(\n layer,\n 'paint',\n 'circle-stroke-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const cache_key =\n circleRadius +\n '.' +\n circleStrokeColor +\n '.' +\n circleColor +\n '.' +\n circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = new Circle({\n radius: circleRadius,\n stroke:\n circleStrokeColor && circleStrokeWidth > 0\n ? new Stroke({\n width: circleStrokeWidth,\n color: circleStrokeColor,\n })\n : undefined,\n fill: circleColor\n ? new Fill({\n color: circleColor,\n })\n : undefined,\n declutterMode: 'none',\n });\n iconImageCache[cache_key] = iconImg;\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\n let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth;\n if ('text-field' in layout) {\n textSize = Math.round(\n getValue(\n layer,\n 'layout',\n 'text-size',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const fontArray = getValue(\n layer,\n 'layout',\n 'text-font',\n zoom,\n f,\n functionCache,\n featureState\n );\n textLineHeight = getValue(\n layer,\n 'layout',\n 'text-line-height',\n zoom,\n f,\n functionCache,\n featureState\n );\n font = mb2css(\n getFonts\n ? getFonts(\n fontArray,\n glStyle.metadata ? glStyle.metadata['ol:webfonts'] : undefined\n )\n : fontArray,\n textSize,\n textLineHeight\n );\n if (!font.includes('sans-serif')) {\n font += ',sans-serif';\n }\n letterSpacing = getValue(\n layer,\n 'layout',\n 'text-letter-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n maxTextWidth = getValue(\n layer,\n 'layout',\n 'text-max-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textField = getValue(\n layer,\n 'layout',\n 'text-field',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (typeof textField === 'object' && textField.sections) {\n if (textField.sections.length === 1) {\n label = textField.toString();\n } else {\n label = textField.sections.reduce((acc, chunk, i) => {\n const fonts = chunk.fontStack\n ? chunk.fontStack.split(',')\n : fontArray;\n const chunkFont = mb2css(\n getFonts ? getFonts(fonts) : fonts,\n textSize * (chunk.scale || 1),\n textLineHeight\n );\n let text = chunk.text;\n if (text === '\\n') {\n acc.push('\\n', '');\n return acc;\n }\n if (type == 2) {\n acc.push(applyLetterSpacing(text, letterSpacing), chunkFont);\n return;\n }\n text = wrapText(\n text,\n chunkFont,\n maxTextWidth,\n letterSpacing\n ).split('\\n');\n for (let i = 0, ii = text.length; i < ii; ++i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(text[i], chunkFont);\n }\n return acc;\n }, []);\n }\n } else {\n label = fromTemplate(textField, properties).trim();\n }\n opacity = getValue(\n layer,\n 'paint',\n 'text-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getText() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(\n text ||\n new Text({\n padding: [2, 2, 2, 2],\n })\n );\n }\n text = style.getText();\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toUpperCase()))\n : label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toLowerCase()))\n : label.toLowerCase();\n }\n const wrappedLabel = Array.isArray(label)\n ? label\n : type == 2\n ? applyLetterSpacing(label, letterSpacing)\n : wrapText(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n const textAnchor = getValue(\n layer,\n 'layout',\n 'text-anchor',\n zoom,\n f,\n functionCache,\n featureState\n );\n const placement =\n hasImage || type == 1\n ? 'point'\n : getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n let textAlign;\n if (placement === 'line-center') {\n text.setPlacement('line');\n textAlign = 'center';\n } else {\n text.setPlacement(placement);\n }\n if (placement === 'line' && typeof text.setRepeat === 'function') {\n const symbolSpacing = getValue(\n layer,\n 'layout',\n 'symbol-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRepeat(symbolSpacing * 2);\n }\n text.setOverflow(placement === 'point');\n let textHaloWidth = getValue(\n layer,\n 'paint',\n 'text-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textOffset = getValue(\n layer,\n 'layout',\n 'text-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textTranslate = getValue(\n layer,\n 'paint',\n 'text-translate',\n zoom,\n f,\n functionCache,\n featureState\n );\n // Text offset has to take halo width and line height into account\n let vOffset = 0;\n let hOffset = 0;\n if (placement == 'point') {\n 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 const textRotationAlignment = getValue(\n layer,\n 'layout',\n 'text-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle(\n (deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-max-angle',\n zoom,\n f,\n functionCache,\n featureState\n )\n ) *\n label.length) /\n wrappedLabel.length\n );\n text.setRotateWithView(false);\n }\n text.setTextAlign(textAlign);\n let 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 const textJustify = getValue(\n layer,\n 'layout',\n 'text-justify',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setJustify(textJustify === 'auto' ? undefined : textJustify);\n text.setOffsetX(\n textOffset[0] * textSize + hOffset + textTranslate[0]\n );\n text.setOffsetY(\n textOffset[1] * textSize + vOffset + textTranslate[1]\n );\n textColor.setColor(\n colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n )\n );\n text.setFill(textColor);\n const haloColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\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 const halfTextSize = 0.5 * textSize;\n textHalo.setWidth(\n textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize\n );\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n const textPadding = getValue(\n layer,\n 'layout',\n 'text-padding',\n zoom,\n f,\n functionCache,\n featureState\n );\n const padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = textPadding;\n padding[1] = textPadding;\n padding[2] = textPadding;\n padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n if (recordLayer) {\n if ('set' in feature) {\n // ol/Feature\n feature.set('mapbox-layer', featureBelongsToLayer);\n } else {\n // ol/render/Feature\n feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n }\n }\n return styles;\n }\n return undefined;\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n olLayer.set('mapbox-featurestate', olLayer.get('mapbox-featurestate') || {});\n return styleFunction;\n}\n\n/**\n * Get the the style for a specific Mapbox layer only. This can be useful for creating a legend.\n * @param {import(\"ol/Feature\").default|import(\"ol/render/Feature\").default} feature OpenLayers feature.\n * @param {number} resolution View resolution.\n * @param {import(\"ol/layer\").Vector|import(\"ol/layer\").VectorTile} olLayer OpenLayers layer.\n * @param {string} layerId Id of the Mapbox layer to get the style for\n * @return {Array} Styles for the provided Mapbox layer.\n */\nexport function getStyleForLayer(feature, resolution, olLayer, layerId) {\n const evaluateStyle = olLayer.getStyleFunction();\n if (evaluateStyle.length === 3) {\n // @ts-ignore\n return evaluateStyle(feature, resolution, layerId);\n }\n return undefined;\n}\n\nexport {\n colorWithOpacity as _colorWithOpacity,\n evaluateFilter as _evaluateFilter,\n fromTemplate as _fromTemplate,\n getValue as _getValue,\n};\n","/**\n * Generates a shaded relief image given elevation data. Uses a 3x3\n * neighborhood for determining slope and aspect.\n * @param {Array} inputs Array of input images.\n * @param {Object} data Data added in the \"beforeoperations\" event.\n * @return {ImageData} Output image.\n */\nexport function hillshade(inputs, data) {\n const elevationImage = inputs[0];\n const width = elevationImage.width;\n const height = elevationImage.height;\n const elevationData = elevationImage.data;\n const shadeData = new Uint8ClampedArray(elevationData.length);\n const dp = data.resolution * 2;\n const maxX = width - 1;\n const maxY = height - 1;\n const pixel = [0, 0, 0, 0];\n const twoPi = 2 * Math.PI;\n const halfPi = Math.PI / 2;\n const sunEl = (Math.PI * data.sunEl) / 180;\n const sunAz = (Math.PI * data.sunAz) / 180;\n const cosSunEl = Math.cos(sunEl);\n const sinSunEl = Math.sin(sunEl);\n const highlightColor = data.highlightColor;\n const shadowColor = data.shadowColor;\n const accentColor = data.accentColor;\n const encoding = data.encoding;\n\n let pixelX,\n pixelY,\n x0,\n x1,\n y0,\n y1,\n offset,\n z0,\n z1,\n dzdx,\n dzdy,\n slope,\n aspect,\n accent,\n scaled,\n shade,\n scaledAccentColor,\n compositeShadeColor,\n clamp,\n slopeScaleBase,\n scaledSlope,\n cosIncidence;\n\n function calculateElevation(pixel, encoding = 'mapbox') {\n // The method used to extract elevations from the DEM.\n //\n // The supported methods are the Mapbox format\n // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000\n // and the Terrarium format\n // (red * 256 + green + blue / 256) - 32768\n //\n if (encoding === 'mapbox') {\n return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000;\n }\n if (encoding === 'terrarium') {\n return pixel[0] * 256 + pixel[1] + pixel[2] / 256 - 32768;\n }\n }\n for (pixelY = 0; pixelY <= maxY; ++pixelY) {\n y0 = pixelY === 0 ? 0 : pixelY - 1;\n y1 = pixelY === maxY ? maxY : pixelY + 1;\n for (pixelX = 0; pixelX <= maxX; ++pixelX) {\n x0 = pixelX === 0 ? 0 : pixelX - 1;\n x1 = pixelX === maxX ? maxX : pixelX + 1;\n\n // determine elevation for (x0, pixelY)\n offset = (pixelY * width + x0) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel, encoding);\n\n // determine elevation for (x1, pixelY)\n offset = (pixelY * width + x1) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel, encoding);\n\n dzdx = (z1 - z0) / dp;\n\n // determine elevation for (pixelX, y0)\n offset = (y0 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel, encoding);\n\n // determine elevation for (pixelX, y1)\n offset = (y1 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel, encoding);\n\n dzdy = (z1 - z0) / dp;\n\n aspect = Math.atan2(dzdy, -dzdx);\n if (aspect < 0) {\n aspect = halfPi - aspect;\n } else if (aspect > halfPi) {\n aspect = twoPi - aspect + halfPi;\n } else {\n aspect = halfPi - aspect;\n }\n\n // Bootstrap slope and corresponding incident values\n slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy));\n cosIncidence =\n sinSunEl * Math.cos(slope) +\n cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect);\n accent = Math.cos(slope);\n // 255 for Hex colors\n scaled = 255 * cosIncidence;\n\n /*\n * The following is heavily inspired\n * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl)\n */\n\n // Forces given value to stay between two given extremes\n clamp = Math.min(Math.max(2 * data.sunEl, 0), 1);\n\n // Intensity basis for hillshade opacity\n slopeScaleBase = 1.875 - data.opacity * 1.75;\n // Intensity interpolation so that higher intensity values create more opaque hillshading\n scaledSlope =\n data.opacity !== 0.5\n ? halfPi *\n ((Math.pow(slopeScaleBase, slope) - 1) /\n (Math.pow(slopeScaleBase, halfPi) - 1))\n : slope;\n\n // Accent hillshade color with given accentColor to emphasize rougher terrain\n scaledAccentColor = {\n r: (1 - accent) * accentColor.r * clamp * 255,\n g: (1 - accent) * accentColor.g * clamp * 255,\n b: (1 - accent) * accentColor.b * clamp * 255,\n a: (1 - accent) * accentColor.a * clamp * 255,\n };\n\n // Allows highlight vs shadow discrimination\n shade = Math.abs((((aspect + sunAz) / Math.PI + 0.5) % 2) - 1);\n // Creates a composite color mix between highlight & shadow colors to emphasize slopes\n compositeShadeColor = {\n r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled,\n g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled,\n b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled,\n a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled,\n };\n\n // Fill in result color value\n offset = (pixelY * width + pixelX) * 4;\n shadeData[offset] =\n scaledAccentColor.r * (1 - shade) + compositeShadeColor.r;\n shadeData[offset + 1] =\n scaledAccentColor.g * (1 - shade) + compositeShadeColor.g;\n shadeData[offset + 2] =\n scaledAccentColor.b * (1 - shade) + compositeShadeColor.b;\n // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast\n shadeData[offset + 3] =\n elevationData[offset + 3] *\n data.opacity *\n clamp *\n Math.sin(scaledSlope);\n }\n }\n\n return new ImageData(shadeData, width, height);\n}\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport ImageLayer from 'ol/layer/Image.js';\nimport Layer from 'ol/layer/Layer.js';\nimport LayerGroup from 'ol/layer/Group.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport Raster from 'ol/source/Raster.js';\nimport Source from 'ol/source/Source.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource, {defaultLoadFunction} from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport {\n METERS_PER_UNIT,\n equivalent,\n fromLonLat,\n get as getProjection,\n getUserProjection,\n} from 'ol/proj.js';\nimport {\n _colorWithOpacity,\n stylefunction as applyStyleFunction,\n stylefunction as applyStylefunction,\n getValue,\n styleFunctionArgs,\n} from './stylefunction.js';\nimport {bbox as bboxStrategy} from 'ol/loadingstrategy.js';\nimport {createXYZ} from 'ol/tilegrid.js';\nimport {\n defaultResolutions,\n fetchResource,\n getFilterCache,\n getFunctionCache,\n getGlStyle,\n getStyleFunctionKey,\n getTileJson,\n getZoomForResolution,\n} from './util.js';\nimport {getFonts} from './text.js';\nimport {getTopLeft} from 'ol/extent.js';\nimport {hillshade} from './shaders.js';\nimport {\n normalizeSourceUrl,\n normalizeSpriteUrl,\n normalizeStyleUrl,\n} from './mapbox.js';\n\n/**\n * @typedef {Object} FeatureIdentifier\n * @property {string|number} id The feature id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [accessToken] Access token for 'mapbox://' urls.\n * @property {function(string, import(\"./util.js\").ResourceType): (Request|string|void)} [transformRequest]\n * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying\n * the url, adding headers or setting credentials options. Called with the url and the resource\n * type as arguments, this function is supposed to return a `Request` or a url `string`. Without a return value,\n * the original request will not be modified.\n * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections.\n * Code of a projection registered with OpenLayers. All sources of the style must be provided in this\n * projection. The projection must also have a valid extent defined, which will be used to determine the\n * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox\n * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g.\n * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`.\n * @property {Array} [resolutions] Only useful when working with non-standard projections.\n * Resolutions for mapping resolution to the `zoom` used in the Mapbox style.\n * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided\n * as object, when they contain a relative sprite url, or sources referencing data by relative url.\n * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function be used for icons not in the sprite or to override sprite icons.\n * @property {string} [accessTokenParam='access_token'] Access token param. For internal use.\n */\n\n/**\n * @typedef {Object} ApplyStyleOptions\n * @property {string} [source=''] Source. Default is `''`, which causes the first source in the\n * style to be used.\n * @property {Array} [layers] Layers. If no source is provided, the layers with the\n * provided ids will be used from the style's `layers` array. All layers need to use the same source.\n * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters\n * specified for the source in the mapbox style definition.\n */\n\n/**\n * @param {import(\"ol/proj/Projection.js\").default} projection Projection.\n * @param {number} [tileSize=512] Tile size.\n * @return {Array} Resolutions.\n */\nfunction getTileResolutions(projection, tileSize = 512) {\n return projection.getExtent()\n ? createXYZ({\n extent: projection.getExtent(),\n tileSize: tileSize,\n maxZoom: 22,\n }).getResolutions()\n : defaultResolutions;\n}\n\n/**\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Options} Completed options with accessToken and accessTokenParam.\n */\nfunction completeOptions(styleUrl, options) {\n if (!options.accessToken) {\n options = Object.assign({}, options);\n const searchParams = new URL(styleUrl).searchParams;\n // The last search parameter is the access token\n searchParams.forEach((value, key) => {\n options.accessToken = value;\n options.accessTokenParam = key;\n });\n }\n return options;\n}\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`. If the layer does not have a source\n * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is\n * set to `false`).\n *\n * **Example:**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * import {VectorTile} from 'ol/layer.js';\n *\n * const layer = new VectorTile({declutter: true});\n * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n *\n * The style function will render all layers from the `glStyle` object that use the source\n * of the first layer, the specified `source`, or a subset of layers from the same source. The\n * source needs to be 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. When the layer has a source configured,\n * it will be modified to use the configuration from the glStyle's `source`. Options specified on the\n * layer's source will override those from the glStyle's `source`, except for `url` and\n * `tileUrlFunction`. When the source projection is the default (`EPSG:3857`), the `tileGrid` will\n * also be overridden. If you'd rather not have ol-mapbox-style modify the source, configure `applyStyle()`\n * with the `updateSource: false` option.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or\n * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is\n * provided, all layers for the specified source will be included in the style function. When layer\n * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey\n * value, all layers using the first source specified in the glStyle will be rendered.\n * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file\n * (only required when a relative path is used for the `\"sprite\"` property of the style).\n * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections, can also be supplied with\n * options.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(\n layer,\n glStyle,\n sourceOrLayersOrOptions = '',\n optionsOrPath = {},\n resolutions = undefined\n) {\n let styleUrl, sourceId;\n /** @type {Options&ApplyStyleOptions} */\n let options;\n let sourceOrLayers;\n let updateSource = true;\n if (\n typeof sourceOrLayersOrOptions !== 'string' &&\n !Array.isArray(sourceOrLayersOrOptions)\n ) {\n options = sourceOrLayersOrOptions;\n sourceOrLayers = options.source || options.layers;\n optionsOrPath = options;\n } else {\n sourceOrLayers = sourceOrLayersOrOptions;\n }\n if (typeof optionsOrPath === 'string') {\n styleUrl = optionsOrPath;\n options = {};\n } else {\n styleUrl = optionsOrPath.styleUrl;\n options = optionsOrPath;\n }\n if (options.updateSource === false) {\n updateSource = false;\n }\n if (!resolutions) {\n resolutions = options.resolutions;\n }\n if (\n !styleUrl &&\n typeof glStyle === 'string' &&\n !glStyle.trim().startsWith('{')\n ) {\n styleUrl = glStyle;\n }\n if (styleUrl) {\n styleUrl = styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(styleUrl, options.accessToken);\n options = completeOptions(styleUrl, options);\n }\n\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 getGlStyle(glStyle, options)\n .then(function (glStyle) {\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n return reject(\n new Error('Can only apply to VectorLayer or VectorTileLayer')\n );\n }\n\n const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson';\n if (!sourceOrLayers) {\n sourceId = Object.keys(glStyle.sources).find(function (key) {\n return glStyle.sources[key].type === type;\n });\n sourceOrLayers = sourceId;\n } else if (Array.isArray(sourceOrLayers)) {\n sourceId = glStyle.layers.find(function (layer) {\n return layer.id === sourceOrLayers[0];\n }).source;\n } else {\n sourceId = sourceOrLayers;\n }\n if (!sourceId) {\n return reject(new Error(`No ${type} source found in the glStyle.`));\n }\n\n function assignSource() {\n if (!updateSource) {\n return Promise.resolve();\n }\n if (layer instanceof VectorTileLayer) {\n return setupVectorSource(\n glStyle.sources[sourceId],\n styleUrl,\n options\n ).then(function (source) {\n const targetSource = layer.getSource();\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n targetSource.setTileUrlFunction(source.getTileUrlFunction());\n if (\n typeof targetSource.setUrls === 'function' &&\n typeof source.getUrls === 'function'\n ) {\n // to get correct keys for tile cache and queue\n targetSource.setUrls(source.getUrls());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.format_;\n }\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n if (\n targetSource.getTileLoadFunction() === defaultLoadFunction\n ) {\n targetSource.setTileLoadFunction(\n source.getTileLoadFunction()\n );\n }\n if (\n equivalent(\n targetSource.getProjection(),\n source.getProjection()\n )\n ) {\n targetSource.tileGrid = source.getTileGrid();\n }\n }\n if (\n !isFinite(layer.getMaxResolution()) &&\n !isFinite(layer.getMinZoom())\n ) {\n const tileGrid = layer.getSource().getTileGrid();\n layer.setMaxResolution(\n tileGrid.getResolution(tileGrid.getMinZoom())\n );\n }\n });\n }\n const glSource = glStyle.sources[sourceId];\n let source = layer.getSource();\n if (!source || source.get('mapbox-source') !== glSource) {\n source = setupGeoJSONSource(glSource, styleUrl, options);\n }\n const targetSource = /** @type {VectorSource} */ (layer.getSource());\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.getFormat();\n }\n //@ts-ignore\n targetSource.url_ = source.getUrl();\n }\n return Promise.resolve();\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n if (options.projection && !resolutions) {\n const projection = getProjection(options.projection);\n const units = projection.getUnits();\n if (units !== 'm') {\n resolutions = defaultResolutions.map(\n (resolution) => resolution / METERS_PER_UNIT[units]\n );\n }\n }\n style = applyStyleFunction(\n layer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n options.getImage\n );\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${sourceId}]`));\n } else {\n assignSource().then(resolve).catch(reject);\n }\n } else if (style) {\n layer.setStyle(style);\n assignSource().then(resolve).catch(reject);\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n const sprite = new URL(\n normalizeSpriteUrl(\n glStyle.sprite,\n options.accessToken,\n styleUrl || location.href\n )\n );\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.json' +\n sprite.search;\n\n new Promise(function (resolve, reject) {\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(function (error) {\n spriteUrl =\n sprite.origin + sprite.pathname + '.json' + sprite.search;\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(reject);\n });\n })\n .then(function (spritesJson) {\n if (spritesJson === undefined) {\n reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.png' +\n sprite.search;\n if (options.transformRequest) {\n const transformed =\n options.transformRequest(spriteImageUrl, 'SpriteImage') ||\n spriteImageUrl;\n if (transformed instanceof Request) {\n spriteImageUrl = transformed;\n }\n }\n onChange();\n })\n .catch(function (err) {\n reject(\n new Error(\n `Sprites cannot be loaded: ${spriteUrl}: ${err.message}`\n )\n );\n });\n } else {\n onChange();\n }\n })\n .catch(reject);\n });\n}\n\nconst emptyObj = {};\n\nfunction setFirstBackground(mapOrLayer, glStyle, options) {\n glStyle.layers.some(function (layer) {\n if (layer.type === 'background') {\n if (mapOrLayer instanceof Layer) {\n mapOrLayer.setBackground(function (resolution) {\n return getBackgroundColor(layer, resolution, options, {});\n });\n return true;\n }\n if (mapOrLayer instanceof Map || mapOrLayer instanceof LayerGroup) {\n mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {}));\n return true;\n }\n }\n });\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the\n * provided map or layer (group).\n *\n * **Example:**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * import {Map} from 'ol';\n *\n * const map = new Map({target: 'map'});\n * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n * @param {Map|import(\"ol/layer/Base.js\").default} mapOrLayer OpenLayers Map or layer (group).\n * @param {Object|string} glStyle Mapbox Style object or url.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the background is applied.\n */\nexport function applyBackground(mapOrLayer, glStyle, options = {}) {\n return getGlStyle(glStyle, options).then(function (glStyle) {\n setFirstBackground(mapOrLayer, glStyle, options);\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function (layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON, projection) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]], projection);\n const tr = fromLonLat([bounds[2], bounds[3]], projection);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n return getProjection(projection).getExtent();\n}\n\nfunction sourceOptionsFromTileJSON(glSource, tileJSON, options) {\n const tileJSONSource = new TileJSON({\n tileJSON: tileJSON,\n tileSize: glSource.tileSize || tileJSON.tileSize || 512,\n });\n const tileJSONDoc = tileJSONSource.getTileJSON();\n const tileGrid = tileJSONSource.getTileGrid();\n const projection = getProjection(options.projection || 'EPSG:3857');\n const extent = extentFromTileJSON(tileJSONDoc, projection);\n const projectionExtent = projection.getExtent();\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n /** @type {import(\"ol/source/VectorTile.js\").Options} */\n const sourceOptions = {\n attributions: tileJSONSource.getAttributions(),\n projection: projection,\n tileGrid: new TileGrid({\n origin: projectionExtent\n ? getTopLeft(projectionExtent)\n : tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(\n 0,\n maxZoom + 1\n ),\n tileSize: tileGrid.getTileSize(0),\n }),\n };\n if (Array.isArray(tileJSONDoc.tiles)) {\n sourceOptions.urls = tileJSONDoc.tiles;\n } else {\n sourceOptions.url = tileJSONDoc.tiles;\n }\n return sourceOptions;\n}\n\nfunction getBackgroundColor(glLayer, resolution, options, functionCache) {\n const background = {\n id: glLayer.id,\n type: glLayer.type,\n };\n const layout = glLayer.layout || {};\n const paint = glLayer.paint || {};\n background['paint'] = paint;\n const zoom = getZoomForResolution(\n resolution,\n options.resolutions || defaultResolutions\n );\n let bg, opacity;\n if (paint['background-color'] !== undefined) {\n bg = getValue(\n background,\n 'paint',\n 'background-color',\n zoom,\n emptyObj,\n functionCache\n );\n }\n if (paint['background-opacity'] !== undefined) {\n opacity = getValue(\n background,\n 'paint',\n 'background-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n }\n return layout.visibility == 'none'\n ? undefined\n : _colorWithOpacity(bg, opacity);\n}\n\n/**\n * @param {Object} glLayer Mapbox Style layer object.\n * @param {Options} options Options.\n * @param {Object} functionCache Cache for functions.\n * @return {Layer} OpenLayers layer.\n */\nfunction setupBackgroundLayer(glLayer, options, functionCache) {\n const div = document.createElement('div');\n div.className = 'ol-mapbox-style-background';\n div.style.position = 'absolute';\n div.style.width = '100%';\n div.style.height = '100%';\n return new Layer({\n source: new Source({}),\n render(frameState) {\n const color = getBackgroundColor(\n glLayer,\n frameState.viewState.resolution,\n options,\n functionCache\n );\n div.style.backgroundColor = color;\n return div;\n },\n });\n}\n\n/**\n * Creates an OpenLayers VectorTile source for a gl source entry.\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url,\n * with access key applied.\n * @param {Options} options Options.\n * @return {Promise} Promise resolving to a VectorTile source.\n * @private\n */\nexport function setupVectorSource(glSource, styleUrl, options) {\n return new Promise(function (resolve, reject) {\n getTileJson(glSource, styleUrl, options)\n .then(function ({tileJson, tileLoadFunction}) {\n const sourceOptions = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n );\n sourceOptions.tileLoadFunction = tileLoadFunction;\n sourceOptions.format = new MVT();\n resolve(new VectorTileSource(sourceOptions));\n })\n .catch(reject);\n });\n}\n\nfunction setupVectorLayer(glSource, styleUrl, options) {\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false,\n });\n setupVectorSource(glSource, styleUrl, options)\n .then(function (source) {\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\nfunction getBboxTemplate(projection) {\n const projCode = projection ? projection.getCode() : 'EPSG:3857';\n return `{bbox-${projCode.toLowerCase().replace(/[^a-z0-9]/g, '-')}}`;\n}\n\nfunction setupRasterLayer(glSource, styleUrl, options) {\n const layer = new TileLayer();\n getTileJson(glSource, styleUrl, options)\n .then(function ({tileJson, tileLoadFunction}) {\n const source = new TileJSON({\n interpolate:\n options.interpolate === undefined ? true : options.interpolate,\n transition: 0,\n crossOrigin: 'anonymous',\n tileJSON: tileJson,\n });\n source.tileGrid = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n ).tileGrid;\n if (options.projection) {\n //@ts-ignore\n source.projection = getProjection(options.projection);\n }\n const getTileUrl = source.getTileUrlFunction();\n if (tileLoadFunction) {\n source.setTileLoadFunction(tileLoadFunction);\n }\n source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) {\n const bboxTemplate = getBboxTemplate(projection);\n let src = getTileUrl(tileCoord, pixelRatio, projection);\n if (src.indexOf(bboxTemplate) != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tileCoord);\n src = src.replace(bboxTemplate, bbox.toString());\n }\n return src;\n });\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\n/**\n *\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string} styleUrl Style url\n * @param {Options} options ol-mapbox-style options.\n * @return {ImageLayer} The raster layer\n */\nfunction setupHillshadeLayer(glSource, styleUrl, options) {\n const tileLayer = setupRasterLayer(glSource, styleUrl, options);\n /** @type {ImageLayer} */\n const layer = new ImageLayer({\n source: new Raster({\n operationType: 'image',\n operation: hillshade,\n sources: [tileLayer],\n }),\n });\n return layer;\n}\n\n/**\n * @param {Object} glSource glStyle source.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {VectorSource} Configured vector source.\n */\nfunction setupGeoJSONSource(glSource, styleUrl, options) {\n const geoJsonFormat = options.projection\n ? new GeoJSON({dataProjection: options.projection})\n : new GeoJSON();\n const data = glSource.data;\n const sourceOptions = {};\n if (typeof data == 'string') {\n const geoJsonUrl = normalizeSourceUrl(\n data,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (/\\{bbox-[0-9a-z-]+\\}/.test(geoJsonUrl)) {\n const extentUrl = (extent, resolution, projection) => {\n const bboxTemplate = getBboxTemplate(projection);\n return geoJsonUrl.replace(bboxTemplate, `${extent.join(',')}`);\n };\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n loader: (extent, resolution, projection, success, failure) => {\n const url =\n typeof extentUrl === 'function'\n ? extentUrl(extent, resolution, projection)\n : extentUrl;\n fetchResource('GeoJSON', url, options)\n .then((json) => {\n const features = /** @type {*} */ (\n source\n .getFormat()\n .readFeatures(json, {featureProjection: projection})\n );\n source.addFeatures(features);\n success(features);\n })\n .catch((response) => {\n source.removeLoadedExtent(extent);\n failure();\n });\n },\n strategy: bboxStrategy,\n });\n source.set('mapbox-source', glSource);\n return source;\n }\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: geoJsonUrl,\n loader: (extent, resolution, projection, success, failure) => {\n fetchResource('GeoJSON', geoJsonUrl, options)\n .then((json) => {\n const features = /** @type {*} */ (\n source\n .getFormat()\n .readFeatures(json, {featureProjection: projection})\n );\n source.addFeatures(features);\n success(features);\n })\n .catch((response) => {\n source.removeLoadedExtent(extent);\n failure();\n });\n },\n });\n return source;\n }\n sourceOptions.features = geoJsonFormat.readFeatures(data, {\n featureProjection: getUserProjection() || 'EPSG:3857',\n });\n\n const source = new VectorSource(\n Object.assign(\n {\n attributions: glSource.attribution,\n format: geoJsonFormat,\n },\n sourceOptions\n )\n );\n source.set('mapbox-source', glSource);\n return source;\n}\n\nfunction setupGeoJSONLayer(glSource, styleUrl, options) {\n return new VectorLayer({\n declutter: true,\n source: setupGeoJSONSource(glSource, styleUrl, options),\n visible: false,\n });\n}\n\nfunction prerenderRasterLayer(glLayer, layer, functionCache) {\n let zoom = null;\n return function (event) {\n if (\n glLayer.paint &&\n 'raster-opacity' in glLayer.paint &&\n event.frameState.viewState.zoom !== zoom\n ) {\n zoom = event.frameState.viewState.zoom;\n delete functionCache[glLayer.id];\n updateRasterLayerProperties(glLayer, layer, zoom, functionCache);\n }\n };\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, zoom, functionCache) {\n const opacity = getValue(\n glLayer,\n 'paint',\n 'raster-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n layer.setOpacity(opacity);\n}\n\nfunction manageVisibility(layer, mapOrGroup) {\n function onChange() {\n const glStyle = mapOrGroup.get('mapbox-style');\n if (!glStyle) {\n return;\n }\n const mapboxLayers = derefLayers(glStyle.layers);\n const layerMapboxLayerids = layer.get('mapbox-layers');\n const visible = mapboxLayers\n .filter(function (mapboxLayer) {\n return layerMapboxLayerids.includes(mapboxLayer.id);\n })\n .some(function (mapboxLayer) {\n return (\n !mapboxLayer.layout ||\n !mapboxLayer.layout.visibility ||\n mapboxLayer.layout.visibility === 'visible'\n );\n });\n if (layer.get('visible') !== visible) {\n layer.setVisible(visible);\n }\n }\n layer.on('change', onChange);\n onChange();\n}\n\nexport function setupLayer(glStyle, styleUrl, glLayer, options) {\n const functionCache = getFunctionCache(glStyle);\n const glLayers = glStyle.layers;\n const type = glLayer.type;\n\n const id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n const glSource = glStyle.sources[id];\n let layer;\n if (type == 'background') {\n layer = setupBackgroundLayer(glLayer, options, functionCache);\n } else if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster') {\n layer = setupRasterLayer(glSource, styleUrl, options);\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n layer.on('prerender', prerenderRasterLayer(glLayer, layer, functionCache));\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster-dem' && glLayer.type == 'hillshade') {\n const hillshadeLayer = setupHillshadeLayer(glSource, styleUrl, options);\n layer = hillshadeLayer;\n hillshadeLayer.getSource().on('beforeoperations', function (event) {\n const data = event.data;\n data.resolution = event.resolution;\n const zoom = getZoomForResolution(\n event.resolution,\n options.resolutions || defaultResolutions\n );\n data.encoding = glSource.encoding;\n data.vert =\n 5 *\n getValue(\n glLayer,\n 'paint',\n 'hillshade-exaggeration',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunAz = getValue(\n glLayer,\n 'paint',\n 'hillshade-illumination-direction',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunEl = 35;\n data.opacity = 0.3;\n data.highlightColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-highlight-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.shadowColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-shadow-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.accentColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-accent-color',\n zoom,\n emptyObj,\n functionCache\n );\n });\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n }\n const glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n return layer;\n}\n\n/**\n * @param {*} glStyle Mapbox Style.\n * @param {Map|LayerGroup} mapOrGroup Map or layer group.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the style is loaded.\n */\nfunction processStyle(glStyle, mapOrGroup, styleUrl, options) {\n const promises = [];\n\n let view = null;\n if (mapOrGroup instanceof Map) {\n view = mapOrGroup.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n const projection = options.projection\n ? getProjection(options.projection)\n : view.getProjection();\n view = new View(\n Object.assign(view.getProperties(), {\n maxResolution:\n defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()],\n projection: options.projection || view.getProjection(),\n })\n );\n mapOrGroup.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center, view.getProjection()));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(\n defaultResolutions[0] /\n METERS_PER_UNIT[view.getProjection().getUnits()] /\n Math.pow(2, glStyle.zoom)\n );\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: mapOrGroup.getSize(),\n });\n }\n }\n mapOrGroup.set('mapbox-style', glStyle);\n mapOrGroup.set('mapbox-metadata', {styleUrl, options});\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let layer, glSourceId, id;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap') {\n //FIXME Unsupported layer type\n throw new Error(`${type} layers are not supported`);\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 || id != glSourceId) {\n if (layerIds.length) {\n promises.push(\n finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n )\n );\n layerIds = [];\n }\n\n layer = setupLayer(glStyle, styleUrl, glLayer, options);\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n layerIds = [];\n }\n glSourceId = layer.get('mapbox-source');\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(\n finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)\n );\n return Promise.all(promises);\n}\n\n/**\n * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup.\n * This includes the map background, the layers, and for Map instances that did not\n * have a View defined yet also the center and the zoom.\n *\n * **Example:**\n * ```js\n * import apply from 'ol-mapbox-style';\n *\n * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'});\n * ```\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 or LayerGroup instance, which holds the Mapbox Style object.\n *\n * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing\n * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be\n * the target of a new OpenLayers Map, or a layer group. If layer group, styles\n * releated to the map and view will be ignored.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl`\n * shown in Mapbox Studio's \"share\" panel. In addition, the `accessToken` option\n * (see below) must be set.\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 * @param {Options} options Options.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The\n * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as\n * argument.\n */\nexport function apply(mapOrGroupOrElement, style, options = {}) {\n let promise;\n /** @type {Map|LayerGroup} */\n let mapOrGroup;\n if (\n typeof mapOrGroupOrElement === 'string' ||\n mapOrGroupOrElement instanceof HTMLElement\n ) {\n mapOrGroup = new Map({\n target: mapOrGroupOrElement,\n });\n } else {\n mapOrGroup = mapOrGroupOrElement;\n }\n\n if (typeof style === 'string') {\n const styleUrl = style.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(style, options.accessToken);\n options = completeOptions(styleUrl, options);\n\n promise = new Promise(function (resolve, reject) {\n getGlStyle(style, options)\n .then(function (glStyle) {\n processStyle(glStyle, mapOrGroup, styleUrl, options)\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n })\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(\n style,\n mapOrGroup,\n !options.styleUrl || options.styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(options.styleUrl, options.accessToken),\n options\n )\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\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} styleUrl The original style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {Map|LayerGroup} mapOrGroup OpenLayers Map.\n * @param {Options} options Options.\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 */\nexport function finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options = {}\n) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const 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 const setStyle = function () {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(\n new Error(\n 'Error accessing data for source ' + layer.get('mapbox-source')\n )\n );\n return;\n }\n if ('getTileGrid' in source) {\n const tileGrid =\n /** @type {import(\"ol/source/Tile.js\").default|import(\"ol/source/VectorTile.js\").default} */ (\n source\n ).getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(\n Math.min(\n defaultResolutions[minZoom],\n tileGrid.getResolution(sourceMinZoom)\n ) + 1e-9\n );\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n } else {\n if (minZoom > 0) {\n layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9);\n }\n }\n if (\n source instanceof VectorSource ||\n source instanceof VectorTileSource\n ) {\n applyStyle(\n /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (\n layer\n ),\n glStyle,\n layerIds,\n Object.assign({styleUrl: styleUrl}, options)\n )\n .then(function () {\n manageVisibility(layer, mapOrGroup);\n resolve();\n })\n .catch(reject);\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n const layers = mapOrGroup.getLayers();\n if (layers.getArray().indexOf(layer) === -1) {\n layers.push(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\n/**\n * Get the Mapbox Layer object for the provided `layerId`.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {string} layerId Mapbox Layer id.\n * @return {Object} Mapbox Layer object.\n */\nexport function getMapboxLayer(mapOrGroup, layerId) {\n const style = mapOrGroup.get('mapbox-style');\n const layerStyle = style.layers.find(function (layer) {\n return layer.id === layerId;\n });\n return layerStyle;\n}\n\n/**\n * Add a new Mapbox Layer object to the style. The map will be re-rendered.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {Object} mapboxLayer Mapbox Layer object.\n * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added.\n * @return {Promise} Resolves when the added layer is available.\n */\nexport function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n let spliceIndex;\n let sourceIndex = -1;\n if (beforeLayerId !== undefined) {\n const beforeMapboxLayer = getMapboxLayer(mapOrGroup, beforeLayerId);\n if (beforeMapboxLayer === undefined) {\n throw new Error(`Layer with id \"${beforeLayerId}\" not found.`);\n }\n spliceIndex = mapboxLayers.indexOf(beforeMapboxLayer);\n } else {\n spliceIndex = mapboxLayers.length;\n }\n let sourceOffset;\n if (\n spliceIndex > 0 &&\n mapboxLayers[spliceIndex - 1].source === mapboxLayer.source\n ) {\n sourceIndex = spliceIndex - 1;\n sourceOffset = -1;\n } else if (\n spliceIndex < mapboxLayers.length &&\n mapboxLayers[spliceIndex].source === mapboxLayer.source\n ) {\n sourceIndex = spliceIndex;\n sourceOffset = 0;\n }\n if (sourceIndex === -1) {\n const {options, styleUrl} = mapOrGroup.get('mapbox-metadata');\n const layer = setupLayer(glStyle, styleUrl, mapboxLayer, options);\n if (beforeLayerId) {\n const beforeLayer = getLayer(mapOrGroup, beforeLayerId);\n const beforeLayerIndex = mapOrGroup\n .getLayers()\n .getArray()\n .indexOf(beforeLayer);\n mapOrGroup.getLayers().insertAt(beforeLayerIndex, layer);\n }\n mapboxLayers.splice(spliceIndex, 0, mapboxLayer);\n return finalizeLayer(\n layer,\n [mapboxLayer.id],\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n );\n }\n\n if (mapboxLayers.some((layer) => layer.id === mapboxLayer.id)) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" already exists.`);\n }\n const sourceLayerId = mapboxLayers[sourceIndex].id;\n const args =\n styleFunctionArgs[\n getStyleFunctionKey(\n mapOrGroup.get('mapbox-style'),\n getLayer(mapOrGroup, sourceLayerId)\n )\n ];\n mapboxLayers.splice(spliceIndex, 0, mapboxLayer);\n if (args) {\n const [\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage,\n ] = args;\n if (Array.isArray(sourceOrLayers)) {\n const layerIndex = sourceOrLayers.indexOf(sourceLayerId) + sourceOffset;\n sourceOrLayers.splice(layerIndex, 0, mapboxLayer.id);\n }\n applyStyleFunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage\n );\n } else {\n getLayer(mapOrGroup, mapboxLayers[sourceIndex].id).changed();\n }\n return Promise.resolve();\n}\n\n/**\n * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {Object} mapboxLayer Updated Mapbox Layer object.\n */\nexport function updateMapboxLayer(mapOrGroup, mapboxLayer) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n const index = mapboxLayers.findIndex(function (layer) {\n return layer.id === mapboxLayer.id;\n });\n if (index === -1) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" not found.`);\n }\n const oldLayer = mapboxLayers[index];\n if (oldLayer.source !== mapboxLayer.source) {\n throw new Error(\n 'Updated layer and previous version must use the same source.'\n );\n }\n delete getFunctionCache(glStyle)[mapboxLayer.id];\n delete getFilterCache(glStyle)[mapboxLayer.id];\n mapboxLayers[index] = mapboxLayer;\n const args =\n styleFunctionArgs[\n getStyleFunctionKey(\n mapOrGroup.get('mapbox-style'),\n getLayer(mapOrGroup, mapboxLayer.id)\n )\n ];\n if (args) {\n applyStylefunction.apply(undefined, args);\n } else {\n getLayer(mapOrGroup, mapboxLayer.id).changed();\n }\n}\n\n/**\n * Remove a Mapbox Layer object from the style. The map will be re-rendered.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {string|Object} mapboxLayerIdOrLayer Mapbox Layer id or Mapbox Layer object.\n */\nexport function removeMapboxLayer(mapOrGroup, mapboxLayerIdOrLayer) {\n const mapboxLayerId =\n typeof mapboxLayerIdOrLayer === 'string'\n ? mapboxLayerIdOrLayer\n : mapboxLayerIdOrLayer.id;\n const layer = getLayer(mapOrGroup, mapboxLayerId);\n /** @type {Array} */\n const layerMapboxLayers = layer.get('mapbox-layers');\n if (layerMapboxLayers.length === 1) {\n throw new Error(\n 'Cannot remove last Mapbox layer from an OpenLayers layer.'\n );\n }\n layerMapboxLayers.splice(layerMapboxLayers.indexOf(mapboxLayerId), 1);\n const glStyle = mapOrGroup.get('mapbox-style');\n const layers = glStyle.layers;\n layers.splice(\n layers.findIndex((layer) => layer.id === mapboxLayerId),\n 1\n );\n const args = styleFunctionArgs[getStyleFunctionKey(glStyle, layer)];\n if (args) {\n const [\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage,\n ] = args;\n if (Array.isArray(sourceOrLayers)) {\n sourceOrLayers.splice(\n sourceOrLayers.findIndex((layer) => layer === mapboxLayerId),\n 1\n );\n }\n applyStylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage\n );\n } else {\n getLayer(mapOrGroup, mapboxLayerId).changed();\n }\n}\n\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 {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n return undefined;\n}\n\n/**\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let 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/**\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n return undefined;\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n *\n * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the\n * `mapbox-featurestate` property.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature\n * state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @param {Object|null} state Feature state. Set to `null` to remove the feature state.\n */\nexport function setFeatureState(mapOrLayer, feature, state) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState) {\n if (state) {\n featureState[feature.id] = state;\n } else {\n delete featureState[feature.id];\n }\n layers[i].changed();\n } else {\n throw new Error(`Map or layer for source \"${feature.source}\" not found.`);\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @return {Object|null} Feature state or `null` when no feature state is set for the given\n * feature identifier.\n */\nexport function getFeatureState(mapOrLayer, feature) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState && featureState[feature.id]) {\n return featureState[feature.id];\n }\n }\n return undefined;\n}\n","import BaseEvent from 'ol/events/Event.js';\nimport EventType from 'ol/events/EventType.js';\nimport MVT from 'ol/format/MVT.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource from 'ol/source/VectorTile.js';\nimport {applyBackground, applyStyle} from './apply.js';\n\n/** @typedef {import(\"ol/Map.js\").default} Map */\n\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nclass ErrorEvent extends BaseEvent {\n /**\n * @param {Error} error error object.\n */\n constructor(error) {\n super(EventType.ERROR);\n\n /**\n * @type {Error}\n */\n this.error = error;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} [accessToken] The access token for your Mapbox style. This has to be provided\n * for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query\n * parameter of the style url.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source. The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array} [layers] Limit rendering to the list of included layers. All layers\n * must share the same vector source. If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n *\n * As an optimization decluttered features from layers with the same `className` are rendered above\n * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this\n * behavior and place declutterd features with their own layer configure the layer with a `className`\n * other than `ol-layer`.\n * @property {import(\"ol/layer/Base.js\").BackgroundColor|false} [background] Background color for the layer.\n * If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent\n * the Mapbox style's background from being used.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"ol/extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will\n * match the style source's `minzoom`.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will\n * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match\n * the style source's `minzoom`.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"ol/render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"ol/layer/VectorTile.js\").VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles:\n * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views.\n * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n * tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n * another layer with the same source).\n * @property {import(\"ol/Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use `map.addLayer()`.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * ```js\n * import {MapboxVectorLayer} from 'ol-mapbox-style';\n * ```\n * A vector tile layer based on a Mapbox style that uses a single vector source. Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source. If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source). See the constructor options for\n * more detail.\n *\n * const map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1,\n * }),\n * layers: [\n * new MapboxVectorLayer({\n * styleUrl: 'mapbox://styles/mapbox/bright-v9',\n * accessToken: 'your-mapbox-access-token-here',\n * }),\n * ],\n * target: 'map',\n * });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event. Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * **Note for users of the full build**: The `MapboxVectorLayer` requires the\n * [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) library to be loaded as well.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nexport default class MapboxVectorLayer extends VectorTileLayer {\n /**\n * @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken`\n * must be provided.\n */\n constructor(options) {\n const declutter = 'declutter' in options ? options.declutter : true;\n const source = new VectorTileSource({\n state: 'loading',\n format: new MVT(),\n });\n\n super({\n source: source,\n background: options.background,\n declutter: declutter,\n className: options.className,\n opacity: options.opacity,\n visible: options.visible,\n zIndex: options.zIndex,\n minResolution: options.minResolution,\n maxResolution: options.maxResolution,\n minZoom: options.minZoom,\n maxZoom: options.maxZoom,\n renderOrder: options.renderOrder,\n renderBuffer: options.renderBuffer,\n renderMode: options.renderMode,\n map: options.map,\n updateWhileAnimating: options.updateWhileAnimating,\n updateWhileInteracting: options.updateWhileInteracting,\n preload: options.preload,\n useInterimTilesOnError: options.useInterimTilesOnError,\n properties: options.properties,\n });\n\n if (options.accessToken) {\n this.accessToken = options.accessToken;\n }\n const url = options.styleUrl;\n const promises = [\n applyStyle(this, url, options.layers || options.source, {\n accessToken: this.accessToken,\n }),\n ];\n if (this.getBackground() === undefined) {\n promises.push(\n applyBackground(this, options.styleUrl, {\n accessToken: this.accessToken,\n })\n );\n }\n Promise.all(promises)\n .then(() => {\n source.setState('ready');\n })\n .catch((error) => {\n this.dispatchEvent(new ErrorEvent(error));\n const source = this.getSource();\n source.setState('error');\n });\n }\n}\n"],"names":["kCSSColorTable","clamp_css_byte","i","Math","round","clamp_css_float","f","parse_css_int","str","length","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","h","parseCSSColor","css_str","replace","toLowerCase","slice","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","exports","e","Color","constructor","r","g","b","a","parse","input","undefined","rgba","toString","toArray","toArray01","toArray01PremultipliedAlpha","black","white","transparent","red","blue","convertLiteral","value","convertFunction","parameters","propertySpec","stops","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","property","zoomDependent","map","stop","tokens","convertTokenString","convertZoomAndPropertyFunction","convertZoomFunction","convertPropertyFunction","get","default","type","Object","keys","values","expression","splice","getInterpolateOperator","colorSpace","featureFunctionParameters","featureFunctionStops","zoomStops","zoom","push","functionType","getFunctionType","z","output","appendStopPair","fixupDegenerateStepCurve","coalesce","getFallback","defaultValue","base","Error","isStep","curve","interpolated","result","re","pos","match","exec","literal","lastIndex","ParsingError","key","message","Scope","parent","bindings","name","concat","has","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","ErrorType","CollatorType","FormattedType","ResolvedImageType","array","itemType","N","valueMemberTypes","checkSubtype","expected","t","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","Array","isArray","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","image","scale","fontStack","textColor","normalize","Formatted","sections","fromString","unformatted","isEmpty","section","factory","join","serialize","serialized","options","ResolvedImage","available","validateRGBA","isValue","mixed","item","typeOf","String","JSON","stringify","Literal","args","context","error","expectedType","evaluate","eachChild","outputDefined","RuntimeError","toJSON","types","string","number","boolean","object","Assertion","floor","parsed","ctx","fn","forEach","every","arg","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluateSection","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","Boolean","c","parseColor","num","Number","isNaN","valueToString","child","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","featureTileCoord","featureDistanceData","id","geometryType","geometry","canonicalID","properties","distanceFromCenter","center","x","y","dX","dY","bX","bearing","bY","dist","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","filter","signature","signatureContext","ParsingContext","registry","path","scope","parsedArgs","argParseFailed","errors","signatures","stringifySignature","actualTypes","register","CollatorExpression","EXTENT","updateBBox","bbox","coord","min","max","mercatorXfromLng","lng","mercatorYfromLat","lat","PI","log","tan","boxWithinBox","bbox1","bbox2","getTileCoordinates","p","tilesAtZoom","pow","onBoundary","p1","p2","x1","y1","x2","y2","rayIntersect","pointWithinPolygon","point","rings","inside","len","ring","j","len2","pointWithinPolygons","polygons","perp","v1","v2","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectLine","d","vectorP","vectorQ","lineIntersectPolygon","polygon","lineStringWithinPolygon","line","lineStringWithinPolygons","getTilePolygon","coordinates","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","resetBBox","Infinity","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","pointsWithinPolygons","polygonGeometry","tilePolygon","tilePolygons","linesWithinPolygons","Within","geojson","geometries","features","isFeatureConstant","test","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","part","expr","index","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","k","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","lowerIndex","upperIndex","currentIndex","currentValue","nextValue","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","out","module","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","prototype","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","abs","d2","solve","color","from","to","Xn","Yn","Zn","t3","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateLab","interpolateNumber","rgbToHcl","atan2","sqrt","hclToRgb","hclColor","cos","sin","interpolateHue","interpolateHcl","lab","forward","reverse","interpolate","hcl","Interpolate","operator","interpolation","interpolationFactor","lower","upper","exponentialInterpolation","controlPoints","ub","rest","outputLower","outputUpper","lowerValue","upperValue","difference","progress","Coalesce","needsAnnotation","argCount","firstImage","Let","binding","At","In","needle","haystack","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","sortedLabels","sort","groupedByOutput","outputLookup","outputIndex","coerceLabel","Case","branches","_","Slice","beginIndex","endIndex","isComparableType","eq","neq","lt","gt","lteq","gteq","eqCollate","neqCollate","ltCollate","gtCollate","lteqCollate","gteqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","unit","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","format","Length","expressions","obj","v","binarySearch","m","varargs","typeToString","pitch","heatmapDensity","lineProgress","skyRadialProgress","accumulated","LN2","E","n","LN10","asin","acos","atan","ceil","isSupportedScript","toUpperCase","success","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","isFunction","StyleExpression","_warningHistory","_evaluator","_defaultValue","getDefaultValue","_enumValues","evaluateWithoutErrorHandling","val","console","warn","isExpression","createExpression","parser","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","interpolationType","createPropertyExpression","isZoomConstant","zoomCurve","findZoomCurve","childResult","enum","formatted","resolvedImage","unbundle","valueOf","deepUnbundle","unbundledValue","isExpressionFilter","createFilter","layerType","needGeometry","needFeature","convertFilter","filterExp","staticFilter","extractStaticFilter","filterSpec","latest","compiledStaticFilter","filterFunc","err","globalProperties","dynamicFilterFunc","compiledDynamicFilter","geometryNeeded","dynamicFilter","isDynamicFilter","unionDynamicBranches","collapseDynamicBooleanExpressions","collapsed","collapsedExpression","subExpression","isBranchingDynamically","isRootExpressionDynamic","dynamicConditionExpressions","Set","param","converted","convertComparisonOp","convertNegation","convertDisjunctionOp","convertInOp","convertHasOp","filters","deref","layer","refProperties","derefLayers","layers","create","ref","fontWeights","thin","hairline","light","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","sp","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","haveWeight","haveStyle","ii","parts","maybeWeight","w","previousPart","startsWith","fontFamily","mapboxBaseUrl","getMapboxPath","url","normalizeSpriteUrl","token","styleUrl","mapboxPath","decodeURI","URL","href","sprite","normalizeStyleUrl","location","normalizeSourceUrl","tokenParam","urlObject","searchParams","set","sizeFactor","window","devicePixelRatio","functionCacheByStyleId","filterCacheByStyleId","styleId","getStyleId","glStyle","getStyleFunctionKey","olLayer","getUid","getFunctionCache","functionCache","clearFunctionCache","getFilterCache","filterCache","degrees","defaultResolutions","resolutions","res","createCanvas","width","height","WorkerGlobalScope","self","OffscreenCanvas","canvas","document","createElement","getZoomForResolution","resolution","candidate","zoomFactor","pendingRequests","fetchResource","resourceType","metadata","request","transformedRequest","transformRequest","Request","headers","pendingRequest","fetch","then","response","ok","json","Promise","reject","catch","getGlStyle","glStyleOrUrl","trim","resolve","accessToken","tilejsonCache","getTileJson","glSource","cacheKey","promise","tileLoadFunction","tile","src","VectorTile","setLoader","extent","projection","arrayBuffer","data","getFormat","readFeatures","featureProjection","setFeatures","setState","TileState","ERROR","img","getImage","blob","createObjectURL","addEventListener","revokeObjectURL","tiles","normalizedSourceUrl","accessTokenParam","tileJson","assign","expandUrl","tileUrl","scheme","drawIconHalo","spriteImage","spriteImageData","haloWidth","haloColor","imageCanvas","imgSize","pixelRatio","imageContext","getContext","drawImage","imageData","getImageData","globalCompositeOperation","fillStyle","jj","arc","fill","smoothstep","drawSDF","area","buffer","gamma","putImageData","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","lines","joinSpaceString","ll","measureContext","getMeasureContext","measureText","measureCache","wrapText","em","hardLines","wrappedText","words","oneEm","maxWidth","word","testLine","prevWidth","nextWidth","next","lineWords","lastWord","fontFamilyRegEx","stripQuotesRegEx","loadedFontFamilies","hasFontFamily","family","styleSheets","styleSheet","cssRules","rules","cssRule","cssText","processedFontFamilies","getFonts","templateUrl","fontsKey","fontDescriptions","cssFont","mb2css","registerFont","fontDescription","checkedFonts","fontUrl","querySelector","markup","rel","head","appendChild","anchor","expressionData","rawExpression","compiledExpression","emptyObj","zoomObj","renderFeatureCoordinates","renderFeature","getValue","layoutOrPaint","layerId","functions","isExpr","bind","getIconDeclutterMode","allowOverlap","ignorePlacement","evaluateFilter","renderTransparentEnabled","renderTransparent","enabled","colorWithOpacity","opacity","templateRegEx","fromTemplate","recordLayer","recordStyleLayer","record","styleFunctionArgs","stylefunction","sourceOrLayers","spriteData","spriteImageUrl","version","arguments","spriteImageSize","spriteImageUnSDFed","Image","blobUrl","crossOrigin","onload","changed","worker","postMessage","action","handler","event","allLayers","layersBySourceLayer","mapboxLayers","iconImageCache","patternCache","mapboxSource","source","sourceLayer","sources","textHalo","Stroke","Fill","styles","styleFunction","onlyLayer","getProperties","getGeometry","getType","getId","stylesLength","featureBelongsToLayer","layerData","layout","paint","visibility","minzoom","maxzoom","stroke","strokeColor","fillIcon","icon","getFill","getStroke","getText","Style","setZIndex","icon_cache_key","pattern","globalAlpha","createPattern","setColor","setWidth","setLineCap","setLineJoin","setMiterLimit","setLineDash","hasImage","placementAngle","iconImg","skipLabel","iconImage","styleGeom","imageElement","iconRotationAlignment","geom","getFlatMidpoint","getFlatMidpoints","getExtent","midpoint","NaN","RenderFeature","placement","stride","getStride","getFlatCoordinates","minX","minY","maxX","maxY","iconSize","iconColor","iconCacheKey","declutterMode","displacement","iconOptions","rotateWithView","Icon","offset","sdf","setGeometry","setRotation","setOpacity","setAnchor","setImage","setText","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","radius","textLineHeight","textSize","maxTextWidth","fontArray","includes","textField","reduce","acc","chunk","chunkFont","Text","padding","textTransform","wrappedLabel","setFont","textAnchor","textAlign","setPlacement","setRepeat","symbolSpacing","setOverflow","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textRotationAlignment","setRotateWithView","setMaxAngle","setTextAlign","textBaseline","setTextBaseline","textJustify","setJustify","setOffsetX","setOffsetY","setFill","halfTextSize","setStroke","textPadding","getPadding","setStyle","getStyleForLayer","evaluateStyle","getStyleFunction","hillshade","inputs","elevationImage","elevationData","shadeData","Uint8ClampedArray","dp","pixel","twoPi","halfPi","sunEl","sunAz","cosSunEl","sinSunEl","highlightColor","shadowColor","accentColor","encoding","pixelX","pixelY","x0","y0","z0","z1","dzdx","dzdy","slope","aspect","accent","scaled","shade","scaledAccentColor","compositeShadeColor","clamp","slopeScaleBase","scaledSlope","cosIncidence","calculateElevation","vert","ImageData","getTileResolutions","tileSize","createXYZ","maxZoom","getResolutions","completeOptions","applyStyle","sourceOrLayersOrOptions","optionsOrPath","sourceId","updateSource","VectorLayer","VectorTileLayer","find","assignSource","setupVectorSource","targetSource","getSource","setSource","setTileUrlFunction","getTileUrlFunction","setUrls","getUrls","format_","getAttributions","setAttributions","getTileLoadFunction","defaultLoadFunction","setTileLoadFunction","equivalent","getProjection","tileGrid","getTileGrid","isFinite","getMaxResolution","getMinZoom","setMaxResolution","getResolution","setupGeoJSONSource","url_","getUrl","spriteScale","onChange","units","getUnits","METERS_PER_UNIT","applyStyleFunction","getStyle","spriteUrl","origin","pathname","search","spritesJson","transformed","setFirstBackground","mapOrLayer","Layer","setBackground","getBackgroundColor","Map","LayerGroup","getLayers","setupBackgroundLayer","applyBackground","getSourceIdByRef","extentFromTileJSON","tileJSON","bounds","fromLonLat","tr","sourceOptionsFromTileJSON","tileJSONSource","TileJSON","tileJSONDoc","getTileJSON","projectionExtent","minZoom","sourceOptions","attributions","TileGrid","getTopLeft","getOrigin","getTileSize","urls","glLayer","background","bg","_colorWithOpacity","div","className","position","Source","render","frameState","viewState","backgroundColor","MVT","VectorTileSource","setupVectorLayer","declutter","visible","getBboxTemplate","projCode","getCode","setupRasterLayer","TileLayer","transition","getTileUrl","tileCoord","bboxTemplate","getTileCoordExtent","setupHillshadeLayer","tileLayer","ImageLayer","Raster","operationType","operation","geoJsonFormat","GeoJSON","dataProjection","geoJsonUrl","extentUrl","VectorSource","attribution","loader","failure","addFeatures","removeLoadedExtent","strategy","bboxStrategy","getUserProjection","setupGeoJSONLayer","prerenderRasterLayer","updateRasterLayerProperties","manageVisibility","mapOrGroup","layerMapboxLayerids","mapboxLayer","setVisible","on","setupLayer","glLayers","hillshadeLayer","glSourceId","processStyle","promises","view","getView","isDef","getRotation","View","maxResolution","setView","getCenter","setCenter","getZoom","setResolution","fit","nearest","getSize","layerIds","finalizeLayer","all","apply","mapOrGroupOrElement","HTMLElement","target","getState","sourceMinZoom","setMinResolution","getArray","once","getMapboxLayer","layerStyle","addMapboxLayer","beforeLayerId","spliceIndex","sourceIndex","beforeMapboxLayer","sourceOffset","beforeLayer","getLayer","beforeLayerIndex","insertAt","sourceLayerId","layerIndex","updateMapboxLayer","findIndex","oldLayer","applyStylefunction","removeMapboxLayer","mapboxLayerIdOrLayer","mapboxLayerId","layerMapboxLayers","setFeatureState","state","getFeatureState","ErrorEvent","BaseEvent","EventType","MapboxVectorLayer","zIndex","minResolution","renderOrder","renderBuffer","renderMode","updateWhileAnimating","updateWhileInteracting","preload","useInterimTilesOnError","getBackground","dispatchEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAIA,cAAA,GAAiB;AAAA,IACnB,aAAe,EAAA;AAAA,QAAC,CAAD;AAAA,QAAG,CAAH;AAAA,QAAK,CAAL;AAAA,QAAO,CAAP;AAAA,KADI;AAAA,IACO,WAAa,EAAA;AAAA,QAAC,GAAD;AAAA,QAAK,GAAL;AAAA,QAAS,GAAT;AAAA,QAAa,CAAb;AAAA,KADpB;AAAA,IAEnB,cAAgB,EAAA;AAAA,QAAC,GAAD;AAAA,QAAK,GAAL;AAAA,QAAS,GAAT;AAAA,QAAa,CAAb;AAAA,KAFG;AAAA,IAEc,MAAQ,EAAA;AAAA,QAAC,CAAD;AAAA,QAAG,GAAH;AAAA,QAAO,GAAP;AAAA,QAAW,CAAX;AAA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MAAMqiB,QAAA,GAAW,CACf3I,UAAA,CAAW,IAAX,EAAiB7Z,GAAjB,EAAsBjf,OAAA,CAAQ2c,MAAR,IAAkB3c,OAAA,CAAQ6tB,MAAhD,EAAwD,EACtDrK,WAAA,EAAa,IAAA,CAAKA,WADoC,EAAxD,CADe,CAAjB,CAlCmB;AAAA,QAuCnB,IAAI,IAAA,CAAKkiB,aAAL,EAAA,KAAyB7tC,SAA7B,EAAwC;AAAA,YACtC4pC,QAAA,CAASjnC,IAAT,CACE+hC,eAAA,CAAgB,IAAhB,EAAsBv8B,OAAA,CAAQof,QAA9B,EAAwC,EACtCoE,WAAA,EAAa,KAAKA,WADoB,EAAxC,CADF,CADsC,CAAA;AAAA,SAvCrB;AAAA,QA8CnBP,OAAA,CAAQyf,GAAR,CAAYjB,QAAZ,CACG5e,CAAAA,IADH,CACQ,MAAM;AAAA,YACVgL,MAAA,CAAOlJ,QAAP,CAAgB,OAAhB,CADU,CAAA;AAAA,SADd,CAIGxB,CAAAA,KAJH,CAIUriB,KAAD,IAAW;AAAA,YAChB,IAAA,CAAK6kC,aAAL,CAAmB,IAAId,UAAJ,CAAe/jC,KAAf,CAAnB,CADgB,CAAA;AAAA,YAEhB,MAAM+sB,MAAA,GAAS,IAAK4L,CAAAA,SAAL,EAAf,CAFgB;AAAA,YAGhB5L,MAAA,CAAOlJ,QAAP,CAAgB,OAAhB,CAHgB,CAAA;AAAA,SAJpB,CA9CmB,CAAA;AAAA,KALwC;AAAA;;;;"} \ No newline at end of file diff --git a/dist/mapbox.d.ts b/dist/mapbox.d.ts new file mode 100644 index 00000000..88db1da2 --- /dev/null +++ b/dist/mapbox.d.ts @@ -0,0 +1,34 @@ +/** + * Gets the path from a mapbox:// URL. + * @param {string} url The Mapbox URL. + * @return {string} The path. + * @private + */ +export function getMapboxPath(url: string): string; +/** + * Turns mapbox:// sprite URLs into resolvable URLs. + * @param {string} url The sprite URL. + * @param {string} token The access token. + * @param {string} styleUrl The style URL. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeSpriteUrl(url: string, token: string, styleUrl: string): string; +/** + * Turns mapbox:// style URLs into resolvable URLs. + * @param {string} url The style URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeStyleUrl(url: string, token: string): string; +/** + * Turns mapbox:// source URLs into vector tile URL templates. + * @param {string} url The source URL. + * @param {string} token The access token. + * @param {string} tokenParam The access token key. + * @param {string} styleUrl The style URL. + * @return {string} A vector tile template. + * @private + */ +export function normalizeSourceUrl(url: string, token: string, tokenParam: string, styleUrl: string): string; diff --git a/dist/olms.js b/dist/olms.js new file mode 100644 index 00000000..32e2c709 --- /dev/null +++ b/dist/olms.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ol/style/Circle.js"),require("ol/style/Fill.js"),require("ol/style/Icon.js"),require("ol/render/Feature.js"),require("ol/style/Stroke.js"),require("ol/style/Style.js"),require("ol/style/Text.js"),require("ol/render/canvas.js"),require("ol/TileState.js"),require("ol"),require("ol/tileurlfunction.js"),require("ol/util.js"),require("ol/format/GeoJSON.js"),require("ol/layer/Image.js"),require("ol/layer/Layer.js"),require("ol/layer/Group.js"),require("ol/format/MVT.js"),require("ol/Map.js"),require("ol/source/Raster.js"),require("ol/source/Source.js"),require("ol/tilegrid/TileGrid.js"),require("ol/source/TileJSON.js"),require("ol/layer/Tile.js"),require("ol/layer/Vector.js"),require("ol/source/Vector.js"),require("ol/layer/VectorTile.js"),require("ol/source/VectorTile.js"),require("ol/View.js"),require("ol/proj.js"),require("ol/loadingstrategy.js"),require("ol/tilegrid.js"),require("ol/extent.js"),require("ol/events/Event.js"),require("ol/events/EventType.js")):"function"==typeof define&&define.amd?define(["exports","ol/style/Circle.js","ol/style/Fill.js","ol/style/Icon.js","ol/render/Feature.js","ol/style/Stroke.js","ol/style/Style.js","ol/style/Text.js","ol/render/canvas.js","ol/TileState.js","ol","ol/tileurlfunction.js","ol/util.js","ol/format/GeoJSON.js","ol/layer/Image.js","ol/layer/Layer.js","ol/layer/Group.js","ol/format/MVT.js","ol/Map.js","ol/source/Raster.js","ol/source/Source.js","ol/tilegrid/TileGrid.js","ol/source/TileJSON.js","ol/layer/Tile.js","ol/layer/Vector.js","ol/source/Vector.js","ol/layer/VectorTile.js","ol/source/VectorTile.js","ol/View.js","ol/proj.js","ol/loadingstrategy.js","ol/tilegrid.js","ol/extent.js","ol/events/Event.js","ol/events/EventType.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).olms={},e.ol.style.Circle,e.ol.style.Fill,e.ol.style.Icon,e.ol.render.Feature,e.ol.style.Stroke,e.ol.style.Style,e.ol.style.Text,e.ol.render.canvas,e.ol.TileState,e.ol,e.ol.tileurlfunction,e.ol.util,e.ol.format.GeoJSON,e.ol.layer.Image,e.ol.layer.Layer,e.ol.layer.Group,e.ol.format.MVT,e.ol.Map,e.ol.source.Raster,e.ol.source.Source,e.ol.tilegrid.TileGrid,e.ol.source.TileJSON,e.ol.layer.Tile,e.ol.layer.Vector,e.ol.source.Vector,e.ol.layer.VectorTile,e.ol.source.VectorTile,e.ol.View,e.ol.proj,e.ol.loadingstrategy,e.ol.tilegrid,e.ol.extent,e.ol.events.Event,e.ol.events.EventType)}(this,(function(e,t,r,n,o,i,a,s,l,u,p,c,f,d,m,y,h,g,v,b,x,w,k,z,S,j,M,q,T,E,$,_,C,A,I){"use strict";function F(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var L=F(t),O=F(r),P=F(n),R=F(o),D=F(i),N=F(a),U=F(s),V=F(u),G=F(d),J=F(m),W=F(y),Z=F(h),B=F(g),X=F(v),H=F(b),Y=F(x),K=F(w),Q=F(k),ee=F(z),te=F(S),re=F(j),ne=F(M),oe=F(q),ie=F(T),ae=F(A),se=F(I);function le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ue,pe={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ce(e){return(e=Math.round(e))<0?0:e>255?255:e}function fe(e){return e<0?0:e>1?1:e}function de(e){return"%"===e[e.length-1]?ce(parseFloat(e)/100*255):ce(parseInt(e))}function me(e){return"%"===e[e.length-1]?fe(parseFloat(e)/100):fe(parseFloat(e))}function ye(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{ue={}.parseCSSColor=function(e){var t,r=e.replace(/ /g,"").toLowerCase();if(r in pe)return pe[r].slice();if("#"===r[0])return 4===r.length?(t=parseInt(r.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===r.length&&(t=parseInt(r.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=r.indexOf("("),o=r.indexOf(")");if(-1!==n&&o+1===r.length){var i=r.substr(0,n),a=r.substr(n+1,o-(n+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return null;s=me(a.pop());case"rgb":return 3!==a.length?null:[de(a[0]),de(a[1]),de(a[2]),s];case"hsla":if(4!==a.length)return null;s=me(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=me(a[1]),p=me(a[2]),c=p<=.5?p*(u+1):p+u-p*u,f=2*p-c;return[ce(255*ye(f,c,l+1/3)),ce(255*ye(f,c,l)),ce(255*ye(f,c,l-1/3)),s];default:return null}}return null}}catch(e){}class he{constructor(e,t,r,n=1){this.r=e,this.g=t,this.b=r,this.a=n}static parse(e){if(!e)return;if(e instanceof he)return e;if("string"!=typeof e)return;const t=ue(e);return t?new he(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,r,n]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(r)},${n})`}toArray(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]}toArray01(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[e/n,t/n,r/n,n]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:r,a:n}=this;return[e,t,r,n]}}he.black=new he(0,0,0,1),he.white=new he(1,1,1,1),he.transparent=new he(0,0,0,0),he.red=new he(1,0,0,1),he.blue=new he(0,0,1,1);var ge=he;function ve(e){return"object"==typeof e?["literal",e]:e}function be(e,t){let r=e.stops;if(!r)return function(e,t){const r=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",r]:r;if("enum"===t.type)return["match",r,Object.keys(t.values),r,e.default];{const n=["color"===t.type?"to-color":t.type,r,ve(e.default)];return"array"===t.type&&n.splice(1,0,t.value,t.length||null),n}}(e,t);const n=r&&"object"==typeof r[0][0],o=n||void 0!==e.property,i=n||!o;return r=r.map((e=>!o&&t.tokens&&"string"==typeof e[1]?[e[0],Me(e[1])]:[e[0],ve(e[1])])),n?function(e,t,r){const n={},o={},i=[];for(let t=0;t3&&t===e[e.length-2]||(n&&2===e.length||e.push(t),e.push(r))}function je(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function Me(e){const t=["concat"],r=/{([^{}]+)}/g;let n=0;for(let o=r.exec(e);null!==o;o=r.exec(e)){const i=e.slice(n,r.lastIndex-o[0].length);n=r.lastIndex,i.length>0&&t.push(i),t.push(["get",o[1]])}if(1===t.length)return e;if(n`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const Ve=[_e,Ce,Ae,Ie,Fe,Re,Le,Ne(Oe),De];function Ge(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Ge(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of Ve)if(!Ge(e,t))return null}return`Expected ${Ue(e)} but found ${Ue(t)} instead.`}function Je(e,t){return t.some((t=>t.kind===e.kind))}function We(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}class Ze{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Be{constructor(e,t,r,n,o){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=o}}class Xe{constructor(e){this.sections=e}static fromString(e){return new Xe([new Be(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof Xe?e:Xe.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const r={};t.fontStack&&(r["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(r["font-scale"]=t.scale),t.textColor&&(r["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(r)}return e}}class He{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new He({name:e,available:!1}):null}serialize(){return["image",this.name]}}function Ye(e,t,r,n){if(!("number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255)){return`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}return void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`}function Ke(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ge)return!0;if(e instanceof Ze)return!0;if(e instanceof Xe)return!0;if(e instanceof He)return!0;if(Array.isArray(e)){for(const t of e)if(!Ke(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!Ke(e[t]))return!1;return!0}return!1}function Qe(e){if(null===e)return _e;if("string"==typeof e)return Ae;if("boolean"==typeof e)return Ie;if("number"==typeof e)return Ce;if(e instanceof ge)return Fe;if(e instanceof Ze)return Pe;if(e instanceof Xe)return Re;if(e instanceof He)return De;if(Array.isArray(e)){const t=e.length;let r;for(const t of e){const e=Qe(t);if(r){if(r===e)continue;r=Oe;break}r=e}return Ne(r||Oe,t)}return Le}function et(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof ge||e instanceof Xe||e instanceof He?e.toString():JSON.stringify(e)}class tt{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Ke(e[1]))return t.error("invalid value");const r=e[1];let n=Qe(r);const o=t.expectedType;return"array"!==n.kind||0!==n.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(n=o),new tt(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ge?["rgba"].concat(this.value.toArray()):this.value instanceof Xe?this.value.serialize():this.value}}var rt=tt;var nt=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const ot={string:Ae,number:Ce,boolean:Ie,object:Le};class it{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1;const o=e[0];if("array"===o){let o,i;if(e.length>2){const r=e[1];if("string"!=typeof r||!(r in ot)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=ot[r],n++}else o=Oe;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);i=e[2],n++}r=Ne(o,i)}else r=ot[o];const i=[];for(;ne.outputDefined()))}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const r=e.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){t.push(r.kind);const n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((e=>e.serialize())))}}var at=it;class st{constructor(e){this.type=Re,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");const n=[];let o=!1;for(let r=1;r<=e.length-1;++r){const i=e[r];if(o&&"object"==typeof i&&!Array.isArray(i)){o=!1;let e=null;if(i["font-scale"]&&(e=t.parse(i["font-scale"],1,Ce),!e))return null;let r=null;if(i["text-font"]&&(r=t.parse(i["text-font"],1,Ne(Ae)),!r))return null;let a=null;if(i["text-color"]&&(a=t.parse(i["text-color"],1,Fe),!a))return null;const s=n[n.length-1];s.scale=e,s.font=r,s.textColor=a}else{const i=t.parse(e[r],1,Oe);if(!i)return null;const a=i.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,n.push({content:i,scale:null,font:null,textColor:null})}}return new st(n)}evaluate(e){return new Xe(this.sections.map((t=>{const r=t.content.evaluate(e);return Qe(r)===De?new Be("",r,null,null,null):new Be(et(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const r={};t.scale&&(r["font-scale"]=t.scale.serialize()),t.font&&(r["text-font"]=t.font.serialize()),t.textColor&&(r["text-color"]=t.textColor.serialize()),e.push(r)}return e}}class lt{constructor(e){this.type=De,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Ae);return r?new lt(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=He.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const ut={"to-boolean":Ie,"to-color":Fe,"to-number":Ce,"to-string":Ae};class pt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");const n=ut[r],o=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:Ye(t[0],t[1],t[2],t[3]),!r))return new ge(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new nt(r||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const r of this.args){if(t=r.evaluate(e),null===t)return 0;const n=Number(t);if(!isNaN(n))return n}throw new nt(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?Xe.fromString(et(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?He.fromString(et(this.args[0].evaluate(e))):et(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new st([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new lt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild((t=>{e.push(t.serialize())})),e}}var ct=pt;const ft=["Unknown","Point","LineString","Polygon"];var dt=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?ft[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord,o=r*t-e[0],i=n*t-e[1];return this.featureDistanceData.bearing[0]*o+this.featureDistanceData.bearing[1]*i}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=ge.parse(e)),t}};class mt{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((e=>e.serialize())))}static parse(e,t){const r=e[0],n=mt.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(n)?n[0]:n.type,i=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=i.filter((([t])=>!Array.isArray(t)||t.length===e.length-1));let s=null;for(const[n,i]of a){s=new Ut(t.registry,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(Ue).join(", ")})`:`(${Ue(t.type)}...)`;var t})).join(" | "),n=[];for(let r=1;r=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function xt(e,t){const r=(180+e[0])/360;const n=(o=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360);var o;const i=Math.pow(2,t.z);return[Math.round(r*i*gt),Math.round(n*i*gt)]}function wt(e,t,r){const n=e[0]-t[0],o=e[1]-t[1],i=e[0]-r[0],a=e[1]-r[1];return n*a-i*o==0&&n*i<=0&&o*a<=0}function kt(e,t){let r=!1;for(let a=0,s=t.length;an[1]!=i[1]>n[1]&&n[0]<(i[0]-o[0])*(n[1]-o[1])/(i[1]-o[1])+o[0]&&(r=!r)}}var n,o,i;return r}function zt(e,t){for(let r=0;r0&&c<0||p<0&&c>0}function jt(e,t,r,n){const o=[t[0]-e[0],t[1]-e[1]],i=[n[0]-r[0],n[1]-r[1]];return 0!=(a=i)[0]*(s=o)[1]-a[1]*s[0]&&!(!St(e,t,r,n)||!St(r,n,e,t));var a,s}function Mt(e,t,r){for(const n of r)for(let r=0;rr[2]){const t=.5*n;let o=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===o&&(o=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=o}vt(t,e)}function Ct(e,t,r,n){const o=Math.pow(2,n.z)*gt,i=[n.x*gt,n.y*gt],a=[];if(!e)return a;for(const n of e)for(const e of n){const n=[e.x+i[0],e.y+i[1]];_t(n,t,r,o),a.push(n)}return a}function At(e,t,r,n){const o=Math.pow(2,n.z)*gt,i=[n.x*gt,n.y*gt],a=[];if(!e)return a;for(const r of e){const e=[];for(const n of r){const r=[n.x+i[0],n.y+i[1]];vt(t,r),e.push(r)}a.push(e)}if(t[2]-t[0]<=o/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const n of e)_t(n,t,r,o)}var s;return a}class It{constructor(e,t){this.type=Ie,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Ke(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e{t&&!Lt(e)&&(t=!1)})),t}function Ot(e){if(e instanceof yt&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!Ot(e)&&(t=!1)})),t}function Pt(e,t){if(e instanceof yt&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild((e=>{r&&!Pt(e,t)&&(r=!1)})),r}class Rt{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new Rt(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Dt=Rt;class Nt{constructor(e,t=[],r,n=new $e,o=[]){this.registry=e,this.path=t,this.key=t.map((e=>`[${e}]`)).join(""),this.scope=n,this.errors=o,this.expectedType=r}parse(e,t,r,n,o={}){return t?this.concat(t,r,n)._parse(e,o):this._parse(e,o)}_parse(e,t){function r(e,t,r){return"assert"===r?new at(t,[e]):"coerce"===r?new ct(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[n];if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const e=this.expectedType,o=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==o.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==o.kind&&"string"!==o.kind){if(this.checkSubtype(e,o))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof rt)&&"resolvedImage"!==n.type.kind&&Vt(n)){const e=new dt;try{n=new rt(n.type,n.evaluate(e))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const n="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new Nt(this.registry,n,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new Te(r,e))}checkSubtype(e,t){const r=Ge(e,t);return r&&this.error(r),r}}var Ut=Nt;function Vt(e){if(e instanceof Dt)return Vt(e.boundExpression);if(e instanceof yt&&"error"===e.name)return!1;if(e instanceof ht)return!1;if(e instanceof Ft)return!1;const t=e instanceof ct||e instanceof at;let r=!0;return e.eachChild((e=>{r=t?r&&Vt(e):r&&e instanceof rt})),!!r&&(Lt(e)&&Pt(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]))}function Gt(e,t){const r=e.length-1;let n,o,i=0,a=r,s=0;for(;i<=a;)if(s=Math.floor((i+a)/2),n=e[s],o=e[s+1],n<=t){if(s===r||tt))throw new nt("Input is not a number.");a=s-1}return 0}class Jt{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,Ce);if(!r)return null;const n=[];let o=null;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);for(let r=1;r=i)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=t.parse(a,l,o);if(!u)return null;o=o||u.type,n.push([i,u])}return new Jt(o,r,n)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);return r[Gt(t,n)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){const e=["step",this.input.serialize()];for(let t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var Wt=Jt,Zt=Bt;function Bt(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}Bt.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},Bt.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},Bt.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},Bt.prototype.solveCurveX=function(e,t){var r,n,o,i,a;for(void 0===t&&(t=1e-6),o=e,a=0;a<8;a++){if(i=this.sampleCurveX(o)-e,Math.abs(i)(n=1))return n;for(;ri?r=o:n=o,o=.5*(n-r)+r}return o},Bt.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var Xt=le(Zt);function Ht(e,t,r){return e*(1-r)+t*r}var Yt=Object.freeze({__proto__:null,number:Ht,color:function(e,t,r){return new ge(Ht(e.r,t.r,r),Ht(e.g,t.g,r),Ht(e.b,t.b,r),Ht(e.a,t.a,r))},array:function(e,t,r){return e.map(((e,n)=>Ht(e,t[n],r)))}});const Kt=.95047,Qt=1,er=1.08883,tr=4/29,rr=6/29,nr=3*rr*rr,or=rr*rr*rr,ir=Math.PI/180,ar=180/Math.PI;function sr(e){return e>or?Math.pow(e,1/3):e/nr+tr}function lr(e){return e>rr?e*e*e:nr*(e-tr)}function ur(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function pr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function cr(e){const t=pr(e.r),r=pr(e.g),n=pr(e.b),o=sr((.4124564*t+.3575761*r+.1804375*n)/Kt),i=sr((.2126729*t+.7151522*r+.072175*n)/Qt);return{l:116*i-16,a:500*(o-i),b:200*(i-sr((.0193339*t+.119192*r+.9503041*n)/er)),alpha:e.a}}function fr(e){let t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=Qt*lr(t),r=Kt*lr(r),n=er*lr(n),new ge(ur(3.2404542*r-1.5371385*t-.4985314*n),ur(-.969266*r+1.8760108*t+.041556*n),ur(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function dr(e,t,r){const n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}const mr={forward:cr,reverse:fr,interpolate:function(e,t,r){return{l:Ht(e.l,t.l,r),a:Ht(e.a,t.a,r),b:Ht(e.b,t.b,r),alpha:Ht(e.alpha,t.alpha,r)}}},yr={forward:function(e){const{l:t,a:r,b:n}=cr(e),o=Math.atan2(n,r)*ar;return{h:o<0?o+360:o,c:Math.sqrt(r*r+n*n),l:t,alpha:e.a}},reverse:function(e){const t=e.h*ir,r=e.c;return fr({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:dr(e.h,t.h,r),c:Ht(e.c,t.c,r),l:Ht(e.l,t.l,r),alpha:Ht(e.alpha,t.alpha,r)}}};class hr{constructor(e,t,r,n,o){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[e,t]of o)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,r,n){let o=0;if("exponential"===e.name)o=gr(t,e.base,r,n);else if("linear"===e.name)o=gr(t,1,r,n);else if("cubic-bezier"===e.name){const i=e.controlPoints;o=new Xt(i[0],i[1],i[2],i[3]).solve(gr(t,1,r,n))}return o}static parse(e,t){let[r,n,o,...i]=e;if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const e=n[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:e}}else{if("cubic-bezier"!==n[0])return t.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const e=n.slice(1);if(4!==e.length||e.some((e=>"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,Ce),!o)return null;const a=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=Fe:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);const u=t.parse(n,l,s);if(!u)return null;s=s||u.type,a.push([r,u])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new hr(s,r,n,o,a):t.error(`Type ${Ue(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);const i=Gt(t,n),a=t[i],s=t[i+1],l=hr.interpolationFactor(this.interpolation,n,a,s),u=r[i].evaluate(e),p=r[i+1].evaluate(e);return"interpolate"===this.operator?Yt[this.type.kind.toLowerCase()](u,p,l):"interpolate-hcl"===this.operator?yr.reverse(yr.interpolate(yr.forward(u),yr.forward(p),l)):mr.reverse(mr.interpolate(mr.forward(u),mr.forward(p),l))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){let e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let e=0;eGe(n,e.type)));return new br(i?Oe:r,o)}evaluate(e){let t,r=null,n=0;for(const o of this.args){if(n++,r=o.evaluate(e),r&&r instanceof He&&!r.available&&(t||(t=r),r=null,n===this.args.length))return t;if(null!==r)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){const e=["coalesce"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var xr=br;class wr{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new nt(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new nt(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Sr=zr;class jr{constructor(e,t){this.type=Ie,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Oe),n=t.parse(e[2],2,Oe);return r&&n?Je(r.type,[Ie,Ae,Ce,_e,Oe])?new jr(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ue(r.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(null==r)return!1;if(!We(t,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${Ue(Qe(t))} instead.`);if(!We(r,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${Ue(Qe(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Mr=jr;class qr{constructor(e,t,r){this.type=Ce,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Oe),n=t.parse(e[2],2,Oe);if(!r||!n)return null;if(!Je(r.type,[Ie,Ae,Ce,_e,Oe]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ue(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,Ce);return o?new qr(r,n,o):null}return new qr(r,n)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!We(t,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${Ue(Qe(t))} instead.`);if(!We(r,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${Ue(Qe(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Tr=qr;class Er{constructor(e,t,r,n,o,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=o,this.otherwise=i}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const o={},i=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,Qe(e)))return null}else r=Qe(e);if(void 0!==o[String(e)])return u.error("Branch labels must be unique.");o[String(e)]=i.length}const p=t.parse(l,a,n);if(!p)return null;n=n||p.type,i.push(p)}const a=t.parse(e[1],1,Oe);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,n);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(r,a.type)?null:new Er(r,n,a,o,i,s):null}evaluate(e){const t=this.input.evaluate(e);return(Qe(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),r=[],n={};for(const e of t){const t=n[this.cases[e]];void 0===t?(n[this.cases[e]]=r.length,r.push([this.cases[e],[e]])):r[t][1].push(e)}const o=e=>"number"===this.inputType.kind?Number(e):e;for(const[t,n]of r)1===n.length?e.push(o(n[0])):e.push(n.map(o)),e.push(this.outputs[t].serialize());return e.push(this.otherwise.serialize()),e}}var $r=Er;class _r{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const n=[];for(let o=1;ot.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var Cr=_r;class Ar{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Oe),n=t.parse(e[2],2,Ce);if(!r||!n)return null;if(!Je(r.type,[Ne(Oe),Ae,Oe]))return t.error(`Expected first argument to be of type array or string, but found ${Ue(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,Ce);return o?new Ar(r.type,r,n,o):null}return new Ar(r.type,r,n)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!We(t,["string","array"]))throw new nt(`Expected first argument to be of type array or string, but found ${Ue(Qe(t))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Ir=Ar;function Fr(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Lr(e,t,r,n){return 0===n.compare(t,r)}function Or(e,t,r){const n="=="!==e&&"!="!==e;return class o{constructor(e,t,r){this.type=Ie,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const r=e[0];let i=t.parse(e[1],1,Oe);if(!i)return null;if(!Fr(r,i.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${Ue(i.type)}'.`);let a=t.parse(e[2],2,Oe);if(!a)return null;if(!Fr(r,a.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${Ue(a.type)}'.`);if(i.type.kind!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${Ue(i.type)}' and '${Ue(a.type)}'.`);n&&("value"===i.type.kind&&"value"!==a.type.kind?i=new at(a.type,[i]):"value"!==i.type.kind&&"value"===a.type.kind&&(a=new at(i.type,[a])));let s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,Pe),!s)return null}return new o(i,a,s)}evaluate(o){const i=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const t=Qe(i),r=Qe(a);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new nt(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const e=Qe(i),r=Qe(a);if("string"!==e.kind||"string"!==r.kind)return t(o,i,a)}return this.collator?r(o,i,a,this.collator.evaluate(o)):t(o,i,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild((e=>{t.push(e.serialize())})),t}}}const Pr=Or("==",(function(e,t,r){return t===r}),Lr),Rr=Or("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Lr(0,t,r,n)})),Dr=Or("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Ur=Or("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Vr=Or(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0}));class Gr{constructor(e,t,r,n,o,i){this.type=Ae,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=o,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Ce);if(!r)return null;const n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let o=null;if(n.locale&&(o=t.parse(n.locale,1,Ae),!o))return null;let i=null;if(n.currency&&(i=t.parse(n.currency,1,Ae),!i))return null;let a=null;if(n.unit&&(a=t.parse(n.unit,1,Ae),!a))return null;let s=null;if(n["min-fraction-digits"]&&(s=t.parse(n["min-fraction-digits"],1,Ce),!s))return null;let l=null;return n["max-fraction-digits"]&&(l=t.parse(n["max-fraction-digits"],1,Ce),!l)?null:new Gr(r,o,i,a,s,l)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Jr{constructor(e){this.type=Ce,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${Ue(r.type)} instead.`):new Jr(r):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new nt(`Expected value to be of type string or array, but found ${Ue(Qe(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild((t=>{e.push(t.serialize())})),e}}const Wr={"==":Pr,"!=":Rr,">":Nr,"<":Dr,">=":Vr,"<=":Ur,array:at,at:Sr,boolean:at,case:Cr,coalesce:xr,collator:ht,format:st,image:lt,in:Mr,"index-of":Tr,interpolate:vr,"interpolate-hcl":vr,"interpolate-lab":vr,length:Jr,let:kr,literal:rt,match:$r,number:at,"number-format":Gr,object:at,slice:Ir,step:Wt,string:at,"to-boolean":ct,"to-color":ct,"to-number":ct,"to-string":ct,var:Dt,within:Ft};function Zr(e,[t,r,n,o]){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);const i=o?o.evaluate(e):1,a=Ye(t,r,n,i);if(a)throw new nt(a);return new ge(t/255*i,r/255*i,n/255*i,i)}function Br(e,t){return e in t}function Xr(e,t){const r=t[e];return void 0===r?null:r}function Hr(e){return{type:e}}yt.register(Wr,{error:[{kind:"error"},[Ae],(e,[t])=>{throw new nt(t.evaluate(e))}],typeof:[Ae,[Oe],(e,[t])=>Ue(Qe(t.evaluate(e)))],"to-rgba":[Ne(Ce,4),[Fe],(e,[t])=>t.evaluate(e).toArray()],rgb:[Fe,[Ce,Ce,Ce],Zr],rgba:[Fe,[Ce,Ce,Ce,Ce],Zr],has:{type:Ie,overloads:[[[Ae],(e,[t])=>Br(t.evaluate(e),e.properties())],[[Ae,Le],(e,[t,r])=>Br(t.evaluate(e),r.evaluate(e))]]},get:{type:Oe,overloads:[[[Ae],(e,[t])=>Xr(t.evaluate(e),e.properties())],[[Ae,Le],(e,[t,r])=>Xr(t.evaluate(e),r.evaluate(e))]]},"feature-state":[Oe,[Ae],(e,[t])=>Xr(t.evaluate(e),e.featureState||{})],properties:[Le,[],e=>e.properties()],"geometry-type":[Ae,[],e=>e.geometryType()],id:[Oe,[],e=>e.id()],zoom:[Ce,[],e=>e.globals.zoom],pitch:[Ce,[],e=>e.globals.pitch||0],"distance-from-center":[Ce,[],e=>e.distanceFromCenter()],"heatmap-density":[Ce,[],e=>e.globals.heatmapDensity||0],"line-progress":[Ce,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[Ce,[],e=>e.globals.skyRadialProgress||0],accumulated:[Oe,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[Ce,Hr(Ce),(e,t)=>{let r=0;for(const n of t)r+=n.evaluate(e);return r}],"*":[Ce,Hr(Ce),(e,t)=>{let r=1;for(const n of t)r*=n.evaluate(e);return r}],"-":{type:Ce,overloads:[[[Ce,Ce],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[Ce],(e,[t])=>-t.evaluate(e)]]},"/":[Ce,[Ce,Ce],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[Ce,[Ce,Ce],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[Ce,[],()=>Math.LN2],pi:[Ce,[],()=>Math.PI],e:[Ce,[],()=>Math.E],"^":[Ce,[Ce,Ce],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[Ce,[Ce],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[Ce,[Ce],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[Ce,[Ce],(e,[t])=>Math.log(t.evaluate(e))],log2:[Ce,[Ce],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[Ce,[Ce],(e,[t])=>Math.sin(t.evaluate(e))],cos:[Ce,[Ce],(e,[t])=>Math.cos(t.evaluate(e))],tan:[Ce,[Ce],(e,[t])=>Math.tan(t.evaluate(e))],asin:[Ce,[Ce],(e,[t])=>Math.asin(t.evaluate(e))],acos:[Ce,[Ce],(e,[t])=>Math.acos(t.evaluate(e))],atan:[Ce,[Ce],(e,[t])=>Math.atan(t.evaluate(e))],min:[Ce,Hr(Ce),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[Ce,Hr(Ce),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[Ce,[Ce],(e,[t])=>Math.abs(t.evaluate(e))],round:[Ce,[Ce],(e,[t])=>{const r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ce,[Ce],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[Ce,[Ce],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[Ie,[Ae,Oe],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[Ie,[Oe],(e,[t])=>e.id()===t.value],"filter-type-==":[Ie,[Ae],(e,[t])=>e.geometryType()===t.value],"filter-<":[Ie,[Ae,Oe],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n{const r=e.id(),n=t.value;return typeof r==typeof n&&r":[Ie,[Ae,Oe],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>o}],"filter-id->":[Ie,[Oe],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[Ie,[Ae,Oe],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Ie,[Oe],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[Ie,[Ae,Oe],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[Ie,[Oe],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[Ie,[Oe],(e,[t])=>t.value in e.properties()],"filter-has-id":[Ie,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[Ie,[Ne(Ae)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[Ie,[Ne(Oe)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[Ie,[Ae,Ne(Oe)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[Ie,[Ae,Ne(Oe)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){const o=r+n>>1;if(t[o]===e)return!0;t[o]>e?n=o-1:r=o+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:Ie,overloads:[[[Ie,Ie],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Hr(Ie),(e,t)=>{for(const r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:Ie,overloads:[[[Ie,Ie],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Hr(Ie),(e,t)=>{for(const r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[Ie,[Ie],(e,[t])=>!t.evaluate(e)],"is-supported-script":[Ie,[Ae],(e,[t])=>{const r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[Ae,[Ae],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[Ae,[Ae],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[Ae,Hr(Oe),(e,t)=>t.map((t=>et(t.evaluate(e)))).join("")],"resolved-locale":[Ae,[Pe],(e,[t])=>t.evaluate(e).resolvedLocale()]});var Yr=Wr;function Kr(e){return{result:"success",value:e}}function Qr(e){return{result:"error",value:e}}function en(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}class tn{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new dt,this._defaultValue=t?function(e){return"color"===e.type&&(en(e.default)||Array.isArray(e.default))?new ge(0,0,0,0):"color"===e.type?ge.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,o,i,a,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,o,i,a,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new nt(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function rn(e,t){const r=new Ut(Yr,[],t?function(e){const t={color:Fe,string:Ae,number:Ce,enum:Ae,boolean:Ie,formatted:Re,resolvedImage:De};if("array"===e.type)return Ne(t[e.value]||Oe,e.length);return t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Kr(new tn(n,t)):Qr(r.errors)}class nn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Ot(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}}class on{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Ot(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}interpolationFactor(e,t,r){return this.interpolationType?vr.interpolationFactor(this.interpolationType,e,t,r):0}}function an(e,t){if("error"===(e=rn(e,t)).result)return e;const r=e.value.expression,n=Lt(r);if(!n&&!function(e){return"data-driven"===e["property-type"]}(t))return Qr([new Te("","data expressions not supported")]);const o=Pt(r,["zoom","pitch","distance-from-center"]);if(!o&&!function(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}(t))return Qr([new Te("","zoom expressions not supported")]);const i=sn(r);if(!i&&!o)return Qr([new Te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(i instanceof Te)return Qr([i]);if(i instanceof vr&&!function(e){return!!e.expression&&e.expression.interpolated}(t))return Qr([new Te("",'"interpolate" expressions cannot be used with this property')]);if(!i)return Kr(new nn(n?"constant":"source",e.value));const a=i instanceof vr?i.interpolation:void 0;return Kr(new on(n?"camera":"composite",e.value,i.labels,a))}function sn(e){let t=null;if(e instanceof kr)t=sn(e.result);else if(e instanceof xr){for(const r of e.args)if(t=sn(r),t)break}else(e instanceof Wt||e instanceof vr)&&e.input instanceof yt&&"zoom"===e.input.name&&(t=e);return t instanceof Te||e.eachChild((e=>{const r=sn(e);r instanceof Te?t=r:!t&&r?t=new Te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new Te("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function ln(e){if(Array.isArray(e))return e.map(ln);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const r in e)t[r]=ln(e[r]);return t}return function(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}(e)}var un={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function pn(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!pn(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}function cn(e,t="fill"){if(null==e)return{filter:()=>!0,needGeometry:!1,needFeature:!1};pn(e)||(e=vn(e));const r=e;let n=!0;try{n=function(e){if(!mn(e))return e;let t=ln(e);return dn(t),t=fn(t),t}(r)}catch(e){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n `)}const o=un[`filter_${t}`],i=rn(n,o);let a=null;if("error"===i.result)throw new Error(i.value.map((e=>`${e.key}: ${e.message}`)).join(", "));a=(e,t,r)=>i.value.evaluate(e,t,{},r);let s=null,l=null;if(n!==r){const e=rn(r,o);if("error"===e.result)throw new Error(e.value.map((e=>`${e.key}: ${e.message}`)).join(", "));s=(t,r,n,o,i)=>e.value.evaluate(t,r,{},n,void 0,void 0,o,i),l=!Lt(e.value.expression)}return{filter:a,dynamicFilter:s||void 0,needGeometry:gn(n),needFeature:!!l}}function fn(e){if(!Array.isArray(e))return e;const t=function(e){if(yn.has(e[0]))for(let t=1;tfn(e)))}function dn(e){let t=!1;const r=[];if("case"===e[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function hn(e,t){return et?1:0}function gn(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?bn(e[1],e[2],t):"any"===t?(r=e.slice(1),["any"].concat(r.map(vn))):"all"===t?["all"].concat(e.slice(1).map(vn)):"none"===t?["all"].concat(e.slice(1).map(vn).map(kn)):"in"===t?xn(e[1],e.slice(2)):"!in"===t?kn(xn(e[1],e.slice(2))):"has"===t?wn(e[1]):"!has"===t?kn(wn(e[1])):"within"!==t||e}function bn(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function xn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((e=>typeof e!=typeof t[0]))?["filter-in-large",e,["literal",t.sort(hn)]]:["filter-in-small",e,["literal",t]]}}function wn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function kn(e){return["!",e]}var zn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Sn(e,t){const r={};for(const t in e)"ref"!==t&&(r[t]=e[t]);return zn.forEach((e=>{e in t&&(r[e]=t[e])})),r}function jn(e){e=e.slice();const t=Object.create(null);for(let r=0;r1?u[u.length-2].toLowerCase():"";if(p==c||p==c.replace("-","")||f+"-"+p==c){o=Mn[c],u.pop(),f&&c.startsWith(f)&&u.pop();break}}"number"==typeof p&&(o=p);var d=u.join(qn).replace("Klokantech Noto Sans","Noto Sans");-1!==d.indexOf(qn)&&(d='"'+d+'"'),a.push(d)}n=En[e]=[i,o,a]}return n[0]+qn+n[1]+qn+t+"px"+(r?"/"+r:"")+qn+n[2]}));const _n="https://api.mapbox.com";function Cn(e){const t="mapbox://";return 0!==e.indexOf(t)?"":e.slice(t.length)}function An(e,t){const r=Cn(e);if(!r)return decodeURI(new URL(e,location.href).href);const n="styles/";if(0!==r.indexOf(n))throw new Error(`unexpected style url: ${e}`);const o=r.slice(n.length);return`${_n}/styles/v1/${o}?&access_token=${t}`}function In(e,t,r,n){const o=new URL(e,n),i=Cn(e);if(!i)return t?(o.searchParams.set(r,t),decodeURI(o.href)):decodeURI(o.href);if("mapbox.satellite"===i){return`https://api.mapbox.com/v4/${i}/{z}/{x}/{y}${window.devicePixelRatio>=1.5?"@2x":""}.webp?access_token=${t}`}return`https://{a-d}.tiles.mapbox.com/v4/${i}/{z}/{x}/{y}.vector.pbf?access_token=${t}`}const Fn={},Ln={};let On=0;function Pn(e){return e.id||(e.id=On++),e.id}function Rn(e,t){return Pn(e)+"."+f.getUid(t)}function Dn(e){let t=Fn[e.id];return t||(t={},Fn[Pn(e)]=t),t}function Nn(e){let t=Ln[e.id];return t||(t={},Ln[Pn(e)]=t),t}function Un(e){return e*Math.PI/180}const Vn=function(){const e=[];for(let t=78271.51696402048;e.length<=24;t/=2)e.push(t);return e}();function Gn(e,t){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(e,t);const r=document.createElement("canvas");return r.width=e,r.height=t,r}function Jn(e,t){let r=0;const n=t.length;for(;r{const n=r.transformRequest&&r.transformRequest(t,"Tiles")||t;if(e instanceof p.VectorTile)e.setLoader(((t,r,o)=>{fetch(n).then((e=>e.arrayBuffer())).then((r=>{const n=e.getFormat().readFeatures(r,{extent:t,featureProjection:o});e.setFeatures(n)})).catch((t=>e.setState(V.default.ERROR)))}));else{const t=e.getImage();n instanceof Request?fetch(n).then((e=>e.blob())).then((e=>{const r=URL.createObjectURL(e);t.addEventListener("load",(()=>URL.revokeObjectURL(r))),t.addEventListener("error",(()=>URL.revokeObjectURL(r))),t.src=r})).catch((t=>e.setState(V.default.ERROR))):t.src=n}});const a=e.url;if(a&&!e.tiles){const n=In(a,r.accessToken,r.accessTokenParam||"access_token",t||location.href);if(a.startsWith("mapbox://"))o=Promise.resolve({tileJson:Object.assign({},e,{url:void 0,tiles:c.expandUrl(n)}),tileLoadFunction:i});else{const e={};o=Zn("Source",n,r,e).then((function(t){return t.tiles=t.tiles.map((function(n){return"tms"===t.scheme&&(n=n.replace("{y}","{-y}")),In(n,r.accessToken,r.accessTokenParam||"access_token",e.request.url)})),Promise.resolve({tileJson:t,tileLoadFunction:i})}))}}else e=Object.assign({},e,{tiles:e.tiles.map((function(n){return"tms"===e.scheme&&(n=n.replace("{y}","{-y}")),In(n,r.accessToken,r.accessTokenParam||"access_token",t||location.href)}))}),o=Promise.resolve({tileJson:Object.assign({},e),tileLoadFunction:i});Xn[n]=o}return o}function Yn(e,t,r,n){const o=document.createElement("canvas"),i=[2*r*t.pixelRatio+t.width,2*r*t.pixelRatio+t.height];o.width=i[0],o.height=i[1];const a=o.getContext("2d");a.drawImage(e,t.x,t.y,t.width,t.height,r*t.pixelRatio,r*t.pixelRatio,t.width,t.height);const s=a.getImageData(0,0,i[0],i[1]);a.globalCompositeOperation="destination-over",a.fillStyle=`rgba(${255*n.r},${255*n.g},${255*n.b},${n.a})`;const l=s.data;for(let e=0,n=s.width;e0&&a.arc(e,o,r*t.pixelRatio,0,2*Math.PI)}return a.fill(),o}function Kn(e,t,r){const n=Math.max(0,Math.min(1,(r-e)/(t-e)));return n*n*(3-2*n)}function Qn(e,t,r){const n=document.createElement("canvas");n.width=t.width,n.height=t.height;const o=n.getContext("2d");o.drawImage(e,t.x,t.y,t.width,t.height,0,0,t.width,t.height);const i=o.getImageData(0,0,t.width,t.height),a=i.data;for(let e=0,t=i.width;e0?(a[o+0]=Math.round(255*r.r*l),a[o+1]=Math.round(255*r.g*l),a[o+2]=Math.round(255*r.b*l),a[o+3]=Math.round(255*l)):a[o+3]=0}return o.putImageData(i,0,0),n}const eo=Array(256).join(" ");function to(e,t){if(t>=.05){let r="";const n=e.split("\n"),o=eo.slice(0,Math.round(t/.1));for(let e=0,t=n.length;e0&&(r+="\n"),r+=n[e].split("").join(o);return r}return e}let ro;function no(){return ro||(ro=Gn(1,1).getContext("2d")),ro}function oo(e,t){return no().measureText(e).width+(e.length-1)*t}const io={};function ao(e,t,r,n){if(-1!==e.indexOf("\n")){const o=e.split("\n"),i=[];for(let e=0,a=o.length;e1){const e=no();e.font=t;const o=e.measureText("M").width*r;let s="";const l=[];for(let e=0,t=a.length;e1;++e){const r=l[e];if(oo(r,n)<.35*o){const o=e>0?oo(l[e-1],n):1/0,i=e.7*o&&oo(i,n)<.6*o){const a=r.split(" "),s=a.pop();oo(s,n)<.2*o&&(l[e]=a.join(" "),l[e+1]=s+" "+i),t-=1}}i=l.join("\n")}else i=e;i=to(i,n),io[o]=i}return i}const so=/font-family: ?([^;]*);/,lo=/("|')/g;let uo;function po(e){if(!uo){uo={};const e=document.styleSheets;for(let t=0,r=e.length;t`${e.key}: ${e.message}`)).join(", "));return r.value},go={},vo={zoom:0};let bo,xo;function wo(e,t,r,n,o,i,a){const s=e.id;i||(i={},console.warn("No functionCache provided to getValue()")),i[s]||(i[s]={});const l=i[s];if(!l[r]){let n=(e[t]||go)[r];const o=un[`${t}_${e.type}`][r];void 0===n&&(n=o.default);let i=(u=n,Array.isArray(u)&&u.length>0&&"string"==typeof u[0]&&u[0]in Yr);if(!i&&en(n)&&(n=be(n,o),i=!0),i){const e=ho(n,o);l[r]=e.evaluate.bind(e)}else"color"==o.type&&(n=ge.parse(n)),l[r]=function(){return n}}var u;return vo.zoom=n,l[r](vo,o,a)}function ko(e,t,r,n){if(!wo(e,"layout","icon-allow-overlap",t,r,n))return"declutter";return wo(e,"layout","icon-ignore-placement",t,r,n)?"none":"obstacle"}function zo(e,t,r,n,o){return o||console.warn("No filterCache provided to evaluateFilter()"),e in o||(o[e]=cn(t).filter),vo.zoom=n,o[e](vo,r)}let So=!1;function jo(e,t){if(e){if(!So&&(0===e.a||0===t))return;const r=e.a;return t=void 0===t?1:t,0===r?"transparent":"rgba("+Math.round(255*e.r/r)+","+Math.round(255*e.g/r)+","+Math.round(255*e.b/r)+","+r*t+")"}return e}const Mo=/\{[^{}}]*\}/g;function qo(e,t){return e.replace(Mo,(function(e){return t[e.slice(1,-1)]||""}))}let To=!1;const Eo={};function $o(e,t,r,n=Vn,o=undefined,i=undefined,a=undefined,s=undefined){if("string"==typeof t&&(t=JSON.parse(t)),8!=t.version)throw new Error("glStyle version 8 required.");let l,u,p;if(Eo[Rn(t,e)]=Array.from(arguments),i)if("undefined"!=typeof Image){const t=new Image;let r;i instanceof Request?fetch(i).then((e=>e.blob())).then((e=>{r=URL.createObjectURL(e),t.src=r})).catch((()=>{})):(t.crossOrigin="anonymous",t.src=i,r&&URL.revokeObjectURL(r)),t.onload=function(){l=t,u=[t.width,t.height],e.changed(),t.onload=null}}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){const e=self;e.postMessage({action:"loadImage",src:i}),e.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===i&&(l=e.data.image,u=[l.width,l.height])}))}const c=jn(t.layers),f={},d=[],m={},y={},h=Dn(t),g=Nn(t);let v;for(let e=0,n=c.length;e=T.maxzoom)continue;const C=T.filter;if(!C||zo(E,C,S,k,g)){let n,c,g,v,E,C;M=T;const A=f.index;if(3==z&&("fill"==T.type||"fill-extrusion"==T.type))if(c=wo(T,"paint",T.type+"-opacity",k,S,h,j),T.type+"-pattern"in _){const e=wo(T,"paint",T.type+"-pattern",k,S,h,j);if(e){const t="string"==typeof e?qo(e,d):e.toString();if(l&&o&&o[t]){++q,C=w[q],C&&C.getFill()&&!C.getStroke()&&!C.getText()||(C=new N.default({fill:new O.default}),w[q]=C),g=C.getFill(),C.setZIndex(A);const e=t+"."+c;let r=y[e];if(!r){const n=o[t],i=Gn(n.width,n.height),a=i.getContext("2d");a.globalAlpha=c,a.drawImage(l,n.x,n.y,n.width,n.height,0,0,n.width,n.height),r=a.createPattern(i,"repeat"),y[e]=r}g.setColor(r)}}}else n=jo(wo(T,"paint",T.type+"-color",k,S,h,j),c),T.type+"-outline-color"in _&&(E=jo(wo(T,"paint",T.type+"-outline-color",k,S,h,j),c)),E||(E=n),(n||E)&&(++q,C=w[q],(!C||n&&!C.getFill()||!n&&C.getFill()||E&&!C.getStroke()||!E&&C.getStroke()||C.getText())&&(C=new N.default({fill:n?new O.default:void 0,stroke:E?new D.default:void 0}),w[q]=C),n&&(g=C.getFill(),g.setColor(n)),E&&(v=C.getStroke(),v.setColor(E),v.setWidth(.5)),C.setZIndex(A));if(1!=z&&"line"==T.type){n=!("line-pattern"in _)&&"line-color"in _?jo(wo(T,"paint","line-color",k,S,h,j),wo(T,"paint","line-opacity",k,S,h,j)):void 0;const e=wo(T,"paint","line-width",k,S,h,j);n&&e>0&&(++q,C=w[q],C&&C.getStroke()&&!C.getFill()&&!C.getText()||(C=new N.default({stroke:new D.default}),w[q]=C),v=C.getStroke(),v.setLineCap(wo(T,"layout","line-cap",k,S,h,j)),v.setLineJoin(wo(T,"layout","line-join",k,S,h,j)),v.setMiterLimit(wo(T,"layout","line-miter-limit",k,S,h,j)),v.setColor(n),v.setWidth(e),v.setLineDash(_["line-dasharray"]?wo(T,"paint","line-dasharray",k,S,h,j).map((function(t){return t*e})):null),C.setZIndex(A))}let I,F,V,G,J,W,Z,B,X,H=!1,Y=null,K=0;if((1==z||2==z)&&"icon-image"in $){const t=wo(T,"layout","icon-image",k,S,h,j);if(t){let n;I="string"==typeof t?qo(t,d):t.toString();const a=s?s(e,I):void 0;if(l&&o&&o[I]||a){const e=wo(T,"layout","icon-rotation-alignment",k,S,h,j);if(2==z){const t=r.getGeometry();if(t.getFlatMidpoint||t.getFlatMidpoints){const r=t.getExtent();if(Math.sqrt(Math.max(Math.pow((r[2]-r[0])/i,2),Math.pow((r[3]-r[1])/i,2)))>150){const r="MultiLineString"===t.getType()?t.getFlatMidpoints():t.getFlatMidpoint();xo||(bo=[NaN,NaN],xo=new R.default("Point",bo,[],{},null)),n=xo,bo[0]=r[0],bo[1]=r[1];if("line"===wo(T,"layout","symbol-placement",k,S,h,j)&&"map"===e){const e=t.getStride(),n=t.getFlatCoordinates();for(let t=0,o=n.length-e;t=l&&r[0]<=p&&r[1]>=u&&r[1]<=c){K=Math.atan2(i-s,a-o);break}}}}}}if(2!==z||n){const t=wo(T,"layout","icon-size",k,S,h,j),r=void 0!==_["icon-color"]?wo(T,"paint","icon-color",k,S,h,j):null;if(!r||0!==r.a){const n=wo(T,"paint","icon-halo-color",k,S,h,j),i=wo(T,"paint","icon-halo-width",k,S,h,j);let s=`${I}.${t}.${i}.${n}`;if(null!==r&&(s+=`.${r}`),F=m[s],!F){const c=ko(T,k,S,h);let f;"icon-offset"in $&&(f=wo(T,"layout","icon-offset",k,S,h,j).slice(0),f[1]*=-1);let d=r?[255*r.r,255*r.g,255*r.b,r.a]:void 0;if(a){const t={color:d,rotateWithView:"map"===e,displacement:f,declutterMode:c};"string"==typeof a?t.src=a:(t.img=a,t.imgSize=[a.width,a.height]),F=new P.default(t)}else{const a=o[I];let s,m,y;i?a.sdf?(s=Yn(Qn(l,a,r),{x:0,y:0,width:a.width,height:a.height,pixelRatio:a.pixelRatio},i,n),d=void 0):s=Yn(l,a,i,n):(a.sdf?(p||(p=Qn(l,{x:0,y:0,width:u[0],height:u[1]},{r:1,g:1,b:1,a:1})),s=p):s=l,m=[a.width,a.height],y=[a.x,a.y]),F=new P.default({color:d,img:s,imgSize:u,size:m,offset:y,rotateWithView:"map"===e,scale:t/a.pixelRatio,displacement:f,declutterMode:c})}m[s]=F}}F&&(++q,C=w[q],C&&C.getImage()&&!C.getFill()&&!C.getStroke()||(C=new N.default,w[q]=C),C.setGeometry(n),F.setRotation(K+Un(wo(T,"layout","icon-rotate",k,S,h,j))),F.setOpacity(wo(T,"paint","icon-opacity",k,S,h,j)),F.setAnchor(yo[wo(T,"layout","icon-anchor",k,S,h,j)]),C.setImage(F),Y=C.getText(),C.setText(void 0),C.setZIndex(A),H=!0,V=!1)}else V=!0}}}if(1==z&&"circle"===T.type){++q,C=w[q],C&&C.getImage()&&!C.getFill()&&!C.getStroke()||(C=new N.default,w[q]=C);const e="circle-radius"in _?wo(T,"paint","circle-radius",k,S,h,j):5,t=jo(wo(T,"paint","circle-stroke-color",k,S,h,j),wo(T,"paint","circle-stroke-opacity",k,S,h,j)),r=jo(wo(T,"paint","circle-color",k,S,h,j),wo(T,"paint","circle-opacity",k,S,h,j)),n=wo(T,"paint","circle-stroke-width",k,S,h,j),o=e+"."+t+"."+r+"."+n;F=m[o],F||(F=new L.default({radius:e,stroke:t&&n>0?new D.default({width:n,color:t}):void 0,fill:r?new O.default({color:r}):void 0,declutterMode:"none"}),m[o]=F),C.setImage(F),Y=C.getText(),C.setText(void 0),C.setGeometry(void 0),C.setZIndex(A),H=!0}if("text-field"in $){Z=Math.round(wo(T,"layout","text-size",k,S,h,j));const e=wo(T,"layout","text-font",k,S,h,j);W=wo(T,"layout","text-line-height",k,S,h,j),J=$n(a?a(e,t.metadata?t.metadata["ol:webfonts"]:void 0):e,Z,W),J.includes("sans-serif")||(J+=",sans-serif"),B=wo(T,"layout","text-letter-spacing",k,S,h,j),X=wo(T,"layout","text-max-width",k,S,h,j);const r=wo(T,"layout","text-field",k,S,h,j);G="object"==typeof r&&r.sections?1===r.sections.length?r.toString():r.sections.reduce(((t,r,n)=>{const o=r.fontStack?r.fontStack.split(","):e,i=$n(a?a(o):o,Z*(r.scale||1),W);let s=r.text;if("\n"===s)return t.push("\n",""),t;if(2!=z){s=ao(s,i,X,B).split("\n");for(let e=0,r=s.length;e0&&t.push("\n",""),t.push(s[e],i);return t}t.push(to(s,B),i)}),[]):qo(r,d).trim(),c=wo(T,"paint","text-opacity",k,S,h,j)}if(G&&c&&!V){H||(++q,C=w[q],C&&C.getText()&&!C.getFill()&&!C.getStroke()||(C=new N.default,w[q]=C),C.setImage(void 0),C.setGeometry(void 0)),C.getText()||C.setText(Y||new U.default({padding:[2,2,2,2]})),Y=C.getText();const e=$["text-transform"];"uppercase"==e?G=Array.isArray(G)?G.map(((e,t)=>t%2?e:e.toUpperCase())):G.toUpperCase():"lowercase"==e&&(G=Array.isArray(G)?G.map(((e,t)=>t%2?e:e.toLowerCase())):G.toLowerCase());const t=Array.isArray(G)?G:2==z?to(G,B):ao(G,J,X,B);Y.setText(t),Y.setFont(J),Y.setRotation(Un(wo(T,"layout","text-rotate",k,S,h,j)));const r=wo(T,"layout","text-anchor",k,S,h,j),n=H||1==z?"point":wo(T,"layout","symbol-placement",k,S,h,j);let o;if("line-center"===n?(Y.setPlacement("line"),o="center"):Y.setPlacement(n),"line"===n&&"function"==typeof Y.setRepeat){const e=wo(T,"layout","symbol-spacing",k,S,h,j);Y.setRepeat(2*e)}Y.setOverflow("point"===n);let i=wo(T,"paint","text-halo-width",k,S,h,j);const a=wo(T,"layout","text-offset",k,S,h,j),s=wo(T,"paint","text-translate",k,S,h,j);let l=0,u=0;if("point"==n){o="center",-1!==r.indexOf("left")?(o="left",u=i):-1!==r.indexOf("right")&&(o="right",u=-i);const e=wo(T,"layout","text-rotation-alignment",k,S,h,j);Y.setRotateWithView("map"==e)}else Y.setMaxAngle(Un(wo(T,"layout","text-max-angle",k,S,h,j))*G.length/t.length),Y.setRotateWithView(!1);Y.setTextAlign(o);let p="middle";0==r.indexOf("bottom")?(p="bottom",l=-i-.5*(W-1)*Z):0==r.indexOf("top")&&(p="top",l=i+.5*(W-1)*Z),Y.setTextBaseline(p);const f=wo(T,"layout","text-justify",k,S,h,j);Y.setJustify("auto"===f?void 0:f),Y.setOffsetX(a[0]*Z+u+s[0]),Y.setOffsetY(a[1]*Z+l+s[1]),x.setColor(jo(wo(T,"paint","text-color",k,S,h,j),c)),Y.setFill(x);const d=jo(wo(T,"paint","text-halo-color",k,S,h,j),c);if(d){b.setColor(d),i*=2;const e=.5*Z;b.setWidth(i<=e?i:e),Y.setStroke(b)}else Y.setStroke(void 0);const m=wo(T,"layout","text-padding",k,S,h,j),y=Y.getPadding();m!==y[0]&&(y[0]=m,y[1]=m,y[2]=m,y[3]=m),C.setZIndex(A)}}}return q>-1?(w.length=q+1,To&&("set"in r?r.set("mapbox-layer",M):r.getProperties()["mapbox-layer"]=M),w):void 0};return e.setStyle(k),e.set("mapbox-source",v),e.set("mapbox-layers",d),e.set("mapbox-featurestate",e.get("mapbox-featurestate")||{}),k}function _o(e,t){const r=e[0],n=r.width,o=r.height,i=r.data,a=new Uint8ClampedArray(i.length),s=2*t.resolution,l=n-1,u=o-1,p=[0,0,0,0],c=2*Math.PI,f=Math.PI/2,d=Math.PI*t.sunEl/180,m=Math.PI*t.sunAz/180,y=Math.cos(d),h=Math.sin(d),g=t.highlightColor,v=t.shadowColor,b=t.accentColor,x=t.encoding;let w,k,z,S,j,M,q,T,E,$,_,C,A,I,F,L,O,P,R,D,N,U;function V(e,t="mapbox"){return"mapbox"===t?.1*(256*e[0]*256+256*e[1]+e[2])-1e4:"terrarium"===t?256*e[0]+e[1]+e[2]/256-32768:void 0}for(k=0;k<=u;++k)for(j=0===k?0:k-1,M=k===u?u:k+1,w=0;w<=l;++w)z=0===w?0:w-1,S=w===l?l:w+1,q=4*(k*n+z),p[0]=i[q],p[1]=i[q+1],p[2]=i[q+2],p[3]=i[q+3],T=t.vert*V(p,x),q=4*(k*n+S),p[0]=i[q],p[1]=i[q+1],p[2]=i[q+2],p[3]=i[q+3],E=t.vert*V(p,x),$=(E-T)/s,q=4*(j*n+w),p[0]=i[q],p[1]=i[q+1],p[2]=i[q+2],p[3]=i[q+3],T=t.vert*V(p,x),q=4*(M*n+w),p[0]=i[q],p[1]=i[q+1],p[2]=i[q+2],p[3]=i[q+3],E=t.vert*V(p,x),_=(E-T)/s,A=Math.atan2(_,-$),A=A<0?f-A:A>f?c-A+f:f-A,C=Math.atan(Math.sqrt($*$+_*_)),U=h*Math.cos(C)+y*Math.sin(C)*Math.cos(m-A),I=Math.cos(C),F=255*U,R=Math.min(Math.max(2*t.sunEl,0),1),D=1.875-1.75*t.opacity,N=.5!==t.opacity?f*((Math.pow(D,C)-1)/(Math.pow(D,f)-1)):C,O={r:(1-I)*b.r*R*255,g:(1-I)*b.g*R*255,b:(1-I)*b.b*R*255,a:(1-I)*b.a*R*255},L=Math.abs(((A+m)/Math.PI+.5)%2-1),P={r:(g.r*(1-L)+v.r*L)*F,g:(g.g*(1-L)+v.g*L)*F,b:(g.b*(1-L)+v.b*L)*F,a:(g.a*(1-L)+v.a*L)*F},q=4*(k*n+w),a[q]=O.r*(1-L)+P.r,a[q+1]=O.g*(1-L)+P.g,a[q+2]=O.b*(1-L)+P.b,a[q+3]=i[q+3]*t.opacity*R*Math.sin(N);return new ImageData(a,n,o)}function Co(e,t=512){return e.getExtent()?_.createXYZ({extent:e.getExtent(),tileSize:t,maxZoom:22}).getResolutions():Vn}function Ao(e,t){if(!t.accessToken){t=Object.assign({},t);new URL(e).searchParams.forEach(((e,r)=>{t.accessToken=e,t.accessTokenParam=r}))}return t}function Io(e,t,r="",n={},o=undefined){let i,a,s,l,u=!0;return"string"==typeof r||Array.isArray(r)?l=r:(s=r,l=s.source||s.layers,n=s),"string"==typeof n?(i=n,s={}):(i=n.styleUrl,s=n),!1===s.updateSource&&(u=!1),o||(o=s.resolutions),i||"string"!=typeof t||t.trim().startsWith("{")||(i=t),i&&(i=i.startsWith("data:")?location.href:An(i,s.accessToken),s=Ao(i,s)),new Promise((function(r,n){Bn(t,s).then((function(t){if(8!=t.version)return n(new Error("glStyle version 8 required."));if(!(e instanceof te.default||e instanceof ne.default))return n(new Error("Can only apply to VectorLayer or VectorTileLayer"));const p=e instanceof ne.default?"vector":"geojson";if(l?a=Array.isArray(l)?t.layers.find((function(e){return e.id===l[0]})).source:l:(a=Object.keys(t.sources).find((function(e){return t.sources[e].type===p})),l=a),!a)return n(new Error(`No ${p} source found in the glStyle.`));function c(){if(!u)return Promise.resolve();if(e instanceof ne.default)return No(t.sources[a],i,s).then((function(t){const r=e.getSource();if(r?t!==r&&(r.setTileUrlFunction(t.getTileUrlFunction()),"function"==typeof r.setUrls&&"function"==typeof t.getUrls&&r.setUrls(t.getUrls()),r.format_||(r.format_=t.format_),r.getAttributions()||r.setAttributions(t.getAttributions()),r.getTileLoadFunction()===q.defaultLoadFunction&&r.setTileLoadFunction(t.getTileLoadFunction()),E.equivalent(r.getProjection(),t.getProjection())&&(r.tileGrid=t.getTileGrid())):e.setSource(t),!isFinite(e.getMaxResolution())&&!isFinite(e.getMinZoom())){const t=e.getSource().getTileGrid();e.setMaxResolution(t.getResolution(t.getMinZoom()))}}));const r=t.sources[a];let n=e.getSource();n&&n.get("mapbox-source")===r||(n=Go(r,i,s));const o=e.getSource();return o?n!==o&&(o.getAttributions()||o.setAttributions(n.getAttributions()),o.format_||(o.format_=n.getFormat()),o.url_=n.getUrl()):e.setSource(n),Promise.resolve()}let f,d,m,y;function h(){if(y||t.sprite&&!d)y?(e.setStyle(y),c().then(r).catch(n)):n(new Error("Something went wrong trying to apply style."));else{if(s.projection&&!o){const e=E.get(s.projection).getUnits();"m"!==e&&(o=Vn.map((t=>t/E.METERS_PER_UNIT[e])))}y=$o(e,t,l,o,d,m,fo,s.getImage),e.getStyle()?c().then(r).catch(n):n(new Error(`Nothing to show for source [${a}]`))}}if(t.sprite){const e=new URL(function(e,t,r){const n=Cn(e);if(!n)return decodeURI(new URL(e,r).href);const o="sprites/";if(0!==n.indexOf(o))throw new Error(`unexpected sprites url: ${e}`);const i=n.slice(o.length);return`${_n}/styles/v1/${i}/sprite?access_token=${t}`}(t.sprite,s.accessToken,i||location.href));f=window.devicePixelRatio>=1.5?.5:1;const r=.5==f?"@2x":"";let o=e.origin+e.pathname+r+".json"+e.search;new Promise((function(t,r){Zn("Sprite",o,s).then(t).catch((function(n){o=e.origin+e.pathname+".json"+e.search,Zn("Sprite",o,s).then(t).catch(r)}))})).then((function(t){if(void 0===t&&n(new Error("No sprites found.")),d=t,m=e.origin+e.pathname+r+".png"+e.search,s.transformRequest){const e=s.transformRequest(m,"SpriteImage")||m;e instanceof Request&&(m=e)}h()})).catch((function(e){n(new Error(`Sprites cannot be loaded: ${o}: ${e.message}`))}))}else h()})).catch(n)}))}const Fo={};function Lo(e,t,r={}){return Bn(t,r).then((function(t){!function(e,t,r){t.layers.some((function(t){if("background"===t.type){if(e instanceof W.default)return e.setBackground((function(e){return Ro(t,e,r,{})})),!0;if(e instanceof X.default||e instanceof Z.default)return e.getLayers().push(Do(t,r,{})),!0}}))}(e,t,r)}))}function Oo(e,t){let r;return e.some((function(e){if(e.id==t)return r=e.source,!0})),r}function Po(e,t,r){const n=new Q.default({tileJSON:t,tileSize:e.tileSize||t.tileSize||512}),o=n.getTileJSON(),i=n.getTileGrid(),a=E.get(r.projection||"EPSG:3857"),s=function(e,t){const r=e.bounds;if(r){const e=E.fromLonLat([r[0],r[1]],t),n=E.fromLonLat([r[2],r[3]],t);return[e[0],e[1],n[0],n[1]]}return E.get(t).getExtent()}(o,a),l=a.getExtent(),u=o.minzoom||0,p=o.maxzoom||22,c={attributions:n.getAttributions(),projection:a,tileGrid:new K.default({origin:l?C.getTopLeft(l):i.getOrigin(0),extent:s||i.getExtent(),minZoom:u,resolutions:Co(a,t.tileSize).slice(0,p+1),tileSize:i.getTileSize(0)})};return Array.isArray(o.tiles)?c.urls=o.tiles:c.url=o.tiles,c}function Ro(e,t,r,n){const o={id:e.id,type:e.type},i=e.layout||{},a=e.paint||{};o.paint=a;const s=Jn(t,r.resolutions||Vn);let l,u;return void 0!==a["background-color"]&&(l=wo(o,"paint","background-color",s,Fo,n)),void 0!==a["background-opacity"]&&(u=wo(o,"paint","background-opacity",s,Fo,n)),"none"==i.visibility?void 0:jo(l,u)}function Do(e,t,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new W.default({source:new Y.default({}),render(o){const i=Ro(e,o.viewState.resolution,t,r);return n.style.backgroundColor=i,n}})}function No(e,t,r){return new Promise((function(n,o){Hn(e,t,r).then((function({tileJson:t,tileLoadFunction:o}){const i=Po(e,t,r);i.tileLoadFunction=o,i.format=new B.default,n(new oe.default(i))})).catch(o)}))}function Uo(e){return`{bbox-${(e?e.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function Vo(e,t,r){const n=new ee.default;return Hn(e,t,r).then((function({tileJson:t,tileLoadFunction:o}){const i=new Q.default({interpolate:void 0===r.interpolate||r.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:t});i.tileGrid=Po(e,t,r).tileGrid,r.projection&&(i.projection=E.get(r.projection));const a=i.getTileUrlFunction();o&&i.setTileLoadFunction(o),i.setTileUrlFunction((function(e,t,r){const n=Uo(r);let o=a(e,t,r);if(-1!=o.indexOf(n)){const t=i.getTileGrid().getTileCoordExtent(e);o=o.replace(n,t.toString())}return o})),i.set("mapbox-source",e),n.setSource(i)})).catch((function(e){n.setSource(void 0)})),n}function Go(e,t,r){const n=r.projection?new G.default({dataProjection:r.projection}):new G.default,o=e.data,i={};if("string"==typeof o){const i=In(o,r.accessToken,r.accessTokenParam||"access_token",t||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(i)){const t=(e,t,r)=>{const n=Uo(r);return i.replace(n,`${e.join(",")}`)},o=new re.default({attributions:e.attribution,format:n,loader:(e,n,i,a,s)=>{Zn("GeoJSON","function"==typeof t?t(e,n,i):t,r).then((e=>{const t=o.getFormat().readFeatures(e,{featureProjection:i});o.addFeatures(t),a(t)})).catch((t=>{o.removeLoadedExtent(e),s()}))},strategy:$.bbox});return o.set("mapbox-source",e),o}const a=new re.default({attributions:e.attribution,format:n,url:i,loader:(e,t,n,o,s)=>{Zn("GeoJSON",i,r).then((e=>{const t=a.getFormat().readFeatures(e,{featureProjection:n});a.addFeatures(t),o(t)})).catch((t=>{a.removeLoadedExtent(e),s()}))}});return a}i.features=n.readFeatures(o,{featureProjection:E.getUserProjection()||"EPSG:3857"});const a=new re.default(Object.assign({attributions:e.attribution,format:n},i));return a.set("mapbox-source",e),a}function Jo(e,t,r){let n=null;return function(o){e.paint&&"raster-opacity"in e.paint&&o.frameState.viewState.zoom!==n&&(n=o.frameState.viewState.zoom,delete r[e.id],function(e,t,r,n){const o=wo(e,"paint","raster-opacity",r,Fo,n);t.setOpacity(o)}(e,t,n,r))}}function Wo(e,t,r,n){const o=Dn(e),i=e.layers,a=r.type,s=r.source||Oo(i,r.ref),l=e.sources[s];let u;if("background"==a)u=Do(r,n,o);else if("vector"==l.type)u=function(e,t,r){const n=new ne.default({declutter:!0,visible:!1});return No(e,t,r).then((function(t){t.set("mapbox-source",e),n.setSource(t)})).catch((function(e){n.setSource(void 0)})),n}(l,t,n);else if("raster"==l.type)u=Vo(l,t,n),u.setVisible(!r.layout||"none"!==r.layout.visibility),u.on("prerender",Jo(r,u,o));else if("geojson"==l.type)u=function(e,t,r){return new te.default({declutter:!0,source:Go(e,t,r),visible:!1})}(l,t,n);else if("raster-dem"==l.type&&"hillshade"==r.type){const e=function(e,t,r){const n=Vo(e,t,r);return new J.default({source:new H.default({operationType:"image",operation:_o,sources:[n]})})}(l,t,n);u=e,e.getSource().on("beforeoperations",(function(e){const t=e.data;t.resolution=e.resolution;const i=Jn(e.resolution,n.resolutions||Vn);t.encoding=l.encoding,t.vert=5*wo(r,"paint","hillshade-exaggeration",i,Fo,o),t.sunAz=wo(r,"paint","hillshade-illumination-direction",i,Fo,o),t.sunEl=35,t.opacity=.3,t.highlightColor=wo(r,"paint","hillshade-highlight-color",i,Fo,o),t.shadowColor=wo(r,"paint","hillshade-shadow-color",i,Fo,o),t.accentColor=wo(r,"paint","hillshade-accent-color",i,Fo,o)})),u.setVisible(!r.layout||"none"!==r.layout.visibility)}const p=s;return u&&u.set("mapbox-source",p),u}function Zo(e,t,r,n){const o=[];let i=null;if(t instanceof X.default){if(i=t.getView(),!i.isDef()&&!i.getRotation()&&!i.getResolutions()){const e=n.projection?E.get(n.projection):i.getProjection();i=new ie.default(Object.assign(i.getProperties(),{maxResolution:Vn[0]/E.METERS_PER_UNIT[e.getUnits()],projection:n.projection||i.getProjection()})),t.setView(i)}"center"in e&&!i.getCenter()&&i.setCenter(E.fromLonLat(e.center,i.getProjection())),"zoom"in e&&void 0===i.getZoom()&&i.setResolution(Vn[0]/E.METERS_PER_UNIT[i.getProjection().getUnits()]/Math.pow(2,e.zoom)),i.getCenter()&&void 0!==i.getZoom()||i.fit(i.getProjection().getExtent(),{nearest:!0,size:t.getSize()})}t.set("mapbox-style",e),t.set("mapbox-metadata",{styleUrl:r,options:n});const a=e.layers;let s,l,u,p=[];for(let i=0,c=a.length;i0||r>0)&&e.setMaxResolution(Math.min(Vn[a],t.getResolution(r))+1e-9),s<24&&e.setMinResolution(Vn[s]+1e-9)}}else a>0&&e.setMaxResolution(Vn[a]+1e-9);p instanceof re.default||p instanceof oe.default?Io(e,r,t,Object.assign({styleUrl:n},i)).then((function(){!function(e,t){function r(){const r=t.get("mapbox-style");if(!r)return;const n=jn(r.layers),o=e.get("mapbox-layers"),i=n.filter((function(e){return o.includes(e.id)})).some((function(e){return!e.layout||!e.layout.visibility||"visible"===e.layout.visibility}));e.get("visible")!==i&&e.setVisible(i)}e.on("change",r),r()}(e,o),l()})).catch(u):l()}else u(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t);const c=o.getLayers();-1===c.getArray().indexOf(e)&&c.push(e),e.getSource()?p():e.once("change:source",p)}))}function Ho(e,t){return e.get("mapbox-style").layers.find((function(e){return e.id===t}))}function Yo(e,t){const r=e.getLayers().getArray();for(let e=0,n=r.length;e{r.setState("ready")})).catch((e=>{this.dispatchEvent(new Qo(e));this.getSource().setState("error")}))}}e.MapboxVectorLayer=ei,e.addMapboxLayer=function(e,t,r){const n=e.get("mapbox-style"),o=n.layers;let i,a,s=-1;if(void 0!==r){const t=Ho(e,r);if(void 0===t)throw new Error(`Layer with id "${r}" not found.`);i=o.indexOf(t)}else i=o.length;if(i>0&&o[i-1].source===t.source?(s=i-1,a=-1):ie.id===t.id)))throw new Error(`Layer with id "${t.id}" already exists.`);const l=o[s].id,u=Eo[Rn(e.get("mapbox-style"),Yo(e,l))];if(o.splice(i,0,t),u){const[e,r,n,o,i,s,p,c]=u;if(Array.isArray(n)){const e=n.indexOf(l)+a;n.splice(e,0,t.id)}$o(e,r,n,o,i,s,p,c)}else Yo(e,o[s].id).changed();return Promise.resolve()},e.apply=Bo,e.applyBackground=Lo,e.applyStyle=Io,e.default=Bo,e.getFeatureState=function(e,t){const r="getLayers"in e?Ko(e,t.source):[e];for(let e=0,n=r.length;ee.id===r)),1);const s=Eo[Rn(i,n)];if(s){const[e,t,n,o,i,a,l,u]=s;Array.isArray(n)&&n.splice(n.findIndex((e=>e===r)),1),$o(e,t,n,o,i,a,l,u)}else Yo(e,r).changed()},e.renderTransparent=function(e){e!==So&&(!function(){for(const e in Fn)delete Fn[e]}(),So=e)},e.setFeatureState=function(e,t,r){const n="getLayers"in e?Ko(e,t.source):[e];for(let e=0,o=n.length;e, 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/\nvar 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\nfunction clamp_css_byte(i) { // 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\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction 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) return kCSSColorTable[str].slice(); // 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)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 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)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), 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) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\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),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n /**\n * Returns an RGBA array of values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 255].\n */\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n\n /**\n * Returns a RGBA array of float values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r / a,\n g / a,\n b / a,\n a\n ];\n }\n\n /**\n * Returns an RGBA array of values representing the color, premultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01PremultipliedAlpha(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return [\n r,\n g,\n b,\n a\n ];\n }\n}\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);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\nimport assert from 'assert';\n\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {ExpressionSpecification} from '../types.js';\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport default function convertFunction(parameters: any, propertySpec: StylePropertySpecification): ExpressionSpecification {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((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\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}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : get;\n } else if (propertySpec.type === 'enum') {\n return [\n 'match',\n get,\n Object.keys(propertySpec.values),\n get,\n parameters.default\n ];\n } else {\n const 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}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n 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\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string): string | ExpressionSpecification {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\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\n return result;\n}\n\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>): Scope {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (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 (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array): boolean {\n return allowedTypes.some(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 === 'object';\n } else {\n return t === typeof provided;\n }\n });\n}\n","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\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, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n // combine characters so that diacritic marks are not separate code points\n this.text = text.normalize ? text.normalize() : text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array;\n\n constructor(sections: Array) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array {\n const serialized: Array = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\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\"]: Array).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const 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\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\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 (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\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 const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const 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\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value): string {\n const type = 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\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value} from '../values.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Literal {\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 const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate(): Value {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON(): string {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\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\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const 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\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const 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(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array;\n\n constructor(sections: Array) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const firstArg = args[1];\n if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n return context.error(`First argument must be an image or text section.`);\n }\n\n const sections: Array = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const 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({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext): Formatted {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\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 }\n\n outputDefined(): boolean {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const 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}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext): null | ResolvedImage {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): null | boolean | number | string | Color | Formatted | ResolvedImage {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\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]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\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 let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array;\n canonical: null | CanonicalTileID;\n featureTileCoord: ?Point;\n featureDistanceData: ?FeatureDistanceData;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n this.featureTileCoord = null;\n this.featureDistanceData = null;\n }\n\n id(): number | null {\n return this.feature && this.feature.id !== undefined ? this.feature.id : null;\n }\n\n geometryType(): null | string {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry(): ?Array> {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID(): null | CanonicalTileID {\n return this.canonical;\n }\n\n properties(): {[string]: any} {\n return (this.feature && this.feature.properties) || {};\n }\n\n distanceFromCenter(): number {\n if (this.featureTileCoord && this.featureDistanceData) {\n\n const c = this.featureDistanceData.center;\n const scale = this.featureDistanceData.scale;\n const {x, y} = this.featureTileCoord;\n\n // Calculate the distance vector `d` (left handed)\n const dX = x * scale - c[0];\n const dY = y * scale - c[1];\n\n // The bearing vector `b` (left handed)\n const bX = this.featureDistanceData.bearing[0];\n const bY = this.featureDistanceData.bearing[1];\n\n // Distance is calculated as `dot(d, v)`\n const dist = (bX * dX + bY * dY);\n return dist;\n }\n\n return 0;\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array | Varargs;\ntype Evaluate = (EvaluationContext, Array) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext): Value {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const 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\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const 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 // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\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\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext): Collator {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined(): boolean {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: [number, number]) {\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}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\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}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let 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}\n\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox: BBox, canonical: CanonicalTileID) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical: CanonicalTileID) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let 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}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n if (!geometry) return tilePoints;\n for (const points of geometry) {\n for (const point of points) {\n const 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}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n if (!geometry) return tileLines;\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const 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 (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Within {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const 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 const type = geojson.geometry.type;\n if (type === 'Polygon' || type === '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 }\n\n evaluate(ctx: EvaluationContext): boolean {\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 }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression): boolean {\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 (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression): boolean {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array): boolean {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Var {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const 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\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array;\n key: string;\n scope: Scope;\n errors: Array;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\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\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\n const op = expr[0];\n if (typeof op !== 'string') {\n this.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\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\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const 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\n return parsed;\n }\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 === 'object') {\n return this.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n } else {\n return this.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>): ParsingContext {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: 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 // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\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\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script', 'pitch', 'distance-from-center']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array, input: number): number {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\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\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Step {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"step\", this.input.serialize()];\n for (let 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\nexport default Step;\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\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = 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') epsilon = 1e-6;\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) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\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) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\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","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number): number {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number): Color {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array, to: Array, t: number): Array {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\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;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const 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.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let 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(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number): LABColor {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const 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,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number): HCLColor {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\nimport Color from '../../util/color.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number): number {\n let 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 const c = interpolation.controlPoints;\n const 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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Interpolate {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => 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\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\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\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): Color {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n let 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\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Coalesce {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n let result = null;\n let argCount = 0;\n let firstImage;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n // set to first image\n if (!firstImage) {\n firstImage = result;\n }\n result = null;\n // if we reach the end, return the first image\n if (argCount === this.args.length) {\n return firstImage;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Let {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined(): boolean {\n return this.result.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?At {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext): Value {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?In {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) 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\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (haystack == null) 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\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\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?IndexOf {\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\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\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\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\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\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\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const 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}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array, otherwise: Expression) {\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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Match {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\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\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Case {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Slice {\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\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) 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\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\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\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const 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}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression, ExpressionRegistration} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx: EvaluationContext, a: any, b: any): boolean { return a === b; }\nfunction neq(ctx: EvaluationContext, a: any, b: any): boolean { return a !== b; }\nfunction lt(ctx: EvaluationContext, a: any, b: any): boolean { return a < b; }\nfunction gt(ctx: EvaluationContext, a: any, b: any): boolean { return a > b; }\nfunction lteq(ctx: EvaluationContext, a: any, b: any): boolean { return a <= b; }\nfunction gteq(ctx: EvaluationContext, a: any, b: any): boolean { return a >= b; }\n\nfunction eqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic: (EvaluationContext, any, any) => boolean, compareWithCollator: (EvaluationContext, any, any, any) => boolean): ExpressionRegistration {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\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\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\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\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals: $Call = makeComparison('==', eq, eqCollate);\nexport const NotEquals: $Call = makeComparison('<', lt, ltCollate);\nexport const GreaterThan: $Call', typeof gt, typeof gtCollate> = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual: $Call=', typeof gteq, typeof gteqCollate> = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n NumberFormat: Class\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent' | 'unit';\n currency?: null | string;\n unit?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n unit: Expression | null; // Simple units sanctioned for use in ECMAScript, required if style=unit. https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n unit: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.unit = unit;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let unit = null;\n if (options['unit']) {\n unit = context.parse(options['unit'], 1, StringType);\n if (!unit) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext): string {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style:\n (this.currency && \"currency\") ||\n (this.unit && \"unit\") ||\n \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n unit: this.unit ? this.unit.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 }\n\n eachChild(fn: (_: Expression) => void) {\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.unit) {\n fn(this.unit);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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.unit) {\n options['unit'] = this.unit.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}\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Length {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) 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 }\n\n evaluate(ctx: EvaluationContext): any | number {\n const 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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n // special forms\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};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'pitch': [\n NumberType,\n [],\n (ctx) => ctx.globals.pitch || 0\n ],\n 'distance-from-center': [\n NumberType,\n [],\n (ctx) => ctx.distanceFromCenter()\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }\n ],\n 'upcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success(value: T): Result {\n return {result: 'success', value};\n}\n\nexport function error(value: E): Result {\n return {result: 'error', value};\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], Color.parse(stop[1])];\n });\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\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let 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\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n 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[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const 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}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\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}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'LineString' | 'Polygon',\n +id?: number | null,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: string},\n +geometry?: Array>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n pitch?: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\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 }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\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(v => JSON.stringify(v)).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 }\n}\n\nexport function isExpression(expression: mixed): boolean {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression {\n kind: Kind;\n zoomStops: Array;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom', 'pitch', 'distance-from-center']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const 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\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction {\n _parameters: PropertyValueSpecification;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array;\n\n constructor(parameters: PropertyValueSpecification, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification}): StylePropertyFunction {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n }\n\n static serialize(input: StylePropertyFunction): {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification} {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression(value: PropertyValueSpecification, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const 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\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\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","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed): mixed {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\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 const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","{\n \"$version\": 8,\n \"$root\": {\n \"version\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": [\n 8\n ],\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\": [\n -73.9749,\n 40.7736\n ]\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 \"terrain\": {\n \"type\": \"terrain\",\n \"doc\": \"A global modifier that elevates layers and markers based on a DEM data source.\"\n },\n \"fog\": {\n \"type\": \"fog\",\n \"doc\": \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0.\"\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 \"projection\": {\n \"type\": \"projection\",\n \"doc\": \"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.\",\n \"example\": {\n \"name\": \"albers\",\n \"center\": [-154, 50],\n \"parallels\": [55, 65]\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 {\n \"id\": \"water\",\n \"source\": \"mapbox-streets\",\n \"source-layer\": \"water\",\n \"type\": \"fill\",\n \"paint\": {\n \"fill-color\": \"#00ffff\"\n }\n }\n ]\n }\n },\n \"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 },\n \"source\": [\n \"source_vector\",\n \"source_raster\",\n \"source_raster_dem\",\n \"source_geojson\",\n \"source_video\",\n \"source_image\"\n ],\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id\"\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 },\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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 },\n \"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\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\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 },\n \"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 },\n \"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 },\n \"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 },\n \"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 \"sky\": {\n \"doc\": \"A spherical dome around the map that is always rendered behind all other layers.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.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\": \"An 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. The `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions are supported only for filter expressions on the symbol layer.\"\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 },\n \"layout\": [\n \"layout_fill\",\n \"layout_line\",\n \"layout_circle\",\n \"layout_heatmap\",\n \"layout_fill-extrusion\",\n \"layout_symbol\",\n \"layout_raster\",\n \"layout_hillshade\",\n \"layout_background\",\n \"layout_sky\"\n ],\n \"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 },\n \"layout_sky\": {\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\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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 },\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 \"fill-extrusion-edge-radius\": {\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"v2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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 \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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 {\n \"line-join\": \"miter\"\n }\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\": [\n \"zoom\"\n ]\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 {\n \"line-join\": \"round\"\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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 },\n \"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\": [\n \"zoom\"\n ]\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 {\n \"symbol-placement\": \"line\"\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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 \"`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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\",\n \"text-field\"\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 \"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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-text-fit-padding\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n 0,\n 0,\n 0,\n 0\n ],\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\": [\n \"icon-image\",\n \"text-field\",\n {\n \"icon-text-fit\": [\n \"both\",\n \"width\",\n \"height\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n {\n \"icon-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\n ],\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"icon-image\"\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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 \"`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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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 \"`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\": [\n \"zoom\"\n ]\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. SDF images are not supported in formatted text and will be ignored.\",\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-font\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"default\": [\n \"Open Sans Regular\",\n \"Arial Unicode MS Regular\"\n ],\n \"doc\": \"Font stack to use for displaying text.\",\n \"requires\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": \"2.3.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-letter-spacing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"ems\",\n \"doc\": \"Text tracking amount.\",\n \"requires\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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 \"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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\n ],\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n {\n \"!\": \"text-variable-anchor\"\n }\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\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 would be laid out horizontally.\"\n },\n \"vertical\": {\n \"doc\": \"If a text's language supports vertical writing mode, symbols 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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.\",\n \"requires\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n {\n \"text-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n 0,\n 0\n ],\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-radial-offset\"\n }\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\": [\n \"zoom\",\n \"feature\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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 },\n \"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 },\n \"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 },\n \"filter\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"doc\": \"A filter selects specific features from a layer.\"\n },\n \"filter_symbol\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\", \"pitch\", \"distance-from-center\"]\n }\n },\n \"filter_fill\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_line\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_circle\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_fill-extrusion\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_heatmap\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"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 },\n \"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 },\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\": {\n \"type\": \"array\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"value\": [\n \"number\",\n \"color\"\n ],\n \"length\": 2,\n \"doc\": \"Zoom level and value pair.\"\n },\n \"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 },\n \"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. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).\",\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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.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 for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf 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 valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.\",\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 a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-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 \"android\" : \"8.4.0\",\n \"ios\": \"5.4.0\",\n \"macos\": \"0.15.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`](#types-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`](#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. If the input is an [`'image'`](#types-image) expression, `'to-string'` returns the image name. 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\": \"Returns 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\": \"Returns 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 \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"geometry-type\": {\n \"doc\": \"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.\",\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\": \"Returns 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\": \"Returns 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\": \"Camera\",\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 \"pitch\": {\n \"doc\": \"Returns the current pitch in degrees. `[\\\"pitch\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"distance-from-center\": {\n \"doc\": \"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\\"distance-from-center\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"heatmap-density\": {\n \"doc\": \"Returns 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\": \"Returns 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 \"sky-radial-progress\": {\n \"doc\": \"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n \"group\": \"sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"accumulated\": {\n \"doc\": \"Returns 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 \"android\": \"8.4.0\",\n \"ios\": \"5.5.0\",\n \"macos\": \"0.15.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 \"ios\": \"4.1.0\",\n \"macos\": \"0.8.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 },\n \"fog\": {\n \"range\": {\n \"type\": \"array\",\n \"default\": [\n 0.5,\n 10\n ],\n \"minimum\": -20,\n \"maximum\": 20,\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n \"example\": [\n 0.5,\n 10\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"high-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#245cdf\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"space-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n \"#010b19\",\n 7,\n \"#367ab9\"\n ],\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"horizon-blend\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n 0.2,\n 7,\n 0.1\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"star-intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 5,\n 0.35,\n 6,\n 0\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n 1.15,\n 210,\n 30\n ],\n \"length\": 3,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\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\": [\n 1.5,\n 90,\n 80\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 }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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 },\n \"projection\": {\n \"name\": {\n \"type\": \"enum\",\n \"values\": {\n \"albers\": {\n \"doc\": \"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"equalEarth\": {\n \"doc\": \"An Equal Earth projection.\"\n },\n \"equirectangular\": {\n \"doc\": \"An Equirectangular projection. This projection is very similar to the Plate Carrée projection.\"\n },\n \"lambertConformalConic\": {\n \"doc\": \"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"mercator\": {\n \"doc\": \"The Mercator projection is the default projection.\"\n },\n \"naturalEarth\": {\n \"doc\": \"A Natural Earth projection.\"\n },\n \"winkelTripel\": {\n \"doc\": \"A Winkel Tripel projection.\"\n },\n \"globe\": {\n \"doc\": \"A globe projection.\"\n }\n },\n \"default\": \"mercator\",\n \"doc\": \"The name of the projection to be used for rendering the map.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"center\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-180, -90],\n \"maximum\": [180, 90],\n \"transition\": false,\n \"doc\": \"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].\",\n \"example\": [\n -96,\n 37.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"parallels\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-90, -90],\n \"maximum\": [90, 90],\n \"transition\": false,\n \"doc\": \"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).\",\n \"example\": [\n 29.5,\n 45.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n }\n },\n \"terrain\" : {\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"exaggeration\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 1.0,\n \"minimum\": 0,\n \"maximum\": 1000,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n \"requires\": [\n \"source\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"paint\": [\n \"paint_fill\",\n \"paint_line\",\n \"paint_circle\",\n \"paint_heatmap\",\n \"paint_fill-extrusion\",\n \"paint_symbol\",\n \"paint_raster\",\n \"paint_hillshade\",\n \"paint_background\",\n \"paint_sky\"\n ],\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"fill-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"fill-pattern\"\n },\n {\n \"fill-antialias\": true\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"fill-translate\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\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\": [\n \"zoom\"\n ]\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 {\n \"!\": \"fill-extrusion-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"fill-extrusion-translate\"\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 },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"fill-extrusion-height\"\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 \"android\": \"7.0.0\",\n \"ios\": \"4.7.0\",\n \"macos\": \"0.13.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-ambient-occlusion-intensity\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0.0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n },\n \"fill-extrusion-ambient-occlusion-radius\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 3.0,\n \"minimum\": 0,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.\",\n \"requires\": [\n \"fill-extrusion-edge-radius\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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 {\n \"!\": \"line-pattern\"\n }\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"line-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": false,\n \"units\": \"line widths\",\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\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\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"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 {\n \"!\": \"line-pattern\"\n },\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\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\": [\n \"line-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"line-trim-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"doc\": \"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].\",\n \"length\": 2,\n \"default\": [0.0, 0.0],\n \"minimum\": [0.0, 0.0],\n \"maximum\": [1.0, 1.0],\n \"transition\": false,\n \"requires\": [\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.5.0\",\n \"ios\": \"10.5.0\",\n \"macos\": \"10.5.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"zoom\"\n ]\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\": [\n \"circle-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"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. `queryRenderedFeatures` on heatmap layers will return points within this radius.\",\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"heatmap-color\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"heatmap-density\"\n ],\n 0,\n \"rgba(0, 0, 255, 0)\",\n 0.1,\n \"royalblue\",\n 0.3,\n \"cyan\",\n 0.5,\n \"lime\",\n 0.7,\n \"yellow\",\n 1,\n \"red\"\n ],\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\": [\n \"heatmap-density\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"icon-image\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"icon-image\"\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\": [\n \"zoom\"\n ]\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\": [\n \"icon-image\",\n \"icon-translate\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\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\": [\n \"text-field\"\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.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\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\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\": [\n \"text-field\"\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\": [\n \"zoom\"\n ]\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\": [\n \"text-field\",\n \"text-translate\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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 {\n \"!\": \"background-pattern\"\n }\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\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 },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\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\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_sky\": {\n \"sky-type\": {\n \"type\": \"enum\",\n \"values\": {\n \"gradient\": {\n \"doc\": \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n },\n \"atmosphere\": {\n \"doc\": \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n }\n },\n \"default\": \"atmosphere\",\n \"doc\": \"The type of the sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun-intensity\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"default\": 10,\n \"minimum\": 0,\n \"maximum\": 100,\n \"transition\": false,\n \"doc\": \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-center\": {\n \"type\": \"array\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"value\": \"number\",\n \"default\": [\n 0,\n 0\n ],\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-radius\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"default\": 90,\n \"minimum\": 0,\n \"maximum\": 180,\n \"transition\": false,\n \"doc\": \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"sky-radial-progress\"\n ],\n 0.8,\n \"#87ceeb\",\n 1,\n \"white\"\n ],\n \"doc\": \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"sky-radial-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"sky-atmosphere-halo-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity of the entire sky layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"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 },\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 \"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\": {\n \"*\": {\n \"type\": \"string\",\n \"doc\": \"A name of a feature property to use as ID for feature state.\"\n }\n }\n}\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport {isFeatureConstant} from '../expression/is_constant.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport latest from '../reference/latest.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type Point from '@mapbox/point-geometry';\n\nexport type FeatureDistanceData = {bearing: [number, number], center: [number, number], scale: number};\nexport type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => boolean;\nexport type FeatureFilter = {filter: FilterExpression, dynamicFilter?: FilterExpression, needGeometry: boolean, needFeature: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter, isDynamicFilter, extractStaticFilter};\n\nfunction isExpressionFilter(filter: any): boolean {\n if (filter === true || filter === false) {\n return true;\n }\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\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\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\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @param {string} layerType the type of the layer this filter will be applied to.\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any, layerType?: string = 'fill'): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false, needFeature: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n const filterExp = ((filter: any): string[] | string | boolean);\n\n let staticFilter = true;\n try {\n staticFilter = extractStaticFilter(filterExp);\n } catch (e) {\n console.warn(\n`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(filterExp, null, 2)}\n `);\n }\n\n // Compile the static component of the filter\n const filterSpec = latest[`filter_${layerType}`];\n const compiledStaticFilter = createExpression(staticFilter, filterSpec);\n\n let filterFunc = null;\n if (compiledStaticFilter.result === 'error') {\n throw new Error(compiledStaticFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n filterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical);\n }\n\n // If the static component is not equal to the entire filter then we have a dynamic component\n // Compile the dynamic component separately\n let dynamicFilterFunc = null;\n let needFeature = null;\n if (staticFilter !== filterExp) {\n const compiledDynamicFilter = createExpression(filterExp, filterSpec);\n\n if (compiledDynamicFilter.result === 'error') {\n throw new Error(compiledDynamicFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n dynamicFilterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData);\n needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression);\n }\n }\n\n filterFunc = ((filterFunc: any): FilterExpression);\n const needGeometry = geometryNeeded(staticFilter);\n\n return {\n filter: filterFunc,\n dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined,\n needGeometry,\n needFeature: !!needFeature\n };\n}\n\nfunction extractStaticFilter(filter: any): any {\n if (!isDynamicFilter(filter)) {\n return filter;\n }\n\n // Shallow copy so we can replace expressions in-place\n let result = deepUnbundle(filter);\n\n // 1. Union branches\n unionDynamicBranches(result);\n\n // 2. Collapse dynamic conditions to `true`\n result = collapseDynamicBooleanExpressions(result);\n\n return result;\n}\n\nfunction collapseDynamicBooleanExpressions(expression: any): any {\n if (!Array.isArray(expression)) {\n return expression;\n }\n\n const collapsed = collapsedExpression(expression);\n if (collapsed === true) {\n return collapsed;\n } else {\n return collapsed.map((subExpression) => collapseDynamicBooleanExpressions(subExpression));\n }\n}\n\n/**\n * Traverses the expression and replaces all instances of branching on a\n * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`)\n * into an `any` expression.\n * This ensures that all possible outcomes of a `dynamic` branch are considered\n * when evaluating the expression upfront during filtering.\n *\n * @param {Array} filter the filter expression mutated in-place.\n */\nfunction unionDynamicBranches(filter: any) {\n let isBranchingDynamically = false;\n const branches = [];\n\n if (filter[0] === 'case') {\n for (let i = 1; i < filter.length - 1; i += 2) {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]);\n branches.push(filter[i + 1]);\n }\n\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'match') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 2; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'step') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 1; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n }\n\n if (isBranchingDynamically) {\n filter.length = 0;\n filter.push('any', ...branches);\n }\n\n // traverse and recurse into children\n for (let i = 1; i < filter.length; i++) {\n unionDynamicBranches(filter[i]);\n }\n}\n\nfunction isDynamicFilter(filter: any): boolean {\n // Base Cases\n if (!Array.isArray(filter)) {\n return false;\n }\n if (isRootExpressionDynamic(filter[0])) {\n return true;\n }\n\n for (let i = 1; i < filter.length; i++) {\n const child = filter[i];\n if (isDynamicFilter(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isRootExpressionDynamic(expression: string): boolean {\n return expression === 'pitch' ||\n expression === 'distance-from-center';\n}\n\nconst dynamicConditionExpressions = new Set([\n 'in',\n '==',\n '!=',\n '>',\n '>=',\n '<',\n '<=',\n 'to-boolean'\n]);\n\nfunction collapsedExpression(expression: any): any {\n if (dynamicConditionExpressions.has(expression[0])) {\n\n for (let i = 1; i < expression.length; i++) {\n const param = expression[i];\n if (isDynamicFilter(param)) {\n return true;\n }\n }\n }\n return expression;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\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}\n\nfunction convertDisjunctionOp(filters: Array>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array) {\n if (values.length === 0) { return false; }\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(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\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}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","// @flow\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// @flow\n\nimport refProperties from './util/ref_properties.js';\n\nimport type {LayerSpecification} from './types.js';\n\nfunction deref(layer: LayerSpecification, parent: LayerSpecification): LayerSpecification {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = (parent: any)[k];\n }\n });\n\n return ((result: any): LayerSpecification);\n}\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nexport default function derefLayers(layers: Array): Array {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[(layers[i]: any).ref]);\n }\n }\n\n return layers;\n}\n","var 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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp)\n .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","const mapboxBaseUrl = 'https://api.mapbox.com';\n\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n const startsWith = 'mapbox://';\n if (url.indexOf(startsWith) !== 0) {\n return '';\n }\n return url.slice(startsWith.length);\n}\n\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @param {string} styleUrl The style URL.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token, styleUrl) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, styleUrl).href);\n }\n const startsWith = 'sprites/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected sprites url: ${url}`);\n }\n const sprite = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, location.href).href);\n }\n const startsWith = 'styles/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected style url: ${url}`);\n }\n const style = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @param {string} tokenParam The access token key.\n * @param {string} styleUrl The style URL.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token, tokenParam, styleUrl) {\n const urlObject = new URL(url, styleUrl);\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n if (!token) {\n return decodeURI(urlObject.href);\n }\n urlObject.searchParams.set(tokenParam, token);\n return decodeURI(urlObject.href);\n }\n\n if (mapboxPath === 'mapbox.satellite') {\n const sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : '';\n return `https://api.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}${sizeFactor}.webp?access_token=${token}`;\n }\n return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n","import TileState from 'ol/TileState.js';\nimport {VectorTile} from 'ol';\nimport {expandUrl} from 'ol/tileurlfunction.js';\nimport {getUid} from 'ol/util.js';\nimport {normalizeSourceUrl, normalizeStyleUrl} from './mapbox.js';\n\n/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */\n\n/** @typedef {import(\"ol\").Map} Map */\n/** @typedef {import(\"ol/layer\").Layer} Layer */\n/** @typedef {import(\"ol/layer\").Group} LayerGroup */\n/** @typedef {import(\"ol/layer\").Vector} VectorLayer */\n/** @typedef {import(\"ol/layer\").VectorTile} VectorTileLayer */\n/** @typedef {import(\"ol/source\").Source} Source */\n\nconst functionCacheByStyleId = {};\nconst filterCacheByStyleId = {};\n\nlet styleId = 0;\nexport function getStyleId(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n return glStyle.id;\n}\n\nexport function getStyleFunctionKey(glStyle, olLayer) {\n return getStyleId(glStyle) + '.' + getUid(olLayer);\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Function cache.\n */\nexport function getFunctionCache(glStyle) {\n let functionCache = functionCacheByStyleId[glStyle.id];\n if (!functionCache) {\n functionCache = {};\n functionCacheByStyleId[getStyleId(glStyle)] = functionCache;\n }\n return functionCache;\n}\n\nexport function clearFunctionCache() {\n for (const key in functionCacheByStyleId) {\n delete functionCacheByStyleId[key];\n }\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Filter cache.\n */\nexport function getFilterCache(glStyle) {\n let filterCache = filterCacheByStyleId[glStyle.id];\n if (!filterCache) {\n filterCache = {};\n filterCacheByStyleId[getStyleId(glStyle)] = filterCache;\n }\n return filterCache;\n}\n\nexport function deg2rad(degrees) {\n return (degrees * Math.PI) / 180;\n}\n\nexport const defaultResolutions = (function () {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\n\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n return /** @type {?} */ (new OffscreenCanvas(width, height));\n }\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst pendingRequests = {};\n/**\n * @param {ResourceType} resourceType Type of resource to load.\n * @param {string} url Url of the resource.\n * @param {Options} [options={}] Options.\n * @param {{request?: Request}} [metadata] Object to be filled with the request.\n * @return {Promise} Promise that resolves with the loaded resource\n * or rejects with the Response object.\n * @private\n */\nexport function fetchResource(resourceType, url, options = {}, metadata) {\n if (url in pendingRequests) {\n if (metadata) {\n metadata.request = pendingRequests[url][0];\n }\n return pendingRequests[url][1];\n }\n let transformedRequest = options.transformRequest\n ? options.transformRequest(url, resourceType) || url\n : url;\n if (!(transformedRequest instanceof Request)) {\n transformedRequest = new Request(transformedRequest);\n }\n if (!transformedRequest.headers.get('Accept')) {\n transformedRequest.headers.set('Accept', 'application/json');\n }\n if (metadata) {\n metadata.request = transformedRequest;\n }\n const pendingRequest = fetch(transformedRequest)\n .then(function (response) {\n delete pendingRequests[url];\n return response.ok\n ? response.json()\n : Promise.reject(new Error('Error fetching source ' + url));\n })\n .catch(function (error) {\n delete pendingRequests[url];\n return Promise.reject(new Error('Error fetching source ' + url));\n });\n pendingRequests[url] = [transformedRequest, pendingRequest];\n return pendingRequest;\n}\n\nexport function getGlStyle(glStyleOrUrl, options) {\n if (typeof glStyleOrUrl === 'string') {\n if (glStyleOrUrl.trim().startsWith('{')) {\n try {\n const glStyle = JSON.parse(glStyleOrUrl);\n return Promise.resolve(glStyle);\n } catch (error) {\n return Promise.reject(error);\n }\n } else {\n glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken);\n return fetchResource('Style', glStyleOrUrl, options);\n }\n } else {\n return Promise.resolve(glStyleOrUrl);\n }\n}\n\nconst tilejsonCache = {};\n/**\n * @param {Object} glSource glStyle source object.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise<{tileJson: Object, tileLoadFunction: import('ol/Tile.js').LoadFunction}?>} TileJson and load function\n */\nexport function getTileJson(glSource, styleUrl, options = {}) {\n const cacheKey = [styleUrl, JSON.stringify(glSource)].toString();\n let promise = tilejsonCache[cacheKey];\n if (!promise || options.transformRequest) {\n let tileLoadFunction;\n if (options.transformRequest) {\n tileLoadFunction = (tile, src) => {\n const transformedRequest = options.transformRequest\n ? options.transformRequest(src, 'Tiles') || src\n : src;\n if (tile instanceof VectorTile) {\n tile.setLoader((extent, resolution, projection) => {\n fetch(transformedRequest)\n .then((response) => response.arrayBuffer())\n .then((data) => {\n const format = tile.getFormat();\n const features = format.readFeatures(data, {\n extent: extent,\n featureProjection: projection,\n });\n // @ts-ignore\n tile.setFeatures(features);\n })\n .catch((e) => tile.setState(TileState.ERROR));\n });\n } else {\n const img = tile.getImage();\n if (transformedRequest instanceof Request) {\n fetch(transformedRequest)\n .then((response) => response.blob())\n .then((blob) => {\n const url = URL.createObjectURL(blob);\n img.addEventListener('load', () => URL.revokeObjectURL(url));\n img.addEventListener('error', () => URL.revokeObjectURL(url));\n img.src = url;\n })\n .catch((e) => tile.setState(TileState.ERROR));\n } else {\n img.src = transformedRequest;\n }\n }\n };\n }\n const url = glSource.url;\n if (url && !glSource.tiles) {\n const normalizedSourceUrl = normalizeSourceUrl(\n url,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (url.startsWith('mapbox://')) {\n promise = Promise.resolve({\n tileJson: Object.assign({}, glSource, {\n url: undefined,\n tiles: expandUrl(normalizedSourceUrl),\n }),\n tileLoadFunction,\n });\n } else {\n const metadata = {};\n promise = fetchResource(\n 'Source',\n normalizedSourceUrl,\n options,\n metadata\n ).then(function (tileJson) {\n tileJson.tiles = tileJson.tiles.map(function (tileUrl) {\n if (tileJson.scheme === 'tms') {\n tileUrl = tileUrl.replace('{y}', '{-y}');\n }\n return normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n metadata.request.url\n );\n });\n return Promise.resolve({tileJson, tileLoadFunction});\n });\n }\n } else {\n glSource = Object.assign({}, glSource, {\n tiles: glSource.tiles.map(function (tileUrl) {\n if (glSource.scheme === 'tms') {\n tileUrl = tileUrl.replace('{y}', '{-y}');\n }\n return normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n }),\n });\n promise = Promise.resolve({\n tileJson: Object.assign({}, glSource),\n tileLoadFunction,\n });\n }\n tilejsonCache[cacheKey] = promise;\n }\n return promise;\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} spriteImage Sprite image id.\n * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data.\n * @param {number} haloWidth Halo width.\n * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color.\n * @return {HTMLCanvasElement} Canvas element with the halo.\n */\nexport function drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n) {\n const imageCanvas = document.createElement('canvas');\n const imgSize = [\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width,\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height,\n ];\n imageCanvas.width = imgSize[0];\n imageCanvas.height = imgSize[1];\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n haloWidth * spriteImageData.pixelRatio,\n haloWidth * spriteImageData.pixelRatio,\n spriteImageData.width,\n spriteImageData.height\n );\n const imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]);\n imageContext.globalCompositeOperation = 'destination-over';\n imageContext.fillStyle = `rgba(${haloColor.r * 255},${haloColor.g * 255},${\n haloColor.b * 255\n },${haloColor.a})`;\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const alpha = data[index + 3];\n if (alpha > 0) {\n imageContext.arc(\n i,\n j,\n haloWidth * spriteImageData.pixelRatio,\n 0,\n 2 * Math.PI\n );\n }\n }\n }\n imageContext.fill();\n return imageCanvas;\n}\n\nfunction smoothstep(min, max, value) {\n const x = Math.max(0, Math.min(1, (value - min) / (max - min)));\n return x * x * (3 - 2 * x);\n}\n\n/**\n * @param {HTMLImageElement} image SDF image\n * @param {{x: number, y: number, width: number, height: number}} area Area to unSDF\n * @param {{r: number, g: number, b: number, a: number}} color Color to use\n * @return {HTMLCanvasElement} Regular image\n */\nexport function drawSDF(image, area, color) {\n const imageCanvas = document.createElement('canvas');\n imageCanvas.width = area.width;\n imageCanvas.height = area.height;\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n image,\n area.x,\n area.y,\n area.width,\n area.height,\n 0,\n 0,\n area.width,\n area.height\n );\n const imageData = imageContext.getImageData(0, 0, area.width, area.height);\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const dist = data[index + 3] / 255;\n\n const buffer = 0.75;\n const gamma = 0.1;\n\n const alpha = smoothstep(buffer - gamma, buffer + gamma, dist);\n if (alpha > 0) {\n data[index + 0] = Math.round(255 * color.r * alpha);\n data[index + 1] = Math.round(255 * color.g * alpha);\n data[index + 2] = Math.round(255 * color.b * alpha);\n data[index + 3] = Math.round(255 * alpha);\n } else {\n data[index + 3] = 0;\n }\n }\n }\n imageContext.putImageData(imageData, 0, 0);\n return imageCanvas;\n}\n\n/**\n * @typedef {import(\"./apply.js\").Options} Options\n * @private\n */\n","import mb2css from 'mapbox-to-css-font';\nimport {checkedFonts, registerFont} from 'ol/render/canvas.js';\nimport {createCanvas} from './util.js';\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(\n 0,\n Math.round(letterSpacing / 0.1)\n );\n for (let 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}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return (\n getMeasureContext().measureText(text).width +\n (text.length - 1) * letterSpacing\n );\n}\n\nconst measureCache = {};\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let 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 const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const 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 (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth =\n i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth =\n 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;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (\n measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6\n ) {\n const lineWords = line.split(' ');\n const 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\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const 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}\n\nconst processedFontFamilies = {};\n\n/**\n * @param {Array} fonts Fonts.\n * @param {string} [templateUrl] Template URL.\n * @return {Array} Processed fonts.\n * @private\n */\nexport function getFonts(\n fonts,\n templateUrl = 'https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css'\n) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return processedFontFamilies[fontsKey];\n }\n const fontDescriptions = [];\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial');\n const font = fonts[i];\n const cssFont = mb2css(font, 1);\n registerFont(cssFont);\n const parts = cssFont.split(' ');\n fontDescriptions.push([\n parts.slice(3).join(' ').replace(/\"/g, ''),\n parts[1],\n parts[0],\n ]);\n }\n for (let i = 0, ii = fontDescriptions.length; i < ii; ++i) {\n const fontDescription = fontDescriptions[i];\n const family = fontDescription[0];\n if (!hasFontFamily(family)) {\n if (\n checkedFonts.get(\n `${fontDescription[2]}\\n${fontDescription[1]} \\n${family}`\n ) !== 100\n ) {\n const fontUrl = templateUrl\n .replace('{font-family}', family.replace(/ /g, '-').toLowerCase())\n .replace('{Font+Family}', family.replace(/ /g, '+'))\n .replace('{fontweight}', fontDescription[1])\n .replace(\n '{-fontstyle}',\n fontDescription[2].replace('normal', '').replace(/(.+)/, '-$1')\n )\n .replace('{fontstyle}', fontDescription[2]);\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n }\n processedFontFamilies[fontsKey] = fonts;\n return fonts;\n}\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport convertFunction from '@mapbox/mapbox-gl-style-spec/function/convert.js';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter/index.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport mb2css from 'mapbox-to-css-font';\nimport spec from '@mapbox/mapbox-gl-style-spec/reference/v8.json';\nimport {applyLetterSpacing, wrapText} from './text.js';\nimport {\n clearFunctionCache,\n createCanvas,\n defaultResolutions,\n deg2rad,\n drawIconHalo,\n drawSDF,\n getFilterCache,\n getFunctionCache,\n getStyleFunctionKey,\n getZoomForResolution,\n} from './util.js';\nimport {\n createPropertyExpression,\n isExpression,\n} from '@mapbox/mapbox-gl-style-spec/expression/index.js';\nimport {isFunction} from '@mapbox/mapbox-gl-style-spec/function/index.js';\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 * @typedef {import('./util.js').ResourceType} ResourceType\n */\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3,\n};\nconst 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};\n\nconst expressionData = function (rawExpression, propertySpec) {\n const compiledExpression = createPropertyExpression(\n rawExpression,\n propertySpec\n );\n if (compiledExpression.result === 'error') {\n throw new Error(\n compiledExpression.value\n .map((err) => `${err.key}: ${err.message}`)\n .join(', ')\n );\n }\n return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\nlet renderFeatureCoordinates, renderFeature;\n\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 * @param {Object} [functionCache] Function cache.\n * @param {Object} [featureState] Feature state.\n * @return {?} Value.\n */\nexport function getValue(\n layer,\n layoutOrPaint,\n property,\n zoom,\n feature,\n functionCache,\n featureState\n) {\n const layerId = layer.id;\n if (!functionCache) {\n functionCache = {};\n console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console\n }\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = (layer[layoutOrPaint] || emptyObj)[property];\n const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n if (value === undefined) {\n value = propertySpec.default;\n }\n let isExpr = isExpression(value);\n if (!isExpr && isFunction(value)) {\n value = convertFunction(value, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n const compiledExpression = expressionData(value, propertySpec);\n functions[property] =\n compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value = Color.parse(value);\n }\n functions[property] = function () {\n return value;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature, featureState);\n}\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @param {Object} [functionCache] Function cache.\n * @return {\"declutter\"|\"obstacle\"|\"none\"} Value.\n */\nfunction getIconDeclutterMode(layer, zoom, feature, functionCache) {\n const allowOverlap = getValue(\n layer,\n 'layout',\n 'icon-allow-overlap',\n zoom,\n feature,\n functionCache\n );\n if (!allowOverlap) {\n return 'declutter';\n }\n const ignorePlacement = getValue(\n layer,\n 'layout',\n 'icon-ignore-placement',\n zoom,\n feature,\n functionCache\n );\n if (!ignorePlacement) {\n return 'obstacle';\n }\n return 'none';\n}\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @param {Object} [filterCache] Filter cache.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom, filterCache) {\n if (!filterCache) {\n console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console\n }\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n\nlet renderTransparentEnabled = false;\n\n/**\n * Configure whether features with a transparent style should be rendered. When\n * set to `true`, it will be possible to hit detect content that is not visible,\n * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or\n * `ol/Map#getFeaturesAtPixel()`\n * @param {boolean} enabled Rendering of transparent elements is enabled.\n * Default is `false`.\n */\nexport function renderTransparent(enabled) {\n if (enabled !== renderTransparentEnabled) {\n clearFunctionCache();\n renderTransparentEnabled = enabled;\n }\n}\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 (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) {\n return undefined;\n }\n const a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return a === 0\n ? 'transparent'\n : 'rgba(' +\n Math.round((color.r * 255) / a) +\n ',' +\n Math.round((color.g * 255) / a) +\n ',' +\n Math.round((color.b * 255) / a) +\n ',' +\n a * opacity +\n ')';\n }\n return color;\n}\n\nconst templateRegEx = /\\{[^{}}]*\\}/g;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n return text.replace(templateRegEx, function (match) {\n return properties[match.slice(1, -1)] || '';\n });\n}\n\nlet recordLayer = false;\n\n/**\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} record Recording of the style layer is on.\n */\nexport function recordStyleLayer(record = false) {\n recordLayer = record;\n}\n\nexport const styleFunctionArgs = {};\n\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} sourceOrLayers `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\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} spriteData 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 {string|Request} spriteImageUrl 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, string=):Array} getFonts Function that\n * receives a font stack and the url template from the GL style's `metadata['ol:webfonts']`\n * property (if set) 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 * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function can be used for icons not in the sprite or to override sprite icons.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport function stylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions = defaultResolutions,\n spriteData = undefined,\n spriteImageUrl = undefined,\n getFonts = undefined,\n getImage = undefined\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 styleFunctionArgs[getStyleFunctionKey(glStyle, olLayer)] =\n Array.from(arguments);\n\n let spriteImage, spriteImageSize;\n let spriteImageUnSDFed;\n\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n const img = new Image();\n let blobUrl;\n if (spriteImageUrl instanceof Request) {\n fetch(spriteImageUrl)\n .then((response) => response.blob())\n .then((blob) => {\n blobUrl = URL.createObjectURL(blob);\n img.src = blobUrl;\n })\n .catch(() => {});\n } else {\n img.crossOrigin = 'anonymous';\n img.src = spriteImageUrl;\n if (blobUrl) {\n URL.revokeObjectURL(blobUrl);\n }\n }\n img.onload = function () {\n spriteImage = img;\n spriteImageSize = [img.width, img.height];\n olLayer.changed();\n img.onload = null;\n };\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n const 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 (\n event.data.action === 'imageLoaded' &&\n event.data.src === spriteImageUrl\n ) {\n spriteImage = event.data.image;\n spriteImageSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n\n const iconImageCache = {};\n const patternCache = {};\n const functionCache = getFunctionCache(glStyle);\n const filterCache = getFilterCache(glStyle);\n\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n const layerId = layer.id;\n if (\n (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers) ||\n sourceOrLayers.indexOf(layerId) !== -1\n ) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n const source = glStyle.sources[mapboxSource];\n if (!source) {\n throw new Error(`Source \"${mapboxSource}\" is not defined`);\n }\n const type = source.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(\n `Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`\n );\n }\n } else if (layer.source !== mapboxSource) {\n throw new Error(\n `Layer \"${layerId}\" does not use source \"${mapboxSource}`\n );\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = [];\n layersBySourceLayer[sourceLayer] = layers;\n }\n layers.push({\n layer: layer,\n index: i,\n });\n mapboxLayers.push(layerId);\n }\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const styles = [];\n\n /**\n * @param {import(\"ol/Feature\").default|import(\"ol/render/Feature\").default} feature Feature.\n * @param {number} resolution Resolution.\n * @param {string} [onlyLayer] Calculate style for this layer only.\n * @return {Array} Style.\n */\n const styleFunction = function (feature, resolution, onlyLayer) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return undefined;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n id: feature.getId(),\n properties: properties,\n type: type,\n };\n const featureState = olLayer.get('mapbox-featurestate')[feature.getId()];\n let stylesLength = -1;\n let featureBelongsToLayer;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n if (onlyLayer !== undefined && onlyLayer !== layerId) {\n continue;\n }\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (\n layout.visibility === 'none' ||\n ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)\n ) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) {\n featureBelongsToLayer = layer;\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (\n type == 3 &&\n (layer.type == 'fill' || layer.type == 'fill-extrusion')\n ) {\n opacity = getValue(\n layer,\n 'paint',\n layer.type + '-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (layer.type + '-pattern' in paint) {\n const fillIcon = getValue(\n layer,\n 'paint',\n layer.type + '-pattern',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (fillIcon) {\n const icon =\n typeof fillIcon === 'string'\n ? fromTemplate(fillIcon, properties)\n : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getFill() ||\n style.getStroke() ||\n style.getText()\n ) {\n style = new Style({\n fill: new Fill(),\n });\n styles[stylesLength] = style;\n }\n fill = style.getFill();\n style.setZIndex(index);\n const icon_cache_key = icon + '.' + opacity;\n let pattern = patternCache[icon_cache_key];\n if (!pattern) {\n const spriteImageData = spriteData[icon];\n const canvas = createCanvas(\n spriteImageData.width,\n spriteImageData.height\n );\n const ctx = /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d')\n );\n ctx.globalAlpha = opacity;\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n if (layer.type + '-outline-color' in paint) {\n strokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-outline-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n if (color || strokeColor) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n (color && !style.getFill()) ||\n (!color && style.getFill()) ||\n (strokeColor && !style.getStroke()) ||\n (!strokeColor && style.getStroke()) ||\n style.getText()\n ) {\n style = new Style({\n fill: color ? new Fill() : undefined,\n stroke: strokeColor ? new Stroke() : undefined,\n });\n styles[stylesLength] = style;\n }\n if (color) {\n fill = style.getFill();\n fill.setColor(color);\n }\n if (strokeColor) {\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(0.5);\n }\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color =\n !('line-pattern' in paint) && 'line-color' in paint\n ? colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'line-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'line-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n : undefined;\n const width = getValue(\n layer,\n 'paint',\n 'line-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getStroke() ||\n style.getFill() ||\n style.getText()\n ) {\n style = new Style({\n stroke: new Stroke(),\n });\n styles[stylesLength] = style;\n }\n stroke = style.getStroke();\n stroke.setLineCap(\n getValue(\n layer,\n 'layout',\n 'line-cap',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setLineJoin(\n getValue(\n layer,\n 'layout',\n 'line-join',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setMiterLimit(\n getValue(\n layer,\n 'layout',\n 'line-miter-limit',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(\n paint['line-dasharray']\n ? getValue(\n layer,\n 'paint',\n 'line-dasharray',\n zoom,\n f,\n functionCache,\n featureState\n ).map(function (x) {\n return x * width;\n })\n : null\n );\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let placementAngle = 0;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(\n layer,\n 'layout',\n 'icon-image',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (iconImage) {\n icon =\n typeof iconImage === 'string'\n ? fromTemplate(iconImage, properties)\n : iconImage.toString();\n let styleGeom = undefined;\n const imageElement = getImage ? getImage(olLayer, icon) : undefined;\n if (\n (spriteImage && spriteData && spriteData[icon]) ||\n imageElement\n ) {\n const iconRotationAlignment = getValue(\n layer,\n 'layout',\n 'icon-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (type == 2) {\n const geom = /** @type {*} */ (feature.getGeometry());\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n const extent = geom.getExtent();\n const size = Math.sqrt(\n Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2)\n )\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n const midpoint =\n geom.getType() === 'MultiLineString'\n ? geom.getFlatMidpoints()\n : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new RenderFeature(\n 'Point',\n renderFeatureCoordinates,\n [],\n {},\n null\n );\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n const placement = getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (\n placement === 'line' &&\n iconRotationAlignment === 'map'\n ) {\n const stride = geom.getStride();\n const coordinates = geom.getFlatCoordinates();\n for (\n let i = 0, ii = coordinates.length - stride;\n i < ii;\n i += stride\n ) {\n const x1 = coordinates[i];\n const y1 = coordinates[i + 1];\n const x2 = coordinates[i + stride];\n const y2 = coordinates[i + stride + 1];\n const minX = Math.min(x1, x2);\n const minY = Math.min(y1, y2);\n const maxX = Math.max(x1, x2);\n const maxY = Math.max(y1, y2);\n if (\n midpoint[0] >= minX &&\n midpoint[0] <= maxX &&\n midpoint[1] >= minY &&\n midpoint[1] <= maxY\n ) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n const iconSize = getValue(\n layer,\n 'layout',\n 'icon-size',\n zoom,\n f,\n functionCache,\n featureState\n );\n const iconColor =\n paint['icon-color'] !== undefined\n ? getValue(\n layer,\n 'paint',\n 'icon-color',\n zoom,\n f,\n functionCache,\n featureState\n )\n : null;\n if (!iconColor || iconColor.a !== 0) {\n const haloColor = getValue(\n layer,\n 'paint',\n 'icon-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n );\n const haloWidth = getValue(\n layer,\n 'paint',\n 'icon-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n let iconCacheKey = `${icon}.${iconSize}.${haloWidth}.${haloColor}`;\n if (iconColor !== null) {\n iconCacheKey += `.${iconColor}`;\n }\n iconImg = iconImageCache[iconCacheKey];\n if (!iconImg) {\n const declutterMode = getIconDeclutterMode(\n layer,\n zoom,\n f,\n functionCache\n );\n let displacement;\n if ('icon-offset' in layout) {\n displacement = getValue(\n layer,\n 'layout',\n 'icon-offset',\n zoom,\n f,\n functionCache,\n featureState\n ).slice(0);\n displacement[1] *= -1;\n }\n let color = iconColor\n ? [\n iconColor.r * 255,\n iconColor.g * 255,\n iconColor.b * 255,\n iconColor.a,\n ]\n : undefined;\n if (imageElement) {\n const iconOptions = {\n color: color,\n rotateWithView: iconRotationAlignment === 'map',\n displacement: displacement,\n declutterMode: declutterMode,\n };\n if (typeof imageElement === 'string') {\n // it is a src URL\n iconOptions.src = imageElement;\n } else {\n iconOptions.img = imageElement;\n iconOptions.imgSize = [\n imageElement.width,\n imageElement.height,\n ];\n }\n iconImg = new Icon(iconOptions);\n } else {\n const spriteImageData = spriteData[icon];\n let img, size, offset;\n if (haloWidth) {\n if (spriteImageData.sdf) {\n img = drawIconHalo(\n drawSDF(spriteImage, spriteImageData, iconColor),\n {\n x: 0,\n y: 0,\n width: spriteImageData.width,\n height: spriteImageData.height,\n pixelRatio: spriteImageData.pixelRatio,\n },\n haloWidth,\n haloColor\n );\n color = undefined; // do not tint haloed icons\n } else {\n img = drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n );\n }\n } else {\n if (spriteImageData.sdf) {\n if (!spriteImageUnSDFed) {\n spriteImageUnSDFed = drawSDF(\n spriteImage,\n {\n x: 0,\n y: 0,\n width: spriteImageSize[0],\n height: spriteImageSize[1],\n },\n {r: 1, g: 1, b: 1, a: 1}\n );\n }\n img = spriteImageUnSDFed;\n } else {\n img = spriteImage;\n }\n size = [spriteImageData.width, spriteImageData.height];\n offset = [spriteImageData.x, spriteImageData.y];\n }\n iconImg = new Icon({\n color: color,\n img: img,\n // @ts-ignore\n imgSize: spriteImageSize,\n size: size,\n offset: offset,\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio,\n displacement: displacement,\n declutterMode: declutterMode,\n });\n }\n iconImageCache[iconCacheKey] = iconImg;\n }\n }\n if (iconImg) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setGeometry(styleGeom);\n iconImg.setRotation(\n placementAngle +\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'icon-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n iconImg.setOpacity(\n getValue(\n layer,\n 'paint',\n 'icon-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n iconImg.setAnchor(\n anchor[\n getValue(\n layer,\n 'layout',\n 'icon-anchor',\n zoom,\n f,\n functionCache,\n featureState\n )\n ]\n );\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setZIndex(index);\n hasImage = true;\n skipLabel = false;\n }\n } else {\n skipLabel = true;\n }\n }\n }\n }\n\n if (type == 1 && layer.type === 'circle') {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n const circleRadius =\n 'circle-radius' in paint\n ? getValue(\n layer,\n 'paint',\n 'circle-radius',\n zoom,\n f,\n functionCache,\n featureState\n )\n : 5;\n const circleStrokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-stroke-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-stroke-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleStrokeWidth = getValue(\n layer,\n 'paint',\n 'circle-stroke-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const cache_key =\n circleRadius +\n '.' +\n circleStrokeColor +\n '.' +\n circleColor +\n '.' +\n circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = new Circle({\n radius: circleRadius,\n stroke:\n circleStrokeColor && circleStrokeWidth > 0\n ? new Stroke({\n width: circleStrokeWidth,\n color: circleStrokeColor,\n })\n : undefined,\n fill: circleColor\n ? new Fill({\n color: circleColor,\n })\n : undefined,\n declutterMode: 'none',\n });\n iconImageCache[cache_key] = iconImg;\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\n let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth;\n if ('text-field' in layout) {\n textSize = Math.round(\n getValue(\n layer,\n 'layout',\n 'text-size',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const fontArray = getValue(\n layer,\n 'layout',\n 'text-font',\n zoom,\n f,\n functionCache,\n featureState\n );\n textLineHeight = getValue(\n layer,\n 'layout',\n 'text-line-height',\n zoom,\n f,\n functionCache,\n featureState\n );\n font = mb2css(\n getFonts\n ? getFonts(\n fontArray,\n glStyle.metadata ? glStyle.metadata['ol:webfonts'] : undefined\n )\n : fontArray,\n textSize,\n textLineHeight\n );\n if (!font.includes('sans-serif')) {\n font += ',sans-serif';\n }\n letterSpacing = getValue(\n layer,\n 'layout',\n 'text-letter-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n maxTextWidth = getValue(\n layer,\n 'layout',\n 'text-max-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textField = getValue(\n layer,\n 'layout',\n 'text-field',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (typeof textField === 'object' && textField.sections) {\n if (textField.sections.length === 1) {\n label = textField.toString();\n } else {\n label = textField.sections.reduce((acc, chunk, i) => {\n const fonts = chunk.fontStack\n ? chunk.fontStack.split(',')\n : fontArray;\n const chunkFont = mb2css(\n getFonts ? getFonts(fonts) : fonts,\n textSize * (chunk.scale || 1),\n textLineHeight\n );\n let text = chunk.text;\n if (text === '\\n') {\n acc.push('\\n', '');\n return acc;\n }\n if (type == 2) {\n acc.push(applyLetterSpacing(text, letterSpacing), chunkFont);\n return;\n }\n text = wrapText(\n text,\n chunkFont,\n maxTextWidth,\n letterSpacing\n ).split('\\n');\n for (let i = 0, ii = text.length; i < ii; ++i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(text[i], chunkFont);\n }\n return acc;\n }, []);\n }\n } else {\n label = fromTemplate(textField, properties).trim();\n }\n opacity = getValue(\n layer,\n 'paint',\n 'text-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getText() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(\n text ||\n new Text({\n padding: [2, 2, 2, 2],\n })\n );\n }\n text = style.getText();\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toUpperCase()))\n : label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toLowerCase()))\n : label.toLowerCase();\n }\n const wrappedLabel = Array.isArray(label)\n ? label\n : type == 2\n ? applyLetterSpacing(label, letterSpacing)\n : wrapText(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n const textAnchor = getValue(\n layer,\n 'layout',\n 'text-anchor',\n zoom,\n f,\n functionCache,\n featureState\n );\n const placement =\n hasImage || type == 1\n ? 'point'\n : getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n let textAlign;\n if (placement === 'line-center') {\n text.setPlacement('line');\n textAlign = 'center';\n } else {\n text.setPlacement(placement);\n }\n if (placement === 'line' && typeof text.setRepeat === 'function') {\n const symbolSpacing = getValue(\n layer,\n 'layout',\n 'symbol-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRepeat(symbolSpacing * 2);\n }\n text.setOverflow(placement === 'point');\n let textHaloWidth = getValue(\n layer,\n 'paint',\n 'text-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textOffset = getValue(\n layer,\n 'layout',\n 'text-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textTranslate = getValue(\n layer,\n 'paint',\n 'text-translate',\n zoom,\n f,\n functionCache,\n featureState\n );\n // Text offset has to take halo width and line height into account\n let vOffset = 0;\n let hOffset = 0;\n if (placement == 'point') {\n 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 const textRotationAlignment = getValue(\n layer,\n 'layout',\n 'text-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle(\n (deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-max-angle',\n zoom,\n f,\n functionCache,\n featureState\n )\n ) *\n label.length) /\n wrappedLabel.length\n );\n text.setRotateWithView(false);\n }\n text.setTextAlign(textAlign);\n let 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 const textJustify = getValue(\n layer,\n 'layout',\n 'text-justify',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setJustify(textJustify === 'auto' ? undefined : textJustify);\n text.setOffsetX(\n textOffset[0] * textSize + hOffset + textTranslate[0]\n );\n text.setOffsetY(\n textOffset[1] * textSize + vOffset + textTranslate[1]\n );\n textColor.setColor(\n colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n )\n );\n text.setFill(textColor);\n const haloColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\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 const halfTextSize = 0.5 * textSize;\n textHalo.setWidth(\n textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize\n );\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n const textPadding = getValue(\n layer,\n 'layout',\n 'text-padding',\n zoom,\n f,\n functionCache,\n featureState\n );\n const padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = textPadding;\n padding[1] = textPadding;\n padding[2] = textPadding;\n padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n if (recordLayer) {\n if ('set' in feature) {\n // ol/Feature\n feature.set('mapbox-layer', featureBelongsToLayer);\n } else {\n // ol/render/Feature\n feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n }\n }\n return styles;\n }\n return undefined;\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n olLayer.set('mapbox-featurestate', olLayer.get('mapbox-featurestate') || {});\n return styleFunction;\n}\n\n/**\n * Get the the style for a specific Mapbox layer only. This can be useful for creating a legend.\n * @param {import(\"ol/Feature\").default|import(\"ol/render/Feature\").default} feature OpenLayers feature.\n * @param {number} resolution View resolution.\n * @param {import(\"ol/layer\").Vector|import(\"ol/layer\").VectorTile} olLayer OpenLayers layer.\n * @param {string} layerId Id of the Mapbox layer to get the style for\n * @return {Array} Styles for the provided Mapbox layer.\n */\nexport function getStyleForLayer(feature, resolution, olLayer, layerId) {\n const evaluateStyle = olLayer.getStyleFunction();\n if (evaluateStyle.length === 3) {\n // @ts-ignore\n return evaluateStyle(feature, resolution, layerId);\n }\n return undefined;\n}\n\nexport {\n colorWithOpacity as _colorWithOpacity,\n evaluateFilter as _evaluateFilter,\n fromTemplate as _fromTemplate,\n getValue as _getValue,\n};\n","/**\n * Generates a shaded relief image given elevation data. Uses a 3x3\n * neighborhood for determining slope and aspect.\n * @param {Array} inputs Array of input images.\n * @param {Object} data Data added in the \"beforeoperations\" event.\n * @return {ImageData} Output image.\n */\nexport function hillshade(inputs, data) {\n const elevationImage = inputs[0];\n const width = elevationImage.width;\n const height = elevationImage.height;\n const elevationData = elevationImage.data;\n const shadeData = new Uint8ClampedArray(elevationData.length);\n const dp = data.resolution * 2;\n const maxX = width - 1;\n const maxY = height - 1;\n const pixel = [0, 0, 0, 0];\n const twoPi = 2 * Math.PI;\n const halfPi = Math.PI / 2;\n const sunEl = (Math.PI * data.sunEl) / 180;\n const sunAz = (Math.PI * data.sunAz) / 180;\n const cosSunEl = Math.cos(sunEl);\n const sinSunEl = Math.sin(sunEl);\n const highlightColor = data.highlightColor;\n const shadowColor = data.shadowColor;\n const accentColor = data.accentColor;\n const encoding = data.encoding;\n\n let pixelX,\n pixelY,\n x0,\n x1,\n y0,\n y1,\n offset,\n z0,\n z1,\n dzdx,\n dzdy,\n slope,\n aspect,\n accent,\n scaled,\n shade,\n scaledAccentColor,\n compositeShadeColor,\n clamp,\n slopeScaleBase,\n scaledSlope,\n cosIncidence;\n\n function calculateElevation(pixel, encoding = 'mapbox') {\n // The method used to extract elevations from the DEM.\n //\n // The supported methods are the Mapbox format\n // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000\n // and the Terrarium format\n // (red * 256 + green + blue / 256) - 32768\n //\n if (encoding === 'mapbox') {\n return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000;\n }\n if (encoding === 'terrarium') {\n return pixel[0] * 256 + pixel[1] + pixel[2] / 256 - 32768;\n }\n }\n for (pixelY = 0; pixelY <= maxY; ++pixelY) {\n y0 = pixelY === 0 ? 0 : pixelY - 1;\n y1 = pixelY === maxY ? maxY : pixelY + 1;\n for (pixelX = 0; pixelX <= maxX; ++pixelX) {\n x0 = pixelX === 0 ? 0 : pixelX - 1;\n x1 = pixelX === maxX ? maxX : pixelX + 1;\n\n // determine elevation for (x0, pixelY)\n offset = (pixelY * width + x0) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel, encoding);\n\n // determine elevation for (x1, pixelY)\n offset = (pixelY * width + x1) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel, encoding);\n\n dzdx = (z1 - z0) / dp;\n\n // determine elevation for (pixelX, y0)\n offset = (y0 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel, encoding);\n\n // determine elevation for (pixelX, y1)\n offset = (y1 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel, encoding);\n\n dzdy = (z1 - z0) / dp;\n\n aspect = Math.atan2(dzdy, -dzdx);\n if (aspect < 0) {\n aspect = halfPi - aspect;\n } else if (aspect > halfPi) {\n aspect = twoPi - aspect + halfPi;\n } else {\n aspect = halfPi - aspect;\n }\n\n // Bootstrap slope and corresponding incident values\n slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy));\n cosIncidence =\n sinSunEl * Math.cos(slope) +\n cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect);\n accent = Math.cos(slope);\n // 255 for Hex colors\n scaled = 255 * cosIncidence;\n\n /*\n * The following is heavily inspired\n * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl)\n */\n\n // Forces given value to stay between two given extremes\n clamp = Math.min(Math.max(2 * data.sunEl, 0), 1);\n\n // Intensity basis for hillshade opacity\n slopeScaleBase = 1.875 - data.opacity * 1.75;\n // Intensity interpolation so that higher intensity values create more opaque hillshading\n scaledSlope =\n data.opacity !== 0.5\n ? halfPi *\n ((Math.pow(slopeScaleBase, slope) - 1) /\n (Math.pow(slopeScaleBase, halfPi) - 1))\n : slope;\n\n // Accent hillshade color with given accentColor to emphasize rougher terrain\n scaledAccentColor = {\n r: (1 - accent) * accentColor.r * clamp * 255,\n g: (1 - accent) * accentColor.g * clamp * 255,\n b: (1 - accent) * accentColor.b * clamp * 255,\n a: (1 - accent) * accentColor.a * clamp * 255,\n };\n\n // Allows highlight vs shadow discrimination\n shade = Math.abs((((aspect + sunAz) / Math.PI + 0.5) % 2) - 1);\n // Creates a composite color mix between highlight & shadow colors to emphasize slopes\n compositeShadeColor = {\n r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled,\n g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled,\n b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled,\n a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled,\n };\n\n // Fill in result color value\n offset = (pixelY * width + pixelX) * 4;\n shadeData[offset] =\n scaledAccentColor.r * (1 - shade) + compositeShadeColor.r;\n shadeData[offset + 1] =\n scaledAccentColor.g * (1 - shade) + compositeShadeColor.g;\n shadeData[offset + 2] =\n scaledAccentColor.b * (1 - shade) + compositeShadeColor.b;\n // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast\n shadeData[offset + 3] =\n elevationData[offset + 3] *\n data.opacity *\n clamp *\n Math.sin(scaledSlope);\n }\n }\n\n return new ImageData(shadeData, width, height);\n}\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport ImageLayer from 'ol/layer/Image.js';\nimport Layer from 'ol/layer/Layer.js';\nimport LayerGroup from 'ol/layer/Group.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport Raster from 'ol/source/Raster.js';\nimport Source from 'ol/source/Source.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource, {defaultLoadFunction} from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport {\n METERS_PER_UNIT,\n equivalent,\n fromLonLat,\n get as getProjection,\n getUserProjection,\n} from 'ol/proj.js';\nimport {\n _colorWithOpacity,\n stylefunction as applyStyleFunction,\n stylefunction as applyStylefunction,\n getValue,\n styleFunctionArgs,\n} from './stylefunction.js';\nimport {bbox as bboxStrategy} from 'ol/loadingstrategy.js';\nimport {createXYZ} from 'ol/tilegrid.js';\nimport {\n defaultResolutions,\n fetchResource,\n getFilterCache,\n getFunctionCache,\n getGlStyle,\n getStyleFunctionKey,\n getTileJson,\n getZoomForResolution,\n} from './util.js';\nimport {getFonts} from './text.js';\nimport {getTopLeft} from 'ol/extent.js';\nimport {hillshade} from './shaders.js';\nimport {\n normalizeSourceUrl,\n normalizeSpriteUrl,\n normalizeStyleUrl,\n} from './mapbox.js';\n\n/**\n * @typedef {Object} FeatureIdentifier\n * @property {string|number} id The feature id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [accessToken] Access token for 'mapbox://' urls.\n * @property {function(string, import(\"./util.js\").ResourceType): (Request|string|void)} [transformRequest]\n * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying\n * the url, adding headers or setting credentials options. Called with the url and the resource\n * type as arguments, this function is supposed to return a `Request` or a url `string`. Without a return value,\n * the original request will not be modified.\n * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections.\n * Code of a projection registered with OpenLayers. All sources of the style must be provided in this\n * projection. The projection must also have a valid extent defined, which will be used to determine the\n * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox\n * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g.\n * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`.\n * @property {Array} [resolutions] Only useful when working with non-standard projections.\n * Resolutions for mapping resolution to the `zoom` used in the Mapbox style.\n * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided\n * as object, when they contain a relative sprite url, or sources referencing data by relative url.\n * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function be used for icons not in the sprite or to override sprite icons.\n * @property {string} [accessTokenParam='access_token'] Access token param. For internal use.\n */\n\n/**\n * @typedef {Object} ApplyStyleOptions\n * @property {string} [source=''] Source. Default is `''`, which causes the first source in the\n * style to be used.\n * @property {Array} [layers] Layers. If no source is provided, the layers with the\n * provided ids will be used from the style's `layers` array. All layers need to use the same source.\n * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters\n * specified for the source in the mapbox style definition.\n */\n\n/**\n * @param {import(\"ol/proj/Projection.js\").default} projection Projection.\n * @param {number} [tileSize=512] Tile size.\n * @return {Array} Resolutions.\n */\nfunction getTileResolutions(projection, tileSize = 512) {\n return projection.getExtent()\n ? createXYZ({\n extent: projection.getExtent(),\n tileSize: tileSize,\n maxZoom: 22,\n }).getResolutions()\n : defaultResolutions;\n}\n\n/**\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Options} Completed options with accessToken and accessTokenParam.\n */\nfunction completeOptions(styleUrl, options) {\n if (!options.accessToken) {\n options = Object.assign({}, options);\n const searchParams = new URL(styleUrl).searchParams;\n // The last search parameter is the access token\n searchParams.forEach((value, key) => {\n options.accessToken = value;\n options.accessTokenParam = key;\n });\n }\n return options;\n}\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`. If the layer does not have a source\n * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is\n * set to `false`).\n *\n * **Example:**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * import {VectorTile} from 'ol/layer.js';\n *\n * const layer = new VectorTile({declutter: true});\n * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n *\n * The style function will render all layers from the `glStyle` object that use the source\n * of the first layer, the specified `source`, or a subset of layers from the same source. The\n * source needs to be 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. When the layer has a source configured,\n * it will be modified to use the configuration from the glStyle's `source`. Options specified on the\n * layer's source will override those from the glStyle's `source`, except for `url` and\n * `tileUrlFunction`. When the source projection is the default (`EPSG:3857`), the `tileGrid` will\n * also be overridden. If you'd rather not have ol-mapbox-style modify the source, configure `applyStyle()`\n * with the `updateSource: false` option.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or\n * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is\n * provided, all layers for the specified source will be included in the style function. When layer\n * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey\n * value, all layers using the first source specified in the glStyle will be rendered.\n * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file\n * (only required when a relative path is used for the `\"sprite\"` property of the style).\n * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections, can also be supplied with\n * options.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(\n layer,\n glStyle,\n sourceOrLayersOrOptions = '',\n optionsOrPath = {},\n resolutions = undefined\n) {\n let styleUrl, sourceId;\n /** @type {Options&ApplyStyleOptions} */\n let options;\n let sourceOrLayers;\n let updateSource = true;\n if (\n typeof sourceOrLayersOrOptions !== 'string' &&\n !Array.isArray(sourceOrLayersOrOptions)\n ) {\n options = sourceOrLayersOrOptions;\n sourceOrLayers = options.source || options.layers;\n optionsOrPath = options;\n } else {\n sourceOrLayers = sourceOrLayersOrOptions;\n }\n if (typeof optionsOrPath === 'string') {\n styleUrl = optionsOrPath;\n options = {};\n } else {\n styleUrl = optionsOrPath.styleUrl;\n options = optionsOrPath;\n }\n if (options.updateSource === false) {\n updateSource = false;\n }\n if (!resolutions) {\n resolutions = options.resolutions;\n }\n if (\n !styleUrl &&\n typeof glStyle === 'string' &&\n !glStyle.trim().startsWith('{')\n ) {\n styleUrl = glStyle;\n }\n if (styleUrl) {\n styleUrl = styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(styleUrl, options.accessToken);\n options = completeOptions(styleUrl, options);\n }\n\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 getGlStyle(glStyle, options)\n .then(function (glStyle) {\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n return reject(\n new Error('Can only apply to VectorLayer or VectorTileLayer')\n );\n }\n\n const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson';\n if (!sourceOrLayers) {\n sourceId = Object.keys(glStyle.sources).find(function (key) {\n return glStyle.sources[key].type === type;\n });\n sourceOrLayers = sourceId;\n } else if (Array.isArray(sourceOrLayers)) {\n sourceId = glStyle.layers.find(function (layer) {\n return layer.id === sourceOrLayers[0];\n }).source;\n } else {\n sourceId = sourceOrLayers;\n }\n if (!sourceId) {\n return reject(new Error(`No ${type} source found in the glStyle.`));\n }\n\n function assignSource() {\n if (!updateSource) {\n return Promise.resolve();\n }\n if (layer instanceof VectorTileLayer) {\n return setupVectorSource(\n glStyle.sources[sourceId],\n styleUrl,\n options\n ).then(function (source) {\n const targetSource = layer.getSource();\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n targetSource.setTileUrlFunction(source.getTileUrlFunction());\n if (\n typeof targetSource.setUrls === 'function' &&\n typeof source.getUrls === 'function'\n ) {\n // to get correct keys for tile cache and queue\n targetSource.setUrls(source.getUrls());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.format_;\n }\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n if (\n targetSource.getTileLoadFunction() === defaultLoadFunction\n ) {\n targetSource.setTileLoadFunction(\n source.getTileLoadFunction()\n );\n }\n if (\n equivalent(\n targetSource.getProjection(),\n source.getProjection()\n )\n ) {\n targetSource.tileGrid = source.getTileGrid();\n }\n }\n if (\n !isFinite(layer.getMaxResolution()) &&\n !isFinite(layer.getMinZoom())\n ) {\n const tileGrid = layer.getSource().getTileGrid();\n layer.setMaxResolution(\n tileGrid.getResolution(tileGrid.getMinZoom())\n );\n }\n });\n }\n const glSource = glStyle.sources[sourceId];\n let source = layer.getSource();\n if (!source || source.get('mapbox-source') !== glSource) {\n source = setupGeoJSONSource(glSource, styleUrl, options);\n }\n const targetSource = /** @type {VectorSource} */ (layer.getSource());\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.getFormat();\n }\n //@ts-ignore\n targetSource.url_ = source.getUrl();\n }\n return Promise.resolve();\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n if (options.projection && !resolutions) {\n const projection = getProjection(options.projection);\n const units = projection.getUnits();\n if (units !== 'm') {\n resolutions = defaultResolutions.map(\n (resolution) => resolution / METERS_PER_UNIT[units]\n );\n }\n }\n style = applyStyleFunction(\n layer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n options.getImage\n );\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${sourceId}]`));\n } else {\n assignSource().then(resolve).catch(reject);\n }\n } else if (style) {\n layer.setStyle(style);\n assignSource().then(resolve).catch(reject);\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n const sprite = new URL(\n normalizeSpriteUrl(\n glStyle.sprite,\n options.accessToken,\n styleUrl || location.href\n )\n );\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.json' +\n sprite.search;\n\n new Promise(function (resolve, reject) {\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(function (error) {\n spriteUrl =\n sprite.origin + sprite.pathname + '.json' + sprite.search;\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(reject);\n });\n })\n .then(function (spritesJson) {\n if (spritesJson === undefined) {\n reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.png' +\n sprite.search;\n if (options.transformRequest) {\n const transformed =\n options.transformRequest(spriteImageUrl, 'SpriteImage') ||\n spriteImageUrl;\n if (transformed instanceof Request) {\n spriteImageUrl = transformed;\n }\n }\n onChange();\n })\n .catch(function (err) {\n reject(\n new Error(\n `Sprites cannot be loaded: ${spriteUrl}: ${err.message}`\n )\n );\n });\n } else {\n onChange();\n }\n })\n .catch(reject);\n });\n}\n\nconst emptyObj = {};\n\nfunction setFirstBackground(mapOrLayer, glStyle, options) {\n glStyle.layers.some(function (layer) {\n if (layer.type === 'background') {\n if (mapOrLayer instanceof Layer) {\n mapOrLayer.setBackground(function (resolution) {\n return getBackgroundColor(layer, resolution, options, {});\n });\n return true;\n }\n if (mapOrLayer instanceof Map || mapOrLayer instanceof LayerGroup) {\n mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {}));\n return true;\n }\n }\n });\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the\n * provided map or layer (group).\n *\n * **Example:**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * import {Map} from 'ol';\n *\n * const map = new Map({target: 'map'});\n * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n * @param {Map|import(\"ol/layer/Base.js\").default} mapOrLayer OpenLayers Map or layer (group).\n * @param {Object|string} glStyle Mapbox Style object or url.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the background is applied.\n */\nexport function applyBackground(mapOrLayer, glStyle, options = {}) {\n return getGlStyle(glStyle, options).then(function (glStyle) {\n setFirstBackground(mapOrLayer, glStyle, options);\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function (layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON, projection) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]], projection);\n const tr = fromLonLat([bounds[2], bounds[3]], projection);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n return getProjection(projection).getExtent();\n}\n\nfunction sourceOptionsFromTileJSON(glSource, tileJSON, options) {\n const tileJSONSource = new TileJSON({\n tileJSON: tileJSON,\n tileSize: glSource.tileSize || tileJSON.tileSize || 512,\n });\n const tileJSONDoc = tileJSONSource.getTileJSON();\n const tileGrid = tileJSONSource.getTileGrid();\n const projection = getProjection(options.projection || 'EPSG:3857');\n const extent = extentFromTileJSON(tileJSONDoc, projection);\n const projectionExtent = projection.getExtent();\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n /** @type {import(\"ol/source/VectorTile.js\").Options} */\n const sourceOptions = {\n attributions: tileJSONSource.getAttributions(),\n projection: projection,\n tileGrid: new TileGrid({\n origin: projectionExtent\n ? getTopLeft(projectionExtent)\n : tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(\n 0,\n maxZoom + 1\n ),\n tileSize: tileGrid.getTileSize(0),\n }),\n };\n if (Array.isArray(tileJSONDoc.tiles)) {\n sourceOptions.urls = tileJSONDoc.tiles;\n } else {\n sourceOptions.url = tileJSONDoc.tiles;\n }\n return sourceOptions;\n}\n\nfunction getBackgroundColor(glLayer, resolution, options, functionCache) {\n const background = {\n id: glLayer.id,\n type: glLayer.type,\n };\n const layout = glLayer.layout || {};\n const paint = glLayer.paint || {};\n background['paint'] = paint;\n const zoom = getZoomForResolution(\n resolution,\n options.resolutions || defaultResolutions\n );\n let bg, opacity;\n if (paint['background-color'] !== undefined) {\n bg = getValue(\n background,\n 'paint',\n 'background-color',\n zoom,\n emptyObj,\n functionCache\n );\n }\n if (paint['background-opacity'] !== undefined) {\n opacity = getValue(\n background,\n 'paint',\n 'background-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n }\n return layout.visibility == 'none'\n ? undefined\n : _colorWithOpacity(bg, opacity);\n}\n\n/**\n * @param {Object} glLayer Mapbox Style layer object.\n * @param {Options} options Options.\n * @param {Object} functionCache Cache for functions.\n * @return {Layer} OpenLayers layer.\n */\nfunction setupBackgroundLayer(glLayer, options, functionCache) {\n const div = document.createElement('div');\n div.className = 'ol-mapbox-style-background';\n div.style.position = 'absolute';\n div.style.width = '100%';\n div.style.height = '100%';\n return new Layer({\n source: new Source({}),\n render(frameState) {\n const color = getBackgroundColor(\n glLayer,\n frameState.viewState.resolution,\n options,\n functionCache\n );\n div.style.backgroundColor = color;\n return div;\n },\n });\n}\n\n/**\n * Creates an OpenLayers VectorTile source for a gl source entry.\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url,\n * with access key applied.\n * @param {Options} options Options.\n * @return {Promise} Promise resolving to a VectorTile source.\n * @private\n */\nexport function setupVectorSource(glSource, styleUrl, options) {\n return new Promise(function (resolve, reject) {\n getTileJson(glSource, styleUrl, options)\n .then(function ({tileJson, tileLoadFunction}) {\n const sourceOptions = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n );\n sourceOptions.tileLoadFunction = tileLoadFunction;\n sourceOptions.format = new MVT();\n resolve(new VectorTileSource(sourceOptions));\n })\n .catch(reject);\n });\n}\n\nfunction setupVectorLayer(glSource, styleUrl, options) {\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false,\n });\n setupVectorSource(glSource, styleUrl, options)\n .then(function (source) {\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\nfunction getBboxTemplate(projection) {\n const projCode = projection ? projection.getCode() : 'EPSG:3857';\n return `{bbox-${projCode.toLowerCase().replace(/[^a-z0-9]/g, '-')}}`;\n}\n\nfunction setupRasterLayer(glSource, styleUrl, options) {\n const layer = new TileLayer();\n getTileJson(glSource, styleUrl, options)\n .then(function ({tileJson, tileLoadFunction}) {\n const source = new TileJSON({\n interpolate:\n options.interpolate === undefined ? true : options.interpolate,\n transition: 0,\n crossOrigin: 'anonymous',\n tileJSON: tileJson,\n });\n source.tileGrid = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n ).tileGrid;\n if (options.projection) {\n //@ts-ignore\n source.projection = getProjection(options.projection);\n }\n const getTileUrl = source.getTileUrlFunction();\n if (tileLoadFunction) {\n source.setTileLoadFunction(tileLoadFunction);\n }\n source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) {\n const bboxTemplate = getBboxTemplate(projection);\n let src = getTileUrl(tileCoord, pixelRatio, projection);\n if (src.indexOf(bboxTemplate) != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tileCoord);\n src = src.replace(bboxTemplate, bbox.toString());\n }\n return src;\n });\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\n/**\n *\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string} styleUrl Style url\n * @param {Options} options ol-mapbox-style options.\n * @return {ImageLayer} The raster layer\n */\nfunction setupHillshadeLayer(glSource, styleUrl, options) {\n const tileLayer = setupRasterLayer(glSource, styleUrl, options);\n /** @type {ImageLayer} */\n const layer = new ImageLayer({\n source: new Raster({\n operationType: 'image',\n operation: hillshade,\n sources: [tileLayer],\n }),\n });\n return layer;\n}\n\n/**\n * @param {Object} glSource glStyle source.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {VectorSource} Configured vector source.\n */\nfunction setupGeoJSONSource(glSource, styleUrl, options) {\n const geoJsonFormat = options.projection\n ? new GeoJSON({dataProjection: options.projection})\n : new GeoJSON();\n const data = glSource.data;\n const sourceOptions = {};\n if (typeof data == 'string') {\n const geoJsonUrl = normalizeSourceUrl(\n data,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (/\\{bbox-[0-9a-z-]+\\}/.test(geoJsonUrl)) {\n const extentUrl = (extent, resolution, projection) => {\n const bboxTemplate = getBboxTemplate(projection);\n return geoJsonUrl.replace(bboxTemplate, `${extent.join(',')}`);\n };\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n loader: (extent, resolution, projection, success, failure) => {\n const url =\n typeof extentUrl === 'function'\n ? extentUrl(extent, resolution, projection)\n : extentUrl;\n fetchResource('GeoJSON', url, options)\n .then((json) => {\n const features = /** @type {*} */ (\n source\n .getFormat()\n .readFeatures(json, {featureProjection: projection})\n );\n source.addFeatures(features);\n success(features);\n })\n .catch((response) => {\n source.removeLoadedExtent(extent);\n failure();\n });\n },\n strategy: bboxStrategy,\n });\n source.set('mapbox-source', glSource);\n return source;\n }\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: geoJsonUrl,\n loader: (extent, resolution, projection, success, failure) => {\n fetchResource('GeoJSON', geoJsonUrl, options)\n .then((json) => {\n const features = /** @type {*} */ (\n source\n .getFormat()\n .readFeatures(json, {featureProjection: projection})\n );\n source.addFeatures(features);\n success(features);\n })\n .catch((response) => {\n source.removeLoadedExtent(extent);\n failure();\n });\n },\n });\n return source;\n }\n sourceOptions.features = geoJsonFormat.readFeatures(data, {\n featureProjection: getUserProjection() || 'EPSG:3857',\n });\n\n const source = new VectorSource(\n Object.assign(\n {\n attributions: glSource.attribution,\n format: geoJsonFormat,\n },\n sourceOptions\n )\n );\n source.set('mapbox-source', glSource);\n return source;\n}\n\nfunction setupGeoJSONLayer(glSource, styleUrl, options) {\n return new VectorLayer({\n declutter: true,\n source: setupGeoJSONSource(glSource, styleUrl, options),\n visible: false,\n });\n}\n\nfunction prerenderRasterLayer(glLayer, layer, functionCache) {\n let zoom = null;\n return function (event) {\n if (\n glLayer.paint &&\n 'raster-opacity' in glLayer.paint &&\n event.frameState.viewState.zoom !== zoom\n ) {\n zoom = event.frameState.viewState.zoom;\n delete functionCache[glLayer.id];\n updateRasterLayerProperties(glLayer, layer, zoom, functionCache);\n }\n };\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, zoom, functionCache) {\n const opacity = getValue(\n glLayer,\n 'paint',\n 'raster-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n layer.setOpacity(opacity);\n}\n\nfunction manageVisibility(layer, mapOrGroup) {\n function onChange() {\n const glStyle = mapOrGroup.get('mapbox-style');\n if (!glStyle) {\n return;\n }\n const mapboxLayers = derefLayers(glStyle.layers);\n const layerMapboxLayerids = layer.get('mapbox-layers');\n const visible = mapboxLayers\n .filter(function (mapboxLayer) {\n return layerMapboxLayerids.includes(mapboxLayer.id);\n })\n .some(function (mapboxLayer) {\n return (\n !mapboxLayer.layout ||\n !mapboxLayer.layout.visibility ||\n mapboxLayer.layout.visibility === 'visible'\n );\n });\n if (layer.get('visible') !== visible) {\n layer.setVisible(visible);\n }\n }\n layer.on('change', onChange);\n onChange();\n}\n\nexport function setupLayer(glStyle, styleUrl, glLayer, options) {\n const functionCache = getFunctionCache(glStyle);\n const glLayers = glStyle.layers;\n const type = glLayer.type;\n\n const id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n const glSource = glStyle.sources[id];\n let layer;\n if (type == 'background') {\n layer = setupBackgroundLayer(glLayer, options, functionCache);\n } else if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster') {\n layer = setupRasterLayer(glSource, styleUrl, options);\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n layer.on('prerender', prerenderRasterLayer(glLayer, layer, functionCache));\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster-dem' && glLayer.type == 'hillshade') {\n const hillshadeLayer = setupHillshadeLayer(glSource, styleUrl, options);\n layer = hillshadeLayer;\n hillshadeLayer.getSource().on('beforeoperations', function (event) {\n const data = event.data;\n data.resolution = event.resolution;\n const zoom = getZoomForResolution(\n event.resolution,\n options.resolutions || defaultResolutions\n );\n data.encoding = glSource.encoding;\n data.vert =\n 5 *\n getValue(\n glLayer,\n 'paint',\n 'hillshade-exaggeration',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunAz = getValue(\n glLayer,\n 'paint',\n 'hillshade-illumination-direction',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunEl = 35;\n data.opacity = 0.3;\n data.highlightColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-highlight-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.shadowColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-shadow-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.accentColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-accent-color',\n zoom,\n emptyObj,\n functionCache\n );\n });\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n }\n const glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n return layer;\n}\n\n/**\n * @param {*} glStyle Mapbox Style.\n * @param {Map|LayerGroup} mapOrGroup Map or layer group.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the style is loaded.\n */\nfunction processStyle(glStyle, mapOrGroup, styleUrl, options) {\n const promises = [];\n\n let view = null;\n if (mapOrGroup instanceof Map) {\n view = mapOrGroup.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n const projection = options.projection\n ? getProjection(options.projection)\n : view.getProjection();\n view = new View(\n Object.assign(view.getProperties(), {\n maxResolution:\n defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()],\n projection: options.projection || view.getProjection(),\n })\n );\n mapOrGroup.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center, view.getProjection()));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(\n defaultResolutions[0] /\n METERS_PER_UNIT[view.getProjection().getUnits()] /\n Math.pow(2, glStyle.zoom)\n );\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: mapOrGroup.getSize(),\n });\n }\n }\n mapOrGroup.set('mapbox-style', glStyle);\n mapOrGroup.set('mapbox-metadata', {styleUrl, options});\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let layer, glSourceId, id;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap') {\n //FIXME Unsupported layer type\n throw new Error(`${type} layers are not supported`);\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 || id != glSourceId) {\n if (layerIds.length) {\n promises.push(\n finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n )\n );\n layerIds = [];\n }\n\n layer = setupLayer(glStyle, styleUrl, glLayer, options);\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n layerIds = [];\n }\n glSourceId = layer.get('mapbox-source');\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(\n finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)\n );\n return Promise.all(promises);\n}\n\n/**\n * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup.\n * This includes the map background, the layers, and for Map instances that did not\n * have a View defined yet also the center and the zoom.\n *\n * **Example:**\n * ```js\n * import apply from 'ol-mapbox-style';\n *\n * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'});\n * ```\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 or LayerGroup instance, which holds the Mapbox Style object.\n *\n * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing\n * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be\n * the target of a new OpenLayers Map, or a layer group. If layer group, styles\n * releated to the map and view will be ignored.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl`\n * shown in Mapbox Studio's \"share\" panel. In addition, the `accessToken` option\n * (see below) must be set.\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 * @param {Options} options Options.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The\n * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as\n * argument.\n */\nexport function apply(mapOrGroupOrElement, style, options = {}) {\n let promise;\n /** @type {Map|LayerGroup} */\n let mapOrGroup;\n if (\n typeof mapOrGroupOrElement === 'string' ||\n mapOrGroupOrElement instanceof HTMLElement\n ) {\n mapOrGroup = new Map({\n target: mapOrGroupOrElement,\n });\n } else {\n mapOrGroup = mapOrGroupOrElement;\n }\n\n if (typeof style === 'string') {\n const styleUrl = style.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(style, options.accessToken);\n options = completeOptions(styleUrl, options);\n\n promise = new Promise(function (resolve, reject) {\n getGlStyle(style, options)\n .then(function (glStyle) {\n processStyle(glStyle, mapOrGroup, styleUrl, options)\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n })\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(\n style,\n mapOrGroup,\n !options.styleUrl || options.styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(options.styleUrl, options.accessToken),\n options\n )\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\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} styleUrl The original style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {Map|LayerGroup} mapOrGroup OpenLayers Map.\n * @param {Options} options Options.\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 */\nexport function finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options = {}\n) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const 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 const setStyle = function () {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(\n new Error(\n 'Error accessing data for source ' + layer.get('mapbox-source')\n )\n );\n return;\n }\n if ('getTileGrid' in source) {\n const tileGrid =\n /** @type {import(\"ol/source/Tile.js\").default|import(\"ol/source/VectorTile.js\").default} */ (\n source\n ).getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(\n Math.min(\n defaultResolutions[minZoom],\n tileGrid.getResolution(sourceMinZoom)\n ) + 1e-9\n );\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n } else {\n if (minZoom > 0) {\n layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9);\n }\n }\n if (\n source instanceof VectorSource ||\n source instanceof VectorTileSource\n ) {\n applyStyle(\n /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (\n layer\n ),\n glStyle,\n layerIds,\n Object.assign({styleUrl: styleUrl}, options)\n )\n .then(function () {\n manageVisibility(layer, mapOrGroup);\n resolve();\n })\n .catch(reject);\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n const layers = mapOrGroup.getLayers();\n if (layers.getArray().indexOf(layer) === -1) {\n layers.push(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\n/**\n * Get the Mapbox Layer object for the provided `layerId`.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {string} layerId Mapbox Layer id.\n * @return {Object} Mapbox Layer object.\n */\nexport function getMapboxLayer(mapOrGroup, layerId) {\n const style = mapOrGroup.get('mapbox-style');\n const layerStyle = style.layers.find(function (layer) {\n return layer.id === layerId;\n });\n return layerStyle;\n}\n\n/**\n * Add a new Mapbox Layer object to the style. The map will be re-rendered.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {Object} mapboxLayer Mapbox Layer object.\n * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added.\n * @return {Promise} Resolves when the added layer is available.\n */\nexport function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n let spliceIndex;\n let sourceIndex = -1;\n if (beforeLayerId !== undefined) {\n const beforeMapboxLayer = getMapboxLayer(mapOrGroup, beforeLayerId);\n if (beforeMapboxLayer === undefined) {\n throw new Error(`Layer with id \"${beforeLayerId}\" not found.`);\n }\n spliceIndex = mapboxLayers.indexOf(beforeMapboxLayer);\n } else {\n spliceIndex = mapboxLayers.length;\n }\n let sourceOffset;\n if (\n spliceIndex > 0 &&\n mapboxLayers[spliceIndex - 1].source === mapboxLayer.source\n ) {\n sourceIndex = spliceIndex - 1;\n sourceOffset = -1;\n } else if (\n spliceIndex < mapboxLayers.length &&\n mapboxLayers[spliceIndex].source === mapboxLayer.source\n ) {\n sourceIndex = spliceIndex;\n sourceOffset = 0;\n }\n if (sourceIndex === -1) {\n const {options, styleUrl} = mapOrGroup.get('mapbox-metadata');\n const layer = setupLayer(glStyle, styleUrl, mapboxLayer, options);\n if (beforeLayerId) {\n const beforeLayer = getLayer(mapOrGroup, beforeLayerId);\n const beforeLayerIndex = mapOrGroup\n .getLayers()\n .getArray()\n .indexOf(beforeLayer);\n mapOrGroup.getLayers().insertAt(beforeLayerIndex, layer);\n }\n mapboxLayers.splice(spliceIndex, 0, mapboxLayer);\n return finalizeLayer(\n layer,\n [mapboxLayer.id],\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n );\n }\n\n if (mapboxLayers.some((layer) => layer.id === mapboxLayer.id)) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" already exists.`);\n }\n const sourceLayerId = mapboxLayers[sourceIndex].id;\n const args =\n styleFunctionArgs[\n getStyleFunctionKey(\n mapOrGroup.get('mapbox-style'),\n getLayer(mapOrGroup, sourceLayerId)\n )\n ];\n mapboxLayers.splice(spliceIndex, 0, mapboxLayer);\n if (args) {\n const [\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage,\n ] = args;\n if (Array.isArray(sourceOrLayers)) {\n const layerIndex = sourceOrLayers.indexOf(sourceLayerId) + sourceOffset;\n sourceOrLayers.splice(layerIndex, 0, mapboxLayer.id);\n }\n applyStyleFunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage\n );\n } else {\n getLayer(mapOrGroup, mapboxLayers[sourceIndex].id).changed();\n }\n return Promise.resolve();\n}\n\n/**\n * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {Object} mapboxLayer Updated Mapbox Layer object.\n */\nexport function updateMapboxLayer(mapOrGroup, mapboxLayer) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n const index = mapboxLayers.findIndex(function (layer) {\n return layer.id === mapboxLayer.id;\n });\n if (index === -1) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" not found.`);\n }\n const oldLayer = mapboxLayers[index];\n if (oldLayer.source !== mapboxLayer.source) {\n throw new Error(\n 'Updated layer and previous version must use the same source.'\n );\n }\n delete getFunctionCache(glStyle)[mapboxLayer.id];\n delete getFilterCache(glStyle)[mapboxLayer.id];\n mapboxLayers[index] = mapboxLayer;\n const args =\n styleFunctionArgs[\n getStyleFunctionKey(\n mapOrGroup.get('mapbox-style'),\n getLayer(mapOrGroup, mapboxLayer.id)\n )\n ];\n if (args) {\n applyStylefunction.apply(undefined, args);\n } else {\n getLayer(mapOrGroup, mapboxLayer.id).changed();\n }\n}\n\n/**\n * Remove a Mapbox Layer object from the style. The map will be re-rendered.\n * @param {Map|LayerGroup} mapOrGroup The Map or LayerGroup `apply` was called on.\n * @param {string|Object} mapboxLayerIdOrLayer Mapbox Layer id or Mapbox Layer object.\n */\nexport function removeMapboxLayer(mapOrGroup, mapboxLayerIdOrLayer) {\n const mapboxLayerId =\n typeof mapboxLayerIdOrLayer === 'string'\n ? mapboxLayerIdOrLayer\n : mapboxLayerIdOrLayer.id;\n const layer = getLayer(mapOrGroup, mapboxLayerId);\n /** @type {Array} */\n const layerMapboxLayers = layer.get('mapbox-layers');\n if (layerMapboxLayers.length === 1) {\n throw new Error(\n 'Cannot remove last Mapbox layer from an OpenLayers layer.'\n );\n }\n layerMapboxLayers.splice(layerMapboxLayers.indexOf(mapboxLayerId), 1);\n const glStyle = mapOrGroup.get('mapbox-style');\n const layers = glStyle.layers;\n layers.splice(\n layers.findIndex((layer) => layer.id === mapboxLayerId),\n 1\n );\n const args = styleFunctionArgs[getStyleFunctionKey(glStyle, layer)];\n if (args) {\n const [\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage,\n ] = args;\n if (Array.isArray(sourceOrLayers)) {\n sourceOrLayers.splice(\n sourceOrLayers.findIndex((layer) => layer === mapboxLayerId),\n 1\n );\n }\n applyStylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n getImage\n );\n } else {\n getLayer(mapOrGroup, mapboxLayerId).changed();\n }\n}\n\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 {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n return undefined;\n}\n\n/**\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let 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/**\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n return undefined;\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n *\n * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the\n * `mapbox-featurestate` property.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature\n * state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @param {Object|null} state Feature state. Set to `null` to remove the feature state.\n */\nexport function setFeatureState(mapOrLayer, feature, state) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState) {\n if (state) {\n featureState[feature.id] = state;\n } else {\n delete featureState[feature.id];\n }\n layers[i].changed();\n } else {\n throw new Error(`Map or layer for source \"${feature.source}\" not found.`);\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @return {Object|null} Feature state or `null` when no feature state is set for the given\n * feature identifier.\n */\nexport function getFeatureState(mapOrLayer, feature) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState && featureState[feature.id]) {\n return featureState[feature.id];\n }\n }\n return undefined;\n}\n","import BaseEvent from 'ol/events/Event.js';\nimport EventType from 'ol/events/EventType.js';\nimport MVT from 'ol/format/MVT.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource from 'ol/source/VectorTile.js';\nimport {applyBackground, applyStyle} from './apply.js';\n\n/** @typedef {import(\"ol/Map.js\").default} Map */\n\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nclass ErrorEvent extends BaseEvent {\n /**\n * @param {Error} error error object.\n */\n constructor(error) {\n super(EventType.ERROR);\n\n /**\n * @type {Error}\n */\n this.error = error;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} [accessToken] The access token for your Mapbox style. This has to be provided\n * for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query\n * parameter of the style url.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source. The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array} [layers] Limit rendering to the list of included layers. All layers\n * must share the same vector source. If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n *\n * As an optimization decluttered features from layers with the same `className` are rendered above\n * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this\n * behavior and place declutterd features with their own layer configure the layer with a `className`\n * other than `ol-layer`.\n * @property {import(\"ol/layer/Base.js\").BackgroundColor|false} [background] Background color for the layer.\n * If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent\n * the Mapbox style's background from being used.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"ol/extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will\n * match the style source's `minzoom`.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will\n * be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match\n * the style source's `minzoom`.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"ol/render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"ol/layer/VectorTile.js\").VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles:\n * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views.\n * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n * tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n * another layer with the same source).\n * @property {import(\"ol/Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use `map.addLayer()`.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * ```js\n * import {MapboxVectorLayer} from 'ol-mapbox-style';\n * ```\n * A vector tile layer based on a Mapbox style that uses a single vector source. Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source. If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source). See the constructor options for\n * more detail.\n *\n * const map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1,\n * }),\n * layers: [\n * new MapboxVectorLayer({\n * styleUrl: 'mapbox://styles/mapbox/bright-v9',\n * accessToken: 'your-mapbox-access-token-here',\n * }),\n * ],\n * target: 'map',\n * });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event. Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * **Note for users of the full build**: The `MapboxVectorLayer` requires the\n * [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) library to be loaded as well.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nexport default class MapboxVectorLayer extends VectorTileLayer {\n /**\n * @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken`\n * must be provided.\n */\n constructor(options) {\n const declutter = 'declutter' in options ? options.declutter : true;\n const source = new VectorTileSource({\n state: 'loading',\n format: new MVT(),\n });\n\n super({\n source: source,\n background: options.background,\n declutter: declutter,\n className: options.className,\n opacity: options.opacity,\n visible: options.visible,\n zIndex: options.zIndex,\n minResolution: options.minResolution,\n maxResolution: options.maxResolution,\n minZoom: options.minZoom,\n maxZoom: options.maxZoom,\n renderOrder: options.renderOrder,\n renderBuffer: options.renderBuffer,\n renderMode: options.renderMode,\n map: options.map,\n updateWhileAnimating: options.updateWhileAnimating,\n updateWhileInteracting: options.updateWhileInteracting,\n preload: options.preload,\n useInterimTilesOnError: options.useInterimTilesOnError,\n properties: options.properties,\n });\n\n if (options.accessToken) {\n this.accessToken = options.accessToken;\n }\n const url = options.styleUrl;\n const promises = [\n applyStyle(this, url, options.layers || options.source, {\n accessToken: this.accessToken,\n }),\n ];\n if (this.getBackground() === undefined) {\n promises.push(\n applyBackground(this, options.styleUrl, {\n accessToken: this.accessToken,\n })\n );\n }\n Promise.all(promises)\n .then(() => {\n source.setState('ready');\n })\n .catch((error) => {\n this.dispatchEvent(new ErrorEvent(error));\n const source = this.getSource();\n source.setState('error');\n });\n }\n}\n"],"names":["kCSSColorTable","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clamp_css_byte","i","Math","round","clamp_css_float","f","parse_css_int","str","length","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","h","exports","css_str","iv","replace","toLowerCase","slice","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","e","Color","constructor","r","g","b","a","this","parse","input","rgba","parseCSSColor","toString","toArray","toArray01","toArray01PremultipliedAlpha","Color$1","convertLiteral","value","convertFunction","parameters","propertySpec","stops","get","property","undefined","default","type","Object","keys","values","expression","splice","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","zoomDependent","map","stop","tokens","convertTokenString","featureFunctionParameters","featureFunctionStops","zoomStops","zoom","push","functionType","getFunctionType","getInterpolateOperator","z","appendStopPair","convertPropertyFunction","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","Error","base","convertZoomFunction","colorSpace","getFallback","defaultValue","curve","output","interpolated","result","re","pos","match","exec","literal","lastIndex","ParsingError","key","message","super","ParsingError$1","Scope","parent","bindings","name","concat","has","Scope$1","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","array","itemType","N","valueMemberTypes","checkSubtype","expected","t","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","Array","isArray","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","image","scale","fontStack","textColor","normalize","Formatted","sections","static","unformatted","isEmpty","section","fromString","join","serialize","serialized","options","ResolvedImage","available","validateRGBA","isValue","mixed","item","typeOf","String","JSON","stringify","Literal","args","context","error","expectedType","evaluate","eachChild","outputDefined","Literal$1","RuntimeError$1","toJSON","types","string","number","boolean","object","Assertion","floor","parsed","ctx","RuntimeError","fn","forEach","every","arg","Assertion$1","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","Boolean","c","parseColor","num","Number","isNaN","valueToString","child","Coercion$1","geometryTypes","EvaluationContext$1","globals","feature","featureState","formattedSection","_parseColorCache","canonical","featureTileCoord","featureDistanceData","id","geometryType","geometry","canonicalID","properties","distanceFromCenter","center","x","y","dX","dY","bearing","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","filter","signature","signatureContext","ParsingContext","registry","path","scope","parsedArgs","argParseFailed","errors","signatures","stringifySignature","actualTypes","CompoundExpression$1","CollatorExpression","EXTENT","updateBBox","bbox","coord","min","max","boxWithinBox","bbox1","bbox2","getTileCoordinates","p","lng","lat","PI","log","tilesAtZoom","pow","onBoundary","p1","p2","x1","y1","x2","y2","pointWithinPolygon","point","rings","inside","len","ring","j","len2","pointWithinPolygons","polygons","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectLine","d","vectorP","vectorQ","v1","v2","lineIntersectPolygon","polygon","lineStringWithinPolygon","line","lineStringWithinPolygons","getTilePolygon","coordinates","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","Infinity","Within","geojson","geometries","features","polygonGeometry","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","Within$1","isFeatureConstant","test","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","Var$1","part","expr","index","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","EvaluationContext","k","ParsingContext$1","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","currentValue","nextValue","lowerIndex","upperIndex","currentIndex","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","out","Step$1","module","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","prototype","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","abs","d2","solve","from","to","Xn","Yn","Zn","t3","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","lab","forward","reverse","interpolate","interpolateNumber","hcl","atan2","sqrt","hclColor","cos","sin","Interpolate","operator","interpolation","lower","upper","exponentialInterpolation","controlPoints","rest","interpolationFactor","outputLower","outputUpper","lowerValue","upperValue","difference","progress","Interpolate$1","Coalesce","needsAnnotation","firstImage","argCount","Coalesce$1","Let","binding","Let$1","At","At$1","In","needle","haystack","In$1","IndexOf","fromIndex","IndexOf$1","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","sortedLabels","sort","groupedByOutput","outputLookup","outputIndex","coerceLabel","Match$1","Case","branches","_","Case$1","Slice","beginIndex","endIndex","Slice$1","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","lt","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","unit","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","format","Length","expressions","at","case","coalesce","in","let","step","var","within","obj","v","varargs","register","typeof","typeToString","rgb","pitch","heatmapDensity","lineProgress","skyRadialProgress","accumulated","ln2","LN2","pi","E","log10","n","LN10","ln","log2","asin","acos","atan","ceil","m","binarySearch","all","any","isSupportedScript","upcase","toUpperCase","downcase","success","isFunction","StyleExpression","_warningHistory","_evaluator","_defaultValue","spec","getDefaultValue","_enumValues","evaluateWithoutErrorHandling","val","console","warn","createExpression","parser","color","enum","formatted","resolvedImage","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","interpolationType","createPropertyExpression","supportsPropertyExpression","isZoomConstant","supportsZoomExpression","zoomCurve","findZoomCurve","supportsInterpolation","childResult","deepUnbundle","unbundledValue","valueOf","unbundle","$version","$root","version","required","metadata","period","units","light","terrain","fog","sources","sprite","glyphs","transition","projection","layers","source","source_vector","vector","url","tiles","bounds","scheme","xyz","tms","minzoom","maxzoom","attribution","promoteId","volatile","source_raster","raster","tileSize","source_raster_dem","encoding","terrarium","mapbox","source_geojson","data","buffer","maximum","minimum","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","source_video","video","urls","source_image","layer","fill","symbol","circle","heatmap","hillshade","background","sky","layout","paint","layout_background","visibility","visible","none","layout_sky","layout_fill","layout_circle","layout_heatmap","private","layout_line","butt","square","bevel","miter","requires","layout_symbol","auto","viewport","width","height","both","left","right","top","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_symbol","filter_fill","filter_line","filter_circle","filter_heatmap","filter_operator","geometry_type","Point","LineString","Polygon","function","identity","exponential","interval","categorical","function_stop","expression_name","group","distance","range","anchor","position","intensity","albers","equalEarth","equirectangular","lambertConformalConic","mercator","naturalEarth","winkelTripel","globe","parallels","exaggeration","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","linear","nearest","paint_hillshade","paint_background","paint_sky","gradient","atmosphere","duration","delay","constant","isExpressionFilter","createFilter","layerType","needGeometry","needFeature","convertFilter","filterExp","staticFilter","isDynamicFilter","unionDynamicBranches","collapseDynamicBooleanExpressions","extractStaticFilter","filterSpec","latest","compiledStaticFilter","filterFunc","err","globalProperties","dynamicFilterFunc","compiledDynamicFilter","dynamicFilter","geometryNeeded","collapsed","dynamicConditionExpressions","collapsedExpression","subExpression","isBranchingDynamically","Set","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","refProperties","deref","derefLayers","create","ref","fontWeights","thin","hairline","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","sp","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","ii","parts","maybeWeight","w","previousPart","startsWith","fontFamily","mapboxBaseUrl","getMapboxPath","normalizeStyleUrl","token","mapboxPath","decodeURI","URL","location","href","normalizeSourceUrl","tokenParam","styleUrl","urlObject","searchParams","set","window","devicePixelRatio","functionCacheByStyleId","filterCacheByStyleId","styleId","getStyleId","glStyle","getStyleFunctionKey","olLayer","getUid","getFunctionCache","functionCache","getFilterCache","filterCache","degrees","defaultResolutions","resolutions","res","createCanvas","WorkerGlobalScope","self","OffscreenCanvas","canvas","document","createElement","getZoomForResolution","resolution","zoomFactor","pendingRequests","fetchResource","resourceType","request","transformedRequest","transformRequest","Request","headers","pendingRequest","fetch","then","response","ok","json","Promise","reject","catch","getGlStyle","glStyleOrUrl","resolve","trim","accessToken","tilejsonCache","getTileJson","glSource","cacheKey","promise","tileLoadFunction","tile","src","VectorTile","setLoader","extent","arrayBuffer","getFormat","readFeatures","featureProjection","setFeatures","setState","TileState","ERROR","img","getImage","blob","createObjectURL","addEventListener","revokeObjectURL","normalizedSourceUrl","accessTokenParam","tileJson","assign","expandUrl","tileUrl","drawIconHalo","spriteImage","spriteImageData","haloWidth","haloColor","imageCanvas","imgSize","pixelRatio","imageContext","getContext","drawImage","imageData","getImageData","globalCompositeOperation","fillStyle","jj","arc","smoothstep","drawSDF","area","gamma","putImageData","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","lines","joinSpaceString","ll","measureContext","getMeasureContext","measureText","measureCache","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","prevWidth","nextWidth","next","lineWords","lastWord","fontFamilyRegEx","stripQuotesRegEx","loadedFontFamilies","hasFontFamily","family","styleSheets","styleSheet","cssRules","rules","cssRule","cssText","processedFontFamilies","getFonts","templateUrl","fontsKey","fontDescriptions","cssFont","mb2css","registerFont","fontDescription","checkedFonts","fontUrl","querySelector","markup","rel","head","appendChild","MultiPoint","MultiLineString","MultiPolygon","expressionData","rawExpression","compiledExpression","emptyObj","zoomObj","renderFeatureCoordinates","renderFeature","getValue","layoutOrPaint","layerId","functions","isExpr","bind","getIconDeclutterMode","evaluateFilter","renderTransparentEnabled","colorWithOpacity","opacity","templateRegEx","fromTemplate","recordLayer","styleFunctionArgs","stylefunction","sourceOrLayers","spriteData","spriteImageUrl","spriteImageSize","spriteImageUnSDFed","arguments","Image","blobUrl","crossOrigin","onload","changed","worker","postMessage","action","event","allLayers","layersBySourceLayer","mapboxLayers","iconImageCache","patternCache","mapboxSource","sourceLayer","textHalo","Stroke","Fill","styles","styleFunction","onlyLayer","getProperties","getGeometry","getType","getId","featureBelongsToLayer","stylesLength","layerData","stroke","strokeColor","fillIcon","icon","getFill","getStroke","getText","Style","setZIndex","icon_cache_key","pattern","globalAlpha","createPattern","setColor","setWidth","setLineCap","setLineJoin","setMiterLimit","setLineDash","iconImg","skipLabel","textLineHeight","textSize","maxTextWidth","hasImage","placementAngle","iconImage","styleGeom","imageElement","iconRotationAlignment","geom","getFlatMidpoint","getFlatMidpoints","getExtent","midpoint","NaN","RenderFeature","stride","getStride","getFlatCoordinates","minX","minY","maxX","maxY","iconSize","iconColor","iconCacheKey","declutterMode","displacement","iconOptions","rotateWithView","Icon","offset","sdf","setGeometry","setRotation","setOpacity","setAnchor","setImage","setText","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","radius","fontArray","includes","textField","reduce","acc","chunk","chunkFont","Text","padding","textTransform","wrappedLabel","setFont","textAnchor","placement","textAlign","setPlacement","setRepeat","symbolSpacing","setOverflow","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textRotationAlignment","setRotateWithView","setMaxAngle","setTextAlign","textBaseline","setTextBaseline","textJustify","setJustify","setOffsetX","setOffsetY","setFill","halfTextSize","setStroke","textPadding","getPadding","setStyle","inputs","elevationImage","elevationData","shadeData","Uint8ClampedArray","dp","pixel","twoPi","halfPi","sunEl","sunAz","cosSunEl","sinSunEl","highlightColor","shadowColor","accentColor","pixelX","pixelY","x0","y0","z0","z1","dzdx","dzdy","slope","aspect","accent","scaled","shade","scaledAccentColor","compositeShadeColor","clamp","slopeScaleBase","scaledSlope","cosIncidence","calculateElevation","vert","ImageData","getTileResolutions","createXYZ","maxZoom","getResolutions","completeOptions","applyStyle","sourceOrLayersOrOptions","optionsOrPath","sourceId","updateSource","VectorLayer","VectorTileLayer","find","assignSource","setupVectorSource","targetSource","getSource","setTileUrlFunction","getTileUrlFunction","setUrls","getUrls","format_","getAttributions","setAttributions","getTileLoadFunction","defaultLoadFunction","setTileLoadFunction","equivalent","getProjection","tileGrid","getTileGrid","setSource","isFinite","getMaxResolution","getMinZoom","setMaxResolution","getResolution","setupGeoJSONSource","url_","getUrl","spriteScale","onChange","getUnits","METERS_PER_UNIT","applyStyleFunction","getStyle","normalizeSpriteUrl","sizeFactor","spriteUrl","origin","pathname","search","spritesJson","transformed","applyBackground","mapOrLayer","Layer","setBackground","getBackgroundColor","Map","LayerGroup","getLayers","setupBackgroundLayer","setFirstBackground","getSourceIdByRef","sourceOptionsFromTileJSON","tileJSON","tileJSONSource","TileJSON","tileJSONDoc","getTileJSON","fromLonLat","tr","extentFromTileJSON","projectionExtent","minZoom","sourceOptions","attributions","TileGrid","getTopLeft","getOrigin","getTileSize","glLayer","bg","_colorWithOpacity","div","className","Source","render","frameState","viewState","backgroundColor","MVT","VectorTileSource","getBboxTemplate","getCode","setupRasterLayer","TileLayer","getTileUrl","tileCoord","bboxTemplate","getTileCoordExtent","geoJsonFormat","GeoJSON","dataProjection","geoJsonUrl","extentUrl","VectorSource","loader","failure","addFeatures","removeLoadedExtent","strategy","bboxStrategy","getUserProjection","prerenderRasterLayer","updateRasterLayerProperties","setupLayer","glLayers","declutter","setupVectorLayer","setVisible","on","setupGeoJSONLayer","hillshadeLayer","tileLayer","ImageLayer","Raster","operationType","operation","setupHillshadeLayer","glSourceId","processStyle","mapOrGroup","promises","view","getView","isDef","getRotation","View","maxResolution","setView","getCenter","setCenter","getZoom","setResolution","fit","getSize","layerIds","finalizeLayer","apply","mapOrGroupOrElement","HTMLElement","target","getState","sourceMinZoom","setMinResolution","layerMapboxLayerids","mapboxLayer","manageVisibility","getArray","once","getMapboxLayer","getLayer","ErrorEvent","BaseEvent","EventType","MapboxVectorLayer","state","zIndex","minResolution","renderOrder","renderBuffer","renderMode","updateWhileAnimating","updateWhileInteracting","preload","useInterimTilesOnError","getBackground","dispatchEvent","beforeLayerId","spliceIndex","sourceOffset","sourceIndex","beforeMapboxLayer","beforeLayer","beforeLayerIndex","insertAt","sourceLayerId","layerIndex","evaluateStyle","getStyleFunction","record","mapboxLayerIdOrLayer","mapboxLayerId","layerMapboxLayers","findIndex","applyStylefunction","enabled","clearFunctionCache"],"mappings":"w1FAuBIA,GAAiB,CACnBC,YAAe,CAAC,EAAE,EAAE,EAAE,GAAIC,UAAa,CAAC,IAAI,IAAI,IAAI,GACpDC,aAAgB,CAAC,IAAI,IAAI,IAAI,GAAIC,KAAQ,CAAC,EAAE,IAAI,IAAI,GACpDC,WAAc,CAAC,IAAI,IAAI,IAAI,GAAIC,MAAS,CAAC,IAAI,IAAI,IAAI,GACrDC,MAAS,CAAC,IAAI,IAAI,IAAI,GAAIC,OAAU,CAAC,IAAI,IAAI,IAAI,GACjDC,MAAS,CAAC,EAAE,EAAE,EAAE,GAAIC,eAAkB,CAAC,IAAI,IAAI,IAAI,GACnDC,KAAQ,CAAC,EAAE,EAAE,IAAI,GAAIC,WAAc,CAAC,IAAI,GAAG,IAAI,GAC/CC,MAAS,CAAC,IAAI,GAAG,GAAG,GAAIC,UAAa,CAAC,IAAI,IAAI,IAAI,GAClDC,UAAa,CAAC,GAAG,IAAI,IAAI,GAAIC,WAAc,CAAC,IAAI,IAAI,EAAE,GACtDC,UAAa,CAAC,IAAI,IAAI,GAAG,GAAIC,MAAS,CAAC,IAAI,IAAI,GAAG,GAClDC,eAAkB,CAAC,IAAI,IAAI,IAAI,GAAIC,SAAY,CAAC,IAAI,IAAI,IAAI,GAC5DC,QAAW,CAAC,IAAI,GAAG,GAAG,GAAIC,KAAQ,CAAC,EAAE,IAAI,IAAI,GAC7CC,SAAY,CAAC,EAAE,EAAE,IAAI,GAAIC,SAAY,CAAC,EAAE,IAAI,IAAI,GAChDC,cAAiB,CAAC,IAAI,IAAI,GAAG,GAAIC,SAAY,CAAC,IAAI,IAAI,IAAI,GAC1DC,UAAa,CAAC,EAAE,IAAI,EAAE,GAAIC,SA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gQ,SAAW0tB,EAAY1tB,OAClC,MAAM,IAAIlhB,MACR,uEAGGgvB,GAAiBJ,GAASggB,EAAYrlC,WACtC2lB,GAAeN,GAASggB,EAAYrlC,IAC3CoxB,EAAazpB,GAAS09B,EACtB,MAAM5oC,EACJwzB,GACE3K,GACEse,EAAWnvC,IAAI,gBACfixC,GAAS9B,EAAYyB,EAAYrlC,MAGnCvD,EACFmrC,GAAmB/C,WAAMlwC,EAAW8H,GAEpCipC,GAAS9B,EAAYyB,EAAYrlC,IAAI6wB,SA5BkB"} \ No newline at end of file diff --git a/dist/shaders.d.ts b/dist/shaders.d.ts new file mode 100644 index 00000000..c8bc67cc --- /dev/null +++ b/dist/shaders.d.ts @@ -0,0 +1,8 @@ +/** + * Generates a shaded relief image given elevation data. Uses a 3x3 + * neighborhood for determining slope and aspect. + * @param {Array} inputs Array of input images. + * @param {Object} data Data added in the "beforeoperations" event. + * @return {ImageData} Output image. + */ +export function hillshade(inputs: Array, data: any): ImageData; diff --git a/dist/stylefunction.d.ts b/dist/stylefunction.d.ts new file mode 100644 index 00000000..d53982ea --- /dev/null +++ b/dist/stylefunction.d.ts @@ -0,0 +1,136 @@ +/** + * @private + * @param {Object} layer Gl object layer. + * @param {string} layoutOrPaint 'layout' or 'paint'. + * @param {string} property Feature property. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @param {Object} [featureState] Feature state. + * @return {?} Value. + */ +export function getValue(layer: any, layoutOrPaint: string, property: string, zoom: number, feature: any, functionCache?: any, featureState?: any): unknown; +/** + * Configure whether features with a transparent style should be rendered. When + * set to `true`, it will be possible to hit detect content that is not visible, + * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or + * `ol/Map#getFeaturesAtPixel()` + * @param {boolean} enabled Rendering of transparent elements is enabled. + * Default is `false`. + */ +export function renderTransparent(enabled: boolean): void; +/** + * Turns recording of the Mapbox Style's `layer` on and off. When turned on, + * the layer that a rendered feature belongs to will be set as the feature's + * `mapbox-layer` property. + * @param {boolean} record Recording of the style layer is on. + */ +export function recordStyleLayer(record?: boolean): void; +/** + * Creates a style function from the `glStyle` object for all layers that use + * the specified `source`, which needs to be a `"type": "vector"` or + * `"type": "geojson"` source and applies it to the specified OpenLayers layer. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function also works in a web worker. In worker mode, the main thread needs + * to listen to messages from the worker and respond with another message to make + * sure that sprite image loading works: + * + * ```js + * worker.addEventListener('message', event => { + * if (event.data.action === 'loadImage') { + * const image = new Image(); + * image.crossOrigin = 'anonymous'; + * image.addEventListener('load', function() { + * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { + * worker.postMessage({ + * action: 'imageLoaded', + * image: imageBitmap, + * src: event.data.src + * }, [imageBitmap]); + * }); + * }); + * image.src = event.data.src; + * } + * }); + * ``` + * + * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to + * apply the style to. In addition to the style, the layer will get two + * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used + * for the layer, and `mapbox-layers` will be an array of the `id`s of the + * `glStyle`'s layers. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array} sourceOrLayers `source` key or an array of layer `id`s + * from the Mapbox Style object. When a `source` key is provided, all layers for + * the specified source will be included in the style function. When layer `id`s + * are provided, they must be from layers that use the same source. + * @param {Array} resolutions + * Resolutions for mapping resolution to zoom level. + * @param {Object} spriteData Sprite data from the url specified in + * the Mapbox Style object's `sprite` property. Only required if a `sprite` + * property is specified in the Mapbox Style object. + * @param {string|Request} spriteImageUrl Sprite image url for the sprite + * specified in the Mapbox Style object's `sprite` property. Only required if a + * `sprite` property is specified in the Mapbox Style object. + * @param {function(Array, string=):Array} getFonts Function that + * receives a font stack and the url template from the GL style's `metadata['ol:webfonts']` + * property (if set) as arguments, and returns a (modified) font stack that + * is available. Font names are the names used in the Mapbox Style object. If + * not provided, the font stack will be used as-is. This function can also be + * used for loading web fonts. + * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function can be used for icons not in the sprite or to override sprite icons. + * @return {StyleFunction} Style function for use in + * `ol.layer.Vector` or `ol.layer.VectorTile`. + */ +export function stylefunction(olLayer: import("ol/layer/Vector").default | VectorTileLayer, glStyle: string | any, sourceOrLayers: string | Array, resolutions?: Array, spriteData?: any, spriteImageUrl?: string | Request, getFonts?: (arg0: Array, arg1: string | undefined) => Array, getImage?: ((arg0: import("ol/layer/Vector").default | VectorTileLayer, arg1: string) => HTMLImageElement | HTMLCanvasElement | string | undefined) | undefined, ...args: any[]): StyleFunction; +/** + * Get the the style for a specific Mapbox layer only. This can be useful for creating a legend. + * @param {import("ol/Feature").default|import("ol/render/Feature").default} feature OpenLayers feature. + * @param {number} resolution View resolution. + * @param {import("ol/layer").Vector|import("ol/layer").VectorTile} olLayer OpenLayers layer. + * @param {string} layerId Id of the Mapbox layer to get the style for + * @return {Array} Styles for the provided Mapbox layer. + */ +export function getStyleForLayer(feature: import("ol/Feature").default | import("ol/render/Feature").default, resolution: number, olLayer: import("ol/layer/Vector").default | import("ol/layer").VectorTile, layerId: string): Array; +export const styleFunctionArgs: {}; +export type VectorLayer = import("ol/layer/Vector").default; +export type VectorTileLayer = import("ol/layer/VectorTile").default; +export type StyleFunction = import("ol/style/Style").StyleFunction; +export type ResourceType = import('./util.js').ResourceType; +/** + * @private + * @param {?} color Color. + * @param {number} [opacity] Opacity. + * @return {string} Color. + */ +declare function colorWithOpacity(color: unknown, opacity?: number | undefined): string; +/** + * @private + * @param {string} layerId Layer id. + * @param {?} filter Filter. + * @param {Object} feature Feature. + * @param {number} zoom Zoom. + * @param {Object} [filterCache] Filter cache. + * @return {boolean} Filter result. + */ +declare function evaluateFilter(layerId: string, filter: unknown, feature: any, zoom: number, filterCache?: any): boolean; +/** + * @private + * @param {string} text Text. + * @param {Object} properties Properties. + * @return {string} Text. + */ +declare function fromTemplate(text: string, properties: any): string; +export { colorWithOpacity as _colorWithOpacity, evaluateFilter as _evaluateFilter, fromTemplate as _fromTemplate, getValue as _getValue }; diff --git a/dist/text.d.ts b/dist/text.d.ts new file mode 100644 index 00000000..2e57444a --- /dev/null +++ b/dist/text.d.ts @@ -0,0 +1,9 @@ +export function applyLetterSpacing(text: any, letterSpacing: any): any; +export function wrapText(text: any, font: any, em: any, letterSpacing: any): any; +/** + * @param {Array} fonts Fonts. + * @param {string} [templateUrl] Template URL. + * @return {Array} Processed fonts. + * @private + */ +export function getFonts(fonts: any[], templateUrl?: string | undefined): any[]; diff --git a/dist/util.d.ts b/dist/util.d.ts new file mode 100644 index 00000000..d2bcd5af --- /dev/null +++ b/dist/util.d.ts @@ -0,0 +1,89 @@ +export function getStyleId(glStyle: any): any; +export function getStyleFunctionKey(glStyle: any, olLayer: any): string; +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Function cache. + */ +export function getFunctionCache(glStyle: any): any; +export function clearFunctionCache(): void; +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Filter cache. + */ +export function getFilterCache(glStyle: any): any; +export function deg2rad(degrees: any): number; +/** + * @param {number} width Width of the canvas. + * @param {number} height Height of the canvas. + * @return {HTMLCanvasElement} Canvas. + */ +export function createCanvas(width: number, height: number): HTMLCanvasElement; +export function getZoomForResolution(resolution: any, resolutions: any): number; +/** + * @param {ResourceType} resourceType Type of resource to load. + * @param {string} url Url of the resource. + * @param {Options} [options={}] Options. + * @param {{request?: Request}} [metadata] Object to be filled with the request. + * @return {Promise} Promise that resolves with the loaded resource + * or rejects with the Response object. + * @private + */ +export function fetchResource(resourceType: ResourceType, url: string, options?: import("./apply.js").Options | undefined, metadata?: { + request?: Request | undefined; +} | undefined): Promise; +export function getGlStyle(glStyleOrUrl: any, options: any): Promise; +/** + * @param {Object} glSource glStyle source object. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Promise<{tileJson: Object, tileLoadFunction: import('ol/Tile.js').LoadFunction}?>} TileJson and load function + */ +export function getTileJson(glSource: any, styleUrl: string, options?: Options): Promise<{ + tileJson: any; + tileLoadFunction: import('ol/Tile.js').LoadFunction; +} | null>; +/** + * @param {HTMLImageElement|HTMLCanvasElement} spriteImage Sprite image id. + * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data. + * @param {number} haloWidth Halo width. + * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color. + * @return {HTMLCanvasElement} Canvas element with the halo. + */ +export function drawIconHalo(spriteImage: HTMLImageElement | HTMLCanvasElement, spriteImageData: { + x: number; + y: number; + width: number; + height: number; + pixelRatio: number; +}, haloWidth: number, haloColor: { + r: number; + g: number; + b: number; + a: number; +}): HTMLCanvasElement; +/** + * @param {HTMLImageElement} image SDF image + * @param {{x: number, y: number, width: number, height: number}} area Area to unSDF + * @param {{r: number, g: number, b: number, a: number}} color Color to use + * @return {HTMLCanvasElement} Regular image + */ +export function drawSDF(image: HTMLImageElement, area: { + x: number; + y: number; + width: number; + height: number; +}, color: { + r: number; + g: number; + b: number; + a: number; +}): HTMLCanvasElement; +export const defaultResolutions: number[]; +export type ResourceType = 'Style' | 'Source' | 'Sprite' | 'SpriteImage' | 'Tiles' | 'GeoJSON'; +export type Map = import("ol").Map; +export type Layer = import("ol/layer").Layer; +export type LayerGroup = import("ol/layer").Group; +export type VectorLayer = import("ol/layer/Vector.js").default; +export type VectorTileLayer = import("ol/layer").VectorTile; +export type Source = import("ol/source").Source; +export type Options = import("./apply.js").Options;