{"version":3,"file":"gl-style-migrate.cjs","names":["latest","stringifyPretty","Reference","Reference.layout","Reference.paint","types","expressions","expressions"],"sources":["../node_modules/minimist/index.js","../src/reference/v8.json","../node_modules/json-stringify-pretty-compact/index.js","../src/format.ts","../src/visit.ts","../src/migrate/v8.ts","../src/expression/types.ts","../src/expression/types/color_spaces.ts","../src/util/get_own.ts","../src/expression/types/parse_css_color.ts","../src/util/interpolate-primitives.ts","../src/expression/types/color.ts","../src/expression/types/collator.ts","../src/expression/types/formatted.ts","../src/expression/types/padding.ts","../src/expression/types/number_array.ts","../src/expression/types/color_array.ts","../src/expression/runtime_error.ts","../src/expression/types/variable_anchor_offset_collection.ts","../src/expression/types/resolved_image.ts","../src/expression/types/projection_definition.ts","../src/expression/values.ts","../src/expression/definitions/literal.ts","../src/expression/definitions/assertion.ts","../src/expression/definitions/coercion.ts","../src/expression/definitions/let.ts","../src/expression/definitions/var.ts","../src/expression/definitions/at.ts","../src/expression/definitions/in.ts","../src/expression/definitions/index_of.ts","../src/expression/definitions/match.ts","../src/expression/definitions/case.ts","../src/expression/definitions/slice.ts","../src/expression/stops.ts","../src/expression/definitions/step.ts","../node_modules/@mapbox/unitbezier/index.js","../src/expression/definitions/interpolate.ts","../src/expression/definitions/coalesce.ts","../src/expression/definitions/comparison.ts","../src/expression/definitions/collator.ts","../src/expression/definitions/number_format.ts","../src/expression/definitions/format.ts","../src/expression/definitions/image.ts","../src/expression/definitions/length.ts","../src/util/geometry_util.ts","../src/expression/definitions/within.ts","../node_modules/tinyqueue/index.js","../node_modules/quickselect/index.js","../src/util/classify_rings.ts","../src/util/cheap_ruler.ts","../src/expression/definitions/distance.ts","../src/expression/definitions/global_state.ts","../src/expression/definitions/index.ts","../src/expression/index.ts","../src/function/convert.ts","../src/feature_filter/index.ts","../src/feature_filter/convert.ts","../src/migrate/expressions.ts","../src/migrate/migrate_colors.ts","../src/migrate.ts","../bin/gl-style-migrate.ts"],"sourcesContent":["'use strict';\n\nfunction hasKey(obj, keys) {\n\tvar o = obj;\n\tkeys.slice(0, -1).forEach(function (key) {\n\t\to = o[key] || {};\n\t});\n\n\tvar key = keys[keys.length - 1];\n\treturn key in o;\n}\n\nfunction isNumber(x) {\n\tif (typeof x === 'number') { return true; }\n\tif ((/^0x[0-9a-f]+$/i).test(x)) { return true; }\n\treturn (/^[-+]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(e[-+]?\\d+)?$/).test(x);\n}\n\nfunction isConstructorOrProto(obj, key) {\n\treturn (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__';\n}\n\nmodule.exports = function (args, opts) {\n\tif (!opts) { opts = {}; }\n\n\tvar flags = {\n\t\tbools: {},\n\t\tstrings: {},\n\t\tunknownFn: null,\n\t};\n\n\tif (typeof opts.unknown === 'function') {\n\t\tflags.unknownFn = opts.unknown;\n\t}\n\n\tif (typeof opts.boolean === 'boolean' && opts.boolean) {\n\t\tflags.allBools = true;\n\t} else {\n\t\t[].concat(opts.boolean).filter(Boolean).forEach(function (key) {\n\t\t\tflags.bools[key] = true;\n\t\t});\n\t}\n\n\tvar aliases = {};\n\n\tfunction aliasIsBoolean(key) {\n\t\treturn aliases[key].some(function (x) {\n\t\t\treturn flags.bools[x];\n\t\t});\n\t}\n\n\tObject.keys(opts.alias || {}).forEach(function (key) {\n\t\taliases[key] = [].concat(opts.alias[key]);\n\t\taliases[key].forEach(function (x) {\n\t\t\taliases[x] = [key].concat(aliases[key].filter(function (y) {\n\t\t\t\treturn x !== y;\n\t\t\t}));\n\t\t});\n\t});\n\n\t[].concat(opts.string).filter(Boolean).forEach(function (key) {\n\t\tflags.strings[key] = true;\n\t\tif (aliases[key]) {\n\t\t\t[].concat(aliases[key]).forEach(function (k) {\n\t\t\t\tflags.strings[k] = true;\n\t\t\t});\n\t\t}\n\t});\n\n\tvar defaults = opts.default || {};\n\n\tvar argv = { _: [] };\n\n\tfunction argDefined(key, arg) {\n\t\treturn (flags.allBools && (/^--[^=]+$/).test(arg))\n\t\t\t|| flags.strings[key]\n\t\t\t|| flags.bools[key]\n\t\t\t|| aliases[key];\n\t}\n\n\tfunction setKey(obj, keys, value) {\n\t\tvar o = obj;\n\t\tfor (var i = 0; i < keys.length - 1; i++) {\n\t\t\tvar key = keys[i];\n\t\t\tif (isConstructorOrProto(o, key)) { return; }\n\t\t\tif (o[key] === undefined) { o[key] = {}; }\n\t\t\tif (\n\t\t\t\to[key] === Object.prototype\n\t\t\t\t|| o[key] === Number.prototype\n\t\t\t\t|| o[key] === String.prototype\n\t\t\t) {\n\t\t\t\to[key] = {};\n\t\t\t}\n\t\t\tif (o[key] === Array.prototype) { o[key] = []; }\n\t\t\to = o[key];\n\t\t}\n\n\t\tvar lastKey = keys[keys.length - 1];\n\t\tif (isConstructorOrProto(o, lastKey)) { return; }\n\t\tif (\n\t\t\to === Object.prototype\n\t\t\t|| o === Number.prototype\n\t\t\t|| o === String.prototype\n\t\t) {\n\t\t\to = {};\n\t\t}\n\t\tif (o === Array.prototype) { o = []; }\n\t\tif (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') {\n\t\t\to[lastKey] = value;\n\t\t} else if (Array.isArray(o[lastKey])) {\n\t\t\to[lastKey].push(value);\n\t\t} else {\n\t\t\to[lastKey] = [o[lastKey], value];\n\t\t}\n\t}\n\n\tfunction setArg(key, val, arg) {\n\t\tif (arg && flags.unknownFn && !argDefined(key, arg)) {\n\t\t\tif (flags.unknownFn(arg) === false) { return; }\n\t\t}\n\n\t\tvar value = !flags.strings[key] && isNumber(val)\n\t\t\t? Number(val)\n\t\t\t: val;\n\t\tsetKey(argv, key.split('.'), value);\n\n\t\t(aliases[key] || []).forEach(function (x) {\n\t\t\tsetKey(argv, x.split('.'), value);\n\t\t});\n\t}\n\n\tObject.keys(flags.bools).forEach(function (key) {\n\t\tsetArg(key, defaults[key] === undefined ? false : defaults[key]);\n\t});\n\n\tvar notFlags = [];\n\n\tif (args.indexOf('--') !== -1) {\n\t\tnotFlags = args.slice(args.indexOf('--') + 1);\n\t\targs = args.slice(0, args.indexOf('--'));\n\t}\n\n\tfor (var i = 0; i < args.length; i++) {\n\t\tvar arg = args[i];\n\t\tvar key;\n\t\tvar next;\n\n\t\tif ((/^--.+=/).test(arg)) {\n\t\t\t// Using [\\s\\S] instead of . because js doesn't support the\n\t\t\t// 'dotall' regex modifier. See:\n\t\t\t// http://stackoverflow.com/a/1068308/13216\n\t\t\tvar m = arg.match(/^--([^=]+)=([\\s\\S]*)$/);\n\t\t\tkey = m[1];\n\t\t\tvar value = m[2];\n\t\t\tif (flags.bools[key]) {\n\t\t\t\tvalue = value !== 'false';\n\t\t\t}\n\t\t\tsetArg(key, value, arg);\n\t\t} else if ((/^--no-.+/).test(arg)) {\n\t\t\tkey = arg.match(/^--no-(.+)/)[1];\n\t\t\tsetArg(key, false, arg);\n\t\t} else if ((/^--.+/).test(arg)) {\n\t\t\tkey = arg.match(/^--(.+)/)[1];\n\t\t\tnext = args[i + 1];\n\t\t\tif (\n\t\t\t\tnext !== undefined\n\t\t\t\t&& !(/^(-|--)[^-]/).test(next)\n\t\t\t\t&& !flags.bools[key]\n\t\t\t\t&& !flags.allBools\n\t\t\t\t&& (aliases[key] ? !aliasIsBoolean(key) : true)\n\t\t\t) {\n\t\t\t\tsetArg(key, next, arg);\n\t\t\t\ti += 1;\n\t\t\t} else if ((/^(true|false)$/).test(next)) {\n\t\t\t\tsetArg(key, next === 'true', arg);\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\tsetArg(key, flags.strings[key] ? '' : true, arg);\n\t\t\t}\n\t\t} else if ((/^-[^-]+/).test(arg)) {\n\t\t\tvar letters = arg.slice(1, -1).split('');\n\n\t\t\tvar broken = false;\n\t\t\tfor (var j = 0; j < letters.length; j++) {\n\t\t\t\tnext = arg.slice(j + 2);\n\n\t\t\t\tif (next === '-') {\n\t\t\t\t\tsetArg(letters[j], next, arg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') {\n\t\t\t\t\tsetArg(letters[j], next.slice(1), arg);\n\t\t\t\t\tbroken = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(/[A-Za-z]/).test(letters[j])\n\t\t\t\t\t&& (/-?\\d+(\\.\\d*)?(e-?\\d+)?$/).test(next)\n\t\t\t\t) {\n\t\t\t\t\tsetArg(letters[j], next, arg);\n\t\t\t\t\tbroken = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (letters[j + 1] && letters[j + 1].match(/\\W/)) {\n\t\t\t\t\tsetArg(letters[j], arg.slice(j + 2), arg);\n\t\t\t\t\tbroken = true;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tsetArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tkey = arg.slice(-1)[0];\n\t\t\tif (!broken && key !== '-') {\n\t\t\t\tif (\n\t\t\t\t\targs[i + 1]\n\t\t\t\t\t&& !(/^(-|--)[^-]/).test(args[i + 1])\n\t\t\t\t\t&& !flags.bools[key]\n\t\t\t\t\t&& (aliases[key] ? !aliasIsBoolean(key) : true)\n\t\t\t\t) {\n\t\t\t\t\tsetArg(key, args[i + 1], arg);\n\t\t\t\t\ti += 1;\n\t\t\t\t} else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) {\n\t\t\t\t\tsetArg(key, args[i + 1] === 'true', arg);\n\t\t\t\t\ti += 1;\n\t\t\t\t} else {\n\t\t\t\t\tsetArg(key, flags.strings[key] ? '' : true, arg);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (!flags.unknownFn || flags.unknownFn(arg) !== false) {\n\t\t\t\targv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));\n\t\t\t}\n\t\t\tif (opts.stopEarly) {\n\t\t\t\targv._.push.apply(argv._, args.slice(i + 1));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tObject.keys(defaults).forEach(function (k) {\n\t\tif (!hasKey(argv, k.split('.'))) {\n\t\t\tsetKey(argv, k.split('.'), defaults[k]);\n\n\t\t\t(aliases[k] || []).forEach(function (x) {\n\t\t\t\tsetKey(argv, x.split('.'), defaults[k]);\n\t\t\t});\n\t\t}\n\t});\n\n\tif (opts['--']) {\n\t\targv['--'] = notFlags.slice();\n\t} else {\n\t\tnotFlags.forEach(function (k) {\n\t\t\targv._.push(k);\n\t\t});\n\t}\n\n\treturn argv;\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 'maplibre:'.\",\n      \"example\": {\n        \"styleeditor:slimmode\": true,\n        \"styleeditor:comment\": \"Style generated 1677776383\",\n        \"styleeditor:version\": \"3.14.159265\",\n        \"example:object\": { \"String\": \"one\", \"Number\": 2, \"Boolean\": false }\n      }\n    },\n    \"center\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\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    \"centerAltitude\": {\n      \"type\": \"number\",\n      \"doc\": \"Default map center altitude in meters above sea level. The style center altitude defines the altitude where the camera is looking at and will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n      \"example\": 123.4,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2980\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2980\"\n        }\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      \"sdk-support\": {\n        \"0-60 degrees\": {\n          \"js\": \"0.8.0\",\n          \"android\": \"1.0.0\",\n          \"ios\": \"1.0.0\"\n        },\n        \"0-85 degrees\": {\n          \"js\": \"2.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/1909\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/1909\"\n        },\n        \"0-180 degrees\": {\n          \"js\": \"5.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/1909\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/1909\"\n        }\n      }\n    },\n    \"roll\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"units\": \"degrees\",\n      \"doc\": \"Default roll, in degrees. The roll angle is measured counterclockwise about the camera boresight. The style roll will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n      \"example\": 45,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2941\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2941\"\n        }\n      }\n    },\n    \"state\": {\n      \"type\": \"state\",\n      \"default\": {},\n      \"doc\": \"An object used to define default values when using the [`global-state`](https://maplibre.org/maplibre-style-spec/expressions/#global-state) expression.\",\n      \"example\": {\n        \"chargerType\": {\n          \"default\": [\"CCS\", \"CHAdeMO\", \"Type2\"]\n        },\n        \"minPreferredChargingSpeed\": {\n          \"default\": 50\n        }\n      },\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.6.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      }\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    \"sky\": {\n      \"type\": \"sky\",\n      \"doc\": \"The map's sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.\",\n      \"example\": {\n        \"sky-color\": \"#199EF3\",\n        \"sky-horizon-blend\": 0.5,\n        \"horizon-color\": \"#ffffff\",\n        \"horizon-fog-blend\": 0.5,\n        \"fog-color\": \"#0000ff\",\n        \"fog-ground-blend\": 0.5,\n        \"atmosphere-blend\": [\"interpolate\",\n          [\"linear\"],\n          [\"zoom\"],\n          0,1,\n          10,1,\n          12,0\n        ]\n      }\n    },\n    \"projection\": {\n      \"type\": \"projection\",\n      \"doc\": \"The projection configuration\",\n      \"example\": {\n        \"type\": [\n          \"interpolate\",\n          [\"linear\"],\n          [\"zoom\"],\n          10, \"vertical-perspective\",\n          12, \"mercator\"\n        ]\n      }\n    },\n    \"terrain\": {\n      \"type\": \"terrain\",\n      \"doc\": \"The terrain configuration.\",\n      \"example\": {\n        \"source\": \"raster-dem-source\",\n        \"exaggeration\": 0.5\n      }\n    },\n    \"sources\": {\n      \"required\": true,\n      \"type\": \"sources\",\n      \"doc\": \"Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\\n\\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).\",\n      \"example\": {\n        \"maplibre-demotiles\": {\n          \"type\": \"vector\",\n          \"url\": \"https://demotiles.maplibre.org/tiles/tiles.json\"\n        },\n        \"maplibre-tilejson\": {\n          \"type\": \"vector\",\n          \"url\": \"http://api.example.com/tilejson.json\"\n        },\n        \"maplibre-streets\": {\n          \"type\": \"vector\",\n          \"tiles\": [\n              \"http://a.example.com/tiles/{z}/{x}/{y}.pbf\",\n              \"http://b.example.com/tiles/{z}/{x}/{y}.pbf\"\n          ],\n          \"maxzoom\": 14\n        },\n        \"wms-imagery\": {\n          \"type\": \"raster\",\n          \"tiles\": [\n              \"http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example\"\n          ],\n          \"tileSize\": 256\n        }\n      }\n    },\n    \"sprite\": {\n      \"type\": \"sprite\",\n      \"doc\": \"An array of `{id: 'my-sprite', url: 'https://example.com/sprite'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.\",\n      \"example\": \"https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite\"\n    },\n    \"glyphs\": {\n      \"type\": \"string\",\n      \"doc\": \"A URL template for loading signed-distance-field glyph sets in PBF format.\\n\\nIf this property is set, any text in the `text-field` layout property is displayed in the font stack named by the `text-font` layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.\\n\\nThe URL must include:\\n\\n - `{fontstack}` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the `text-font` property of a symbol layer. \\n\\n - `{range}` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.\\n\\nThe URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n      \"example\": \"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.0.16\",\n          \"android\": \"0.1.1\",\n          \"ios\": \"0.1.0\"\n        },\n        \"omit to use local fonts\": {\n          \"js\": \"5.11.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/165\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/165\"\n        }\n      }\n    },\n    \"font-faces\": {\n      \"type\": \"fontFaces\",\n      \"doc\": \"The `font-faces` property can be used to specify what font files to use for rendering text. Font faces contain information needed to render complex texts such as [Devanagari](https://en.wikipedia.org/wiki/Devanagari), [Khmer](https://en.wikipedia.org/wiki/Khmer_script) among many others.<h2>Unicode range</h2>The optional `unicode-range` property can be used to only use a particular font file for characters within the specified unicode range(s). Its value should be an array of strings, each indicating a start and end of a unicode range, similar to the [CSS descriptor with the same name](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). This allows specifying multiple non-consecutive unicode ranges. When not specified, the default value is `U+0-10FFFF`, meaning the font file will be used for all unicode characters.\\n\\nRefer to the [Unicode Character Code Charts](https://www.unicode.org/charts/) to see ranges for scripts supported by Unicode. To see what unicode code-points are available in a font, use a tool like [FontDrop](https://fontdrop.info/).\\n\\n<h2>Font Resolution</h2>For every name in a symbol layer’s [`text-font`](./layers.md/#text-font) array, characters are matched if they are covered one of the by the font files in the corresponding entry of the `font-faces` map. Any still-unmatched characters then fall back to the [`glyphs`](./glyphs.md) URL if provided.\\n\\n<h2>Supported Fonts</h2>What type of fonts are supported is implementation-defined. Unsupported fonts are ignored.\",\n      \"example\": {\n        \"Noto Sans Regular\": [{\n          \"url\": \"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansKhmer/hinted/ttf/NotoSansKhmer-Regular.ttf\",\n          \"unicode-range\": [\"U+1780-17FF\"]\n        },\n        {\n          \"url\": \"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansDevanagari/hinted/ttf/NotoSansDevanagari-Regular.ttf\",\n          \"unicode-range\": [\"U+0900-097F\"]\n        },\n        {\n          \"url\": \"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMyanmar/hinted/ttf/NotoSansMyanmar-Regular.ttf\",\n          \"unicode-range\": [\"U+1000-109F\"]\n        },\n        {\n          \"url\": \"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansEthiopic/hinted/ttf/NotoSansEthiopic-Regular.ttf\",\n          \"unicode-range\": [\"U+1200-137F\"]\n        }],\n        \"Unifont\": \"https://ftp.gnu.org/gnu/unifont/unifont-15.0.01/unifont-15.0.01.ttf\"\n      },\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"https://github.com/maplibre/maplibre-gl-js/issues/6637\",\n          \"android\": \"11.13.0\",\n          \"ios\": \"6.18.0\"\n        }\n      }\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\\nIn addition to this global definition via `transition`, if any individual paint or layout property are marked as `Transitionable`, a corresponding `*-transition` property is avaliable to fine-tune the property’s animation between old and new values based on similar `duration` and `delay` values.\\n\\nFor example, [`fill-color`](layers/#fill-color) is marked as `Transitionable`, so it can transition either independently via `fill-color-transition` or globally via the style's `transition` property:\",\n      \"example\": {\n        \"duration\": 300,\n        \"delay\": 0\n      }\n    },\n    \"layers\": {\n      \"required\": true,\n      \"type\": \"array\",\n      \"value\": \"layer\",\n      \"doc\": \"A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`, `color-relief`.\\n\\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.\",\n      \"example\": [\n        {\n          \"id\": \"coastline\",\n          \"source\": \"maplibre\",\n          \"source-layer\": \"countries\",\n          \"type\": \"line\",\n          \"paint\": {\n            \"line-color\": \"#198EC8\"\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:` and `https:`.\"\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 MapLibre.\"\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 `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers.\"\n    },\n    \"volatile\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"android\": \"9.3.0\",\n          \"ios\": \"5.10.0\",\n          \"js\": \"wontfix\"\n        }\n      }\n    },\n    \"encoding\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"mvt\": {\n          \"doc\": \"Mapbox Vector Tiles. See http://github.com/mapbox/vector-tile-spec for more info.\"\n        },\n        \"mlt\": {\n          \"doc\": \"MapLibre Vector Tiles. See https://github.com/maplibre/maplibre-tile-spec for more info.\"\n        }\n      },\n      \"default\": \"mvt\",\n      \"doc\": \"The encoding used by this source. Mapbox Vector Tiles encoding is used by default.\",\n      \"sdk-support\": {\n        \"mvt\": {\n          \"android\": \"supported\",\n          \"ios\": \"supported\",\n          \"js\": \"supported\"\n        },\n        \"mlt\": {\n          \"android\": \"12.1.0\",\n          \"ios\": \"6.20.0\",\n          \"js\": \"5.12.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:` and `https:`.\"\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 MapLibre.\"\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          \"js\": \"wontfix\"\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:` and `https:`.\"\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 MapLibre.\"\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        \"custom\": {\n          \"doc\": \"Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters.\"\n        }\n      },\n      \"default\": \"mapbox\",\n      \"doc\": \"The encoding used by this source. Mapbox Terrain RGB is used by default.\",\n      \"sdk-support\": {\n        \"mapbox, terrarium\": {\n          \"js\": \"0.43.0\",\n          \"ios\": \"6.0.0\",\n          \"android\": \"6.0.0\"\n        },\n        \"custom\": {\n          \"js\": \"3.4.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2783\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2783\"\n        }\n      }\n    },\n    \"redFactor\": {\n      \"type\": \"number\",\n      \"default\": 1.0,\n      \"doc\": \"Value that will be multiplied by the red channel value when decoding. Only used on custom encodings.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"3.4.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2783\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2783\"\n        }\n      }\n    },\n    \"blueFactor\": {\n      \"type\": \"number\",\n      \"default\": 1.0,\n      \"doc\": \"Value that will be multiplied by the blue channel value when decoding. Only used on custom encodings.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"3.4.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2783\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2783\"\n        }\n      }\n    },\n    \"greenFactor\": {\n      \"type\": \"number\",\n      \"default\": 1.0,\n      \"doc\": \"Value that will be multiplied by the green channel value when decoding. Only used on custom encodings.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"3.4.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2358\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2783\"\n        }\n      }\n    },\n    \"baseShift\": {\n      \"type\": \"number\",\n      \"default\": 0.0,\n      \"doc\": \"Value that will be added to the encoding mix when decoding. Only used on custom encodings.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"3.4.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2783\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2783\"\n        }\n      }\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          \"js\": \"wontfix\"\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      \"required\": true,\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\": \"filter\",\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\\n * `cluster` Is `true` if the point is a cluster \\n\\n * `cluster_id` A unique id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/#getclusterexpansionzoom)\\n\\n * `point_count` Number of original points grouped into this cluster\\n\\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\\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 `{<sourceLayer>: <propertyName>}`.\"\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            }\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            }\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            }\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            }\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            }\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            }\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            }\n          }\n        },\n        \"hillshade\": {\n          \"doc\": \"Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.43.0\",\n              \"android\": \"6.0.0\",\n              \"ios\": \"4.0.0\"\n            },\n            \"additional methods\": {\n              \"js\": \"5.5.0\",\n              \"android\": \"13.0.0\",\n              \"ios\": \"6.24.0\"\n            }\n          }\n        },\n        \"color-relief\": {\n          \"doc\": \"Client-side elevation coloring based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"5.6.0\",\n              \"android\": \"13.0.0\",\n              \"ios\": \"6.24.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            }\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 'maplibre:'.\",\n      \"example\": {\n        \"source:comment\": \"Hydrology FCCODE 460 - Narrow wash\"\n      }\n    },\n    \"source\": {\n      \"type\": \"string\",\n      \"doc\": \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n    },\n    \"source-layer\": {\n      \"type\": \"string\",\n      \"doc\": \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n    },\n    \"minzoom\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 24,\n      \"doc\": \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 24,\n      \"doc\": \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n    },\n    \"filter\": {\n      \"type\": \"filter\",\n      \"doc\": \"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.\"\n    },\n    \"layout\": {\n      \"type\": \"layout\",\n      \"doc\": \"Layout properties for the layer.\"\n    },\n    \"paint\": {\n      \"type\": \"paint\",\n      \"doc\": \"Default paint properties for this layer.\"\n    }\n  },\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_color-relief\",\n    \"layout_background\"\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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.2.0\",\n          \"ios\": \"5.9.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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"data-driven styling\": {\n          \"js\": \"5.22.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4194\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4194\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.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        },\n        \"data-driven styling\": {\n          \"js\": \"5.22.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4194\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4194\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"5.22.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4194\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4194\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"`line-center` value\": {\n          \"js\": \"0.47.0\",\n          \"android\": \"6.4.0\",\n          \"ios\": \"4.3.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        }\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 MapLibre 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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.53.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.11.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        }\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          \"!\": \"icon-overlap\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-overlap\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"never\": {\n          \"doc\": \"The icon will be hidden if it collides with any other previously drawn symbol.\"\n        },\n        \"always\": {\n          \"doc\": \"The icon will be visible even if it collides with any other previously drawn symbol.\"\n        },\n        \"cooperative\": {\n          \"doc\": \"If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible.\"\n        }\n      },\n      \"doc\": \"Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.1.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/251\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/251\"\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        }\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        }\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        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.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        },\n        \"stretchable icons\": {\n          \"js\": \"1.6.0\",\n          \"android\": \"9.2.0\",\n          \"ios\": \"5.8.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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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-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        },\n        \"data-driven styling\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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-padding\": {\n      \"type\": \"padding\",\n      \"default\": [2],\n      \"units\": \"pixels\",\n      \"doc\": \"Size of additional area round 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        },\n        \"data-driven styling\": {\n          \"js\": \"2.2.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2754\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2754\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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-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        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.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        }\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        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.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        \"viewport-glyph\": {\n          \"doc\": \"When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line.\"\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        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\"\n        },\n        \"`viewport-glyph` value\": {\n          \"js\": \"2.1.8\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/250\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/250\"\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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.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\": \"Fonts to use for displaying text. If the `glyphs` root property is specified, this array is joined together and interpreted as a font stack name. Otherwise, it is interpreted as a cascading fallback list of local font names.\",\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\"\n        },\n        \"local fonts\": {\n          \"js\": \"https://github.com/maplibre/maplibre-gl-js/issues/3302\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/165\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/165\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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-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      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.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        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-letter-spacing\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"units\": \"ems\",\n      \"doc\": \"Text tracking amount.\",\n      \"requires\": [\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\"\n        },\n        \"auto\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.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        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"example\": [\"center\", \"left\", \"right\"],\n      \"property-type\": \"data-constant\"\n    },\n    \"text-variable-anchor-offset\": {\n      \"type\": \"variableAnchorOffsetCollection\",\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, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position. \\n\\n The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor. \\n\\n When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`. \\n\\n ```json \\n\\n { \\\"text-variable-anchor-offset\\\": [\\\"top\\\", [0, 4], \\\"left\\\", [3,0], \\\"bottom\\\", [1, 1]] } \\n\\n ``` \\n\\n When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems. \\n\\n When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"3.3.0\",\n          \"ios\": \"6.8.0\",\n          \"android\": \"11.6.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"3.3.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2358\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/2358\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"example\": [\"top\", [0, 4], \"left\", [3, 0], \"bottom\", [1, 1]],\n      \"property-type\": \"data-driven\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.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-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        }\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 with point placement would be laid out horizontally.\"\n        },\n        \"vertical\": {\n          \"doc\": \"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.\"\n        }\n      },\n      \"doc\": \"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.\",\n      \"requires\": [\n        \"text-field\",\n        {\n          \"symbol-placement\": [\n            \"point\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"1.3.0\",\n          \"android\": \"8.3.0\",\n          \"ios\": \"5.3.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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-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        }\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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-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          \"!\": \"text-overlap\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-overlap\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"never\": {\n          \"doc\": \"The text will be hidden if it collides with any other previously drawn symbol.\"\n        },\n        \"always\": {\n          \"doc\": \"The text will be visible even if it collides with any other previously drawn symbol.\"\n        },\n        \"cooperative\": {\n          \"doc\": \"If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible.\"\n        }\n      },\n      \"doc\": \"Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.1.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/251\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/251\"\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        }\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        }\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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-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        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"layout_color-relief\": {\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\": \"5.6.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        },\n        \"`global state` expression\": {\n          \"js\": \"5.16.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"filter\": {\n    \"type\": \"boolean\",\n    \"doc\": \"A filter selects specific features from a layer.\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\n        \"zoom\",\n        \"feature\"\n      ]\n    },\n    \"property-type\": \"data-driven\"\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    },\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\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n\\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\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\n\\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\": \"expression_name\",\n    \"minimum\": 1,\n    \"doc\": \"An expression defines a function that can be used for data-driven style properties or feature filters. The first element of an expression array is a string naming the expression operator, e.g. `\\\"*\\\"` or `\\\"case\\\"`. Elements that follow (if any) are the _arguments_ to the expression. Each argument is either a literal value (a string, number, boolean, or `null`), or another expression array.\"\n  },\n  \"expression_name\": {\n    \"doc\": \"First element in an expression array. May be followed by a number of arguments.\",\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\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"var_name_1\", \"var_value_1\", \"...\", \"var_name_n\", \"var_value_n\", \"expression\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"var_name_i\",\n              \"type\": \"string literal\",\n              \"doc\": \"The name of the i-th variable.\"\n            },\n            {\n              \"name\": \"var_value_i\",\n              \"type\": \"any\",\n              \"doc\": \"The value of the i-th variable.\"\n            },\n            {\n              \"name\": \"expression\",\n              \"type\": \"any\",\n              \"doc\": \"The expression within which the named variables can be referenced.\"\n            }\n          ]\n        },\n        \"example\": [\"let\", \"someNumber\", 500, [\"interpolate\", [\"linear\"], [\"var\", \"someNumber\"], 274, \"#edf8e9\", 1551, \"#006d2c\"]],\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          }\n        }\n      },\n      \"var\": {\n        \"doc\": \"References variable bound using `let`.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"var_name\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"var_name\",\n              \"type\": \"string literal\",\n              \"doc\": \"The name of the variable bound using `let`.\"\n            }\n          ]\n        },\n        \"example\": [\"var\", \"density\"],\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          }\n        }\n      },\n      \"literal\": {\n        \"doc\": \"Provides a literal array or object value.\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"json_object\"],\n              \"output-type\": \"object\"\n            },\n            {\n              \"parameters\": [\"json_array\"],\n              \"output-type\": \"array\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"json_object\",\n              \"type\": \"JSON object\"\n            },\n            {\n              \"name\": \"json_array\",\n              \"type\": \"JSON array\"\n            }\n          ]\n        },\n        \"example\": [\"literal\", [\"DIN Offc Pro Italic\", \"Arial Unicode MS Regular\"]],\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          }\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 or length, then this assertion will cause the whole expression to be aborted.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value\"],\n              \"output-type\": \"array\"\n            },\n            {\n              \"parameters\": [\"type\", \"value\"],\n              \"output-type\": \"array<type>\"\n            },\n            {\n              \"parameters\": [\"type\", \"length\", \"value\"],\n              \"output-type\": \"array<type, length>\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"type\",\n              \"type\": [\"string\", \"number\", \"boolean\"],\n              \"doc\": \"The asserted type of the input array.\"\n            },\n            {\n              \"name\": \"length\",\n              \"type\": \"number literal\",\n              \"doc\": \"The asserted length of the input array.\"\n            }\n          ]\n        },\n        \"example\": [\"array\", \"string\", 3, [\"literal\", [\"a\", \"b\", \"c\"]]],\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          }\n        }\n      },\n      \"at\": {\n        \"doc\": \"Retrieves an item from an array.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"index\", \"array\"],\n              \"output-type\": \"T\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"index\",\n              \"type\": \"number\",\n              \"doc\": \"The index into `array`.\"\n            },\n            {\n              \"name\": \"array\",\n              \"type\": \"array<T>\",\n              \"doc\": \"The array of items to retrieve the specified item from.\"\n            }\n          ]\n        },\n        \"example\": [\"at\", 1, [\"literal\", [\"a\", \"b\", \"c\"]]],\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          }\n        }\n      },\n      \"in\": {\n        \"doc\": \"Determines whether an item exists in an array or a substring exists in a string.\\n\\n - [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"item\", \"array\"],\n              \"output-type\": \"boolean\"\n            },\n            {\n              \"parameters\": [\"substring\", \"string\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"item\",\n              \"type\": \"T\",\n              \"doc\": \"The needle to search for within `array`.\"\n            },\n            {\n              \"name\": \"array\",\n              \"type\": \"array<T>\",\n              \"doc\": \"The haystack through which to search for `item`.\"\n            },\n            {\n              \"name\": \"substring\",\n              \"type\": \"string\",\n              \"doc\": \"The needle to search for within `string`.\"\n            },\n            {\n              \"name\": \"string\",\n              \"type\": \"string\",\n              \"doc\": \"The haystack through which to search for `substring`.\"\n            }\n          ]\n        },\n        \"example\": [\"in\", \"$type\", \"Point\"],\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          }\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. In a string, a UTF-16 surrogate pair counts as a single position.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"item\", \"array\", \"from_index?\"],\n              \"output-type\": \"number\"\n            },\n            {\n              \"parameters\": [\"substring\", \"string\", \"from_index?\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"item\",\n              \"type\": \"T\",\n              \"doc\": \"The needle to search for within `array`.\"\n            },\n            {\n              \"name\": \"array\",\n              \"type\": \"array<T>\",\n              \"doc\": \"The haystack through which to search for `item`.\"\n            },\n            {\n              \"name\": \"substring\",\n              \"type\": \"string\",\n              \"doc\": \"The needle to search for within `string`.\"\n            },\n            {\n              \"name\": \"string\",\n              \"type\": \"string\",\n              \"doc\": \"The haystack through which to search for `substring`.\"\n            },\n            {\n              \"name\": \"from_index\",\n              \"type\": \"number\",\n              \"doc\": \"The index from where to begin the search.\"\n            }\n          ]\n        },\n        \"example\": [\"index-of\", \"foo\", [\"baz\", \"bar\", \"hello\", \"foo\", \"world\"]],\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.10.0\",\n            \"android\": \"10.3.0\",\n            \"ios\": \"6.0.0\"\n          }\n        }\n      },\n      \"slice\": {\n        \"doc\": \"Returns a subarray 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. In a string, a UTF-16 surrogate pair counts as a single position.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"array\", \"start_index\", \"end_index?\"],\n              \"output-type\": \"array<T>\"\n            },\n            {\n              \"parameters\": [\"string\", \"start_index\", \"end_index?\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"array\",\n              \"type\": \"array<T>\",\n              \"doc\": \"The original array from which to extract the subarray.\"\n            },\n            {\n              \"name\": \"string\",\n              \"type\": \"string\",\n              \"doc\": \"The original string from which to extract the substring.\"\n            },\n            {\n              \"name\": \"start_index\",\n              \"type\": \"number\",\n              \"doc\": \"The inclusive index from which `slice` extracts items or characters from the subarray or substring.\"\n            },\n            {\n              \"name\": \"end_index\",\n              \"type\": \"number\",\n              \"doc\": \"The non-inclusive index up to which `slice` extracts items or characters from the subarray or substring.\"\n            }\n          ]\n        },\n        \"example\": [\"slice\", [\"get\", \"name\"], 0, 3],\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.10.0\",\n            \"android\": \"10.3.0\",\n            \"ios\": \"6.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\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"condition_1\", \"output_1\", \"...\", \"condition_n\", \"output_n\", \"fallback\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"condition_i\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"name\": \"output_i\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"fallback\",\n              \"type\": \"any\",\n              \"doc\": \"The result when no condition evaluates to true.\"\n            }\n          ]\n        },\n        \"example\": [\"case\", [\"boolean\", [\"feature-state\", \"hover\"], false], 1, 0.5],\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          }\n        }\n      },\n      \"match\": {\n        \"doc\": \"Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be either:\\n\\n - a single literal value; or\\n\\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`). The input matches if any of the values in the array matches, similar to the `\\\"in\\\"` operator.\\n\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\", \"label_1\", \"output_1\", \"...\", \"label_n\", \"output_n\", \"fallback\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": [\"string\", \"number\"],\n              \"doc\": \"Any expression.\"\n            },\n            {\n              \"name\": \"label_i\",\n              \"type\": [\"string literal\", \"number literal\", \"array<string literal>\", \"array<number literal>\"],\n              \"doc\": \"The i-th literal value or array of literal values to match the input against.\"\n            },\n            {\n              \"name\": \"output_i\",\n              \"type\": \"any\",\n              \"doc\": \"The result when the i-th label is the first label to match the input.\"\n            },\n            {\n              \"name\": \"fallback\",\n              \"type\": \"any\",\n              \"doc\": \"The result when no label matches the input.\"\n            }\n          ]\n        },\n        \"example\": [\"match\", [\"get\", \"building_type\"], \"residential\", \"#f00\", \"commercial\", \"#0f0\", \"#000\"],\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          }\n        }\n      },\n      \"coalesce\": {\n        \"doc\": \"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"expression_1\", \"...\", \"expression_n\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"expression_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"coalesce\", [\"image\", [\"concat\", [\"get\", \"icon\"], \"_15\"]], [\"image\", \"marker_15\"]],\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          }\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.\\n\\nReturns 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\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\", \"output_0\", \"stop_input_1\", \"stop_output_1\", \"...\", \"stop_input_n\", \"stop_output_n\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\",\n              \"doc\": \"Any numeric expression.\"\n            },\n            {\n              \"name\": \"output_0\",\n              \"type\": \"any\",\n              \"doc\": \"The result when the `input` is less than the first stop.\"\n            },\n            {\n              \"name\": \"stop_input_i\",\n              \"type\": \"number literal\",\n              \"doc\": \"The value of the i-th stop against which the `input` is compared.\"\n            },\n            {\n              \"name\": \"stop_output_i\",\n              \"type\": \"any\",\n              \"doc\": \"The result when the i-th stop is the last stop less than the `input`.\"\n            }\n          ]\n        },\n        \"example\": [\"step\", [\"get\", \"point_count\"], 20, 100, 30, 750, 40],\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          }\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<number>`, `color`, `array<color>`, or `projection`.\\n\\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\\n\\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\\n\\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"interpolation_type\", \"input\", \"stop_input_1\", \"stop_output_1\", \"...\", \"stop_input_n\", \"stop_output_n\"],\n              \"output-type\": [\"number\", \"array<number>\", \"color\", \"array<color>\", \"projection\"]\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"interpolation_type\",\n              \"type\": \"interpolation\",\n              \"doc\": \"The interpolation type.\"\n            },\n            {\n              \"name\": \"input\",\n              \"type\": \"number\",\n              \"doc\": \"Any numeric expression.\"\n            },\n            {\n              \"name\": \"stop_input_i\",\n              \"type\": \"number literal\",\n              \"doc\": \"The value of the i-th stop against which the `input` is compared.\"\n            },\n            {\n              \"name\": \"stop_output_i\",\n              \"type\": [\"number\", \"array<number>\", \"color\", \"array<color>\", \"projection\"],\n              \"doc\": \"The output value corresponding to the i-th stop.\"\n            }\n          ]\n        },\n        \"example\": [\"interpolate\", [\"linear\"], [\"zoom\"], 15, 0, 15.05, [\"get\", \"height\"]],\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          }\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` or `array<color>`, and the interpolation is performed in the Hue-Chroma-Luminance color space.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"interpolation_type\", \"input\", \"stop_input_1\", \"stop_output_1\", \"...\", \"stop_input_n\", \"stop_output_n\"],\n              \"output-type\": [\"color\", \"array<color>\"]\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"interpolation_type\",\n              \"type\": \"interpolation\",\n              \"doc\": \"The interpolation type.\"\n            },\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"stop_input_i\",\n              \"type\": \"number literal\"\n            },\n            {\n              \"name\": \"stop_output_i\",\n              \"type\": [\"color\", \"array<color>\"]\n            }\n          ]\n        },\n        \"example\": [\"interpolate-hcl\", [\"linear\"], [\"zoom\"], 15, \"#f00\", 15.05, \"#00f\"],\n        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\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` or `array<color>`, and the interpolation is performed in the CIELAB color space.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"interpolation_type\", \"input\", \"stop_input_1\", \"stop_output_1\", \"...\", \"stop_input_n\", \"stop_output_n\"],\n              \"output-type\": [\"color\", \"array<color>\"]\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"interpolation_type\",\n              \"type\": \"interpolation\",\n              \"doc\": \"The interpolation type.\"\n            },\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"stop_input_i\",\n              \"type\": \"number literal\"\n            },\n            {\n              \"name\": \"stop_output_i\",\n              \"type\": [\"color\", \"array<color>\"]\n            }\n          ]\n        },\n        \"example\": [\"interpolate-lab\", [\"linear\"], [\"zoom\"], 15, \"#f00\", 15.05, \"#00f\"],\n        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          }\n        }\n      },\n      \"ln2\": {\n        \"doc\": \"Returns the mathematical constant ln(2).\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"ln2\"],\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          }\n        }\n      },\n      \"pi\": {\n        \"doc\": \"Returns the mathematical constant pi.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"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          }\n        }\n      },\n      \"e\": {\n        \"doc\": \"Returns the mathematical constant e.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"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          }\n        }\n      },\n      \"typeof\": {\n        \"doc\": \"Returns a string describing the type of the given value.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"typeof\", [\"get\", \"name\"]],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"string\", [\"get\", \"name\"]],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"number\", [\"get\", \"population\"]],\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          }\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\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"boolean\", [\"feature-state\", \"hover\"], false],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"object\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"object\", [\"get\", \"some-property\"]],\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          }\n        }\n      },\n      \"collator\": {\n        \"doc\": \"Returns a `collator` for use in locale-dependent comparison operations. Use `resolved-locale` to test the results of locale fallback behavior.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"options\"],\n              \"output-type\": \"collator\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"options\",\n              \"type\": {\n                \"case-sensitive\": {\n                  \"type\": \"boolean\",\n                  \"default\": false,\n                  \"example\": true,\n                  \"doc\": \"If characters of different case-ness are considered different\"\n                },\n                \"diacritic-sensitive\": {\n                  \"type\": \"boolean\",\n                  \"default\": false,\n                  \"example\": true,\n                  \"doc\": \"If characters with different diacritics are considered different\"\n                },\n                \"locale\": {\n                  \"type\": \"string\",\n                  \"example\": \"en\",\n                  \"doc\": \"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.\"\n                }\n              }\n            }\n          ]\n        },\n        \"example\": [\"collator\", {\"case-sensitive\": true, \"diacritic-sensitive\": true, \"locale\": \"fr\"}],\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          }\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'`](#image) expression. Strings may be followed by a style override object.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"style_overrides_1?\", \"...\", \"input_n\", \"style_overrides_n?\"],\n              \"output-type\": \"formatted\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": [\"string\", \"image\"]\n            },\n            {\n              \"name\": \"style_overrides_i\",\n              \"type\": {\n                \"text-font\": {\n                  \"type\": \"string\",\n                  \"doc\": \"Overrides the font stack specified by the root layout property.\",\n                  \"example\": \"Arial Unicode MS Regular\"\n                },\n                \"text-color\": {\n                  \"type\": \"color\",\n                  \"doc\": \"Overrides the color specified by the root paint property.\",\n                  \"example\": \"#333\"\n                },\n                \"font-scale\": {\n                  \"type\": \"number\",\n                  \"doc\":\"Applies a scaling factor on `text-size` as specified by the root layout property.\",\n                  \"example\": 1.2\n                },\n                \"vertical-align\": {\n                  \"type\": \"enum\",\n                  \"doc\": \"Aligns a vertical text section or image in relation to the row it belongs to. Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.\",\n                  \"default\": \"bottom\",\n                  \"example\": \"bottom\",\n                  \"values\": {\n                    \"bottom\": {\n                      \"doc\": \"align the bottom of this section with the bottom of other sections.\\n![Visual representation of bottom alignment](https://github.com/user-attachments/assets/0474a2fd-a4b2-417c-9187-7a13a28695bc)\"\n                    },\n                    \"center\": {\n                      \"doc\": \"align the center of this section with the center of other sections.\\n![Visual representation of center alignment](https://github.com/user-attachments/assets/92237455-be6d-4c5d-b8f6-8127effc1950)\"\n                    },\n                    \"top\": {\n                      \"doc\": \"align the top of this section with the top of other sections.\\n![Visual representation of top alignment](https://github.com/user-attachments/assets/45dccb28-d977-4abb-a006-4ea9792b7c53)\"\n                    }\n                  }\n                }\n              }\n            }\n          ]\n        },\n        \"example\": [\"format\", [\"upcase\", [\"get\", \"FacilityName\"]], {\"font-scale\": 0.8}, \"\\n\\n\", {}, [\"downcase\", [\"get\", \"Comments\"]], {\"font-scale\": 0.6, \"vertical-align\": \"center\"}],\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          },\n          \"text-font\": {\n            \"js\": \"0.48.0\",\n            \"android\": \"6.7.0\",\n            \"ios\": \"4.6.0\"\n          },\n          \"font-scale\": {\n            \"js\": \"0.48.0\",\n            \"android\": \"6.7.0\",\n            \"ios\": \"4.6.0\"\n          },\n          \"text-color\": {\n            \"js\": \"1.3.0\",\n            \"android\": \"7.3.0\",\n            \"ios\": \"4.10.0\"\n          },\n          \"vertical-align\": {\n            \"js\": \"5.1.0\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/3055\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3055\"\n          },\n          \"image\": {\n            \"js\": \"1.6.0\",\n            \"android\": \"8.6.0\",\n            \"ios\": \"5.7.0\"\n          }\n        }\n      },\n      \"image\": {\n        \"doc\": \"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"image_name\"],\n              \"output-type\": \"image\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"image_name\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"image\", \"marker_15\"],\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          }\n        }\n      },\n      \"global-state\": {\n        \"doc\": \"Retrieves a property value from global state that can be set with platform-specific APIs. Defaults can be provided using the [`state`](https://maplibre.org/maplibre-style-spec/root/#state) root property. Returns `null` if no value nor default value is set for the retrieved property.\",\n        \"group\": \"Lookup\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"property_name\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"property_name\",\n              \"type\": \"string literal\",\n              \"doc\": \"The name of the global state property to retrieve.\"\n            }\n          ]\n        },\n        \"example\": [\"global-state\", \"someProperty\"],\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"5.6.0\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n          }\n        }\n      },\n      \"number-format\": {\n        \"doc\": \"Converts the input number into a string representation using the provided format_options.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\", \"format_options\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\",\n              \"doc\": \"number to format\"\n            },\n            {\n              \"name\": \"format_options\",\n              \"type\": {\n                \"locale\": {\n                  \"type\": \"string\",\n                  \"example\": \"en\",\n                  \"doc\": \"Specifies the locale to use, as a BCP 47 language tag\"\n                },\n                \"currency\": {\n                  \"type\": \"string\",\n                  \"example\": \"USD\",\n                  \"doc\": \"An ISO 4217 code to use for currency-style formatting\"\n                },\n                \"unit\": {\n                  \"type\": \"string\",\n                  \"example\": \"meter\",\n                  \"doc\": \"A CLDR or ECMA-402 unit to use for quantity-style formatting\"\n                },\n                \"min-fraction-digits\": {\n                  \"type\": \"number\",\n                  \"example\": 1,\n                  \"doc\": \"Minimum number of fractional digits to include\"\n                },\n                \"max-fraction-digits\": {\n                  \"type\": \"number\",\n                  \"example\": 2,\n                  \"doc\": \"Maximum number of fractional digits to include\"\n                }\n              },\n              \"doc\": \"Format options for the number\"\n            }\n          ]\n        },\n        \"example\": [\"number-format\", [\"get\", \"mag\"], {\"min-fraction-digits\": 1, \"max-fraction-digits\": 1}],\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.54.0\",\n            \"android\": \"8.4.0\",\n            \"ios\": \"supported\"\n          },\n          \"`unit` property\": {\n            \"js\": \"5.20.0\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/4071\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4071\"\n          }\n        }\n      },\n      \"to-string\": {\n        \"doc\": \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a boolean, the result is `\\\"true\\\"` or `\\\"false\\\"`. If the input is a number, it is converted to a string as specified by the [\\\"NumberToString\\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\\"rgba(r,g,b,a)\\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"to-string\", [\"get\", \"mag\"]],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"to-number\", \"someProperty\"],\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          }\n        }\n      },\n      \"to-boolean\": {\n        \"doc\": \"Converts the input value to a boolean. The result is `false` when the input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"to-boolean\", \"someProperty\"],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"color\"],\n              \"output-type\": \"array\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"color\",\n              \"type\": \"color\"\n            }\n          ]\n        },\n        \"example\": [\"to-rgba\", \"#ff0000\"],\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          }\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\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"value_1\", \"...\", \"value_n\"],\n              \"output-type\": \"color\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"value_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"to-color\", \"#edf8e9\"],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"red\", \"green\", \"blue\"],\n              \"output-type\": \"color\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"red\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"green\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"blue\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"rgb\", 255, 0, 0],\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          }\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 zero and one. If any component is out of range, the expression is an error.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"red\", \"green\", \"blue\", \"alpha\"],\n              \"output-type\": \"color\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"red\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"green\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"blue\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"alpha\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"rgba\", 255, 0, 0, 1],\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          }\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\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\\n\\n - [Extrude polygons for 3D indoor mapping](https://maplibre.org/maplibre-gl-js/docs/examples/extrude-polygons-for-3d-indoor-mapping/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"property_name\", \"object?\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"property_name\",\n              \"type\": \"string\",\n              \"doc\": \"The name of the property to retrieve the value of.\"\n            },\n            {\n              \"name\": \"object\",\n              \"type\": \"object\",\n              \"doc\": \"The object to retrieve the value from.\"\n            }\n          ]\n        },\n        \"example\": [\"get\", \"someProperty\"],\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          }\n        }\n      },\n      \"has\": {\n        \"doc\": \"Tests for the presence of a property value in the current feature's properties, or from another object if a second argument is provided.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"property_name\", \"object?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"property_name\",\n              \"type\": \"string\",\n              \"doc\": \"The name of the property to test for the presence of.\"\n            },\n            {\n              \"name\": \"object\",\n              \"type\": \"object\",\n              \"doc\": \"The object in which to test for the presence of the `property_name` property.\"\n            }\n          ]\n        },\n        \"example\": [\"has\", \"someProperty\"],\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          }\n        }\n      },\n      \"length\": {\n        \"doc\": \"Gets the length of an array or string. In a string, a UTF-16 surrogate pair counts as a single position.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"array_or_string\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"array_or_string\",\n              \"type\": [\"array\", \"string\"]\n            }\n          ]\n        },\n        \"example\": [\"length\", [\"get\", \"myArray\"]],\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          }\n        }\n      },\n      \"properties\": {\n        \"doc\": \"Gets the feature properties object.  Note that in some cases, it may be more efficient to use `[\\\"get\\\", \\\"property_name\\\"]` directly.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"object\"\n            }\n          ]\n        },\n        \"example\": [\"properties\"],\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          }\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. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that `[\\\"feature-state\\\"]` can only be used with paint properties that support data-driven styling.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"property_name\"],\n              \"output-type\": \"any\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"property_name\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"feature-state\", \"hover\"],\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.46.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/1698\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/1698\"\n          }\n        }\n      },\n      \"geometry-type\": {\n        \"doc\": \"Returns the feature's simple geometry type: `Point`, `LineString`, or `Polygon`. `MultiPoint`, `MultiLineString`, and `MultiPolygon` are returned as `Point`, `LineString`, and `Polygon`, respectively.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"==\", [\"geometry-type\"], \"Polygon\"],\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          }\n        }\n      },\n      \"id\": {\n        \"doc\": \"Gets the feature's id, if it has one.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"id\"],\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          }\n        }\n      },\n      \"zoom\": {\n        \"doc\": \"Gets the current zoom level.  Note that in style layout and paint properties, `[\\\"zoom\\\"]` may only appear as the input to a top-level `\\\"step\\\"` or `\\\"interpolate\\\"` expression.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"interpolate\", [\"linear\"], [\"zoom\"], 15, 0, 15.05, [\"get\", \"height\"]],\n        \"group\": \"Zoom\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\"\n          }\n        }\n      },\n      \"heatmap-density\": {\n        \"doc\": \"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"heatmap-density\"],\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          }\n        }\n      },\n      \"elevation\": {\n        \"doc\": \"Gets the elevation of a pixel (in meters above the vertical datum reference of the `raster-dem` tiles) from a `raster-dem` source. Can only be used in the `color-relief-color` property of a `color-relief` layer.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"elevation\"],\n        \"group\": \"Color Relief\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"5.6.0\",\n            \"android\": \"13.0.0\",\n            \"ios\": \"6.24.0\"\n          }\n        }\n      },\n      \"line-progress\": {\n        \"doc\": \"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"line-progress\"],\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          }\n        }\n      },\n      \"accumulated\": {\n        \"doc\": \"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"accumulated\"],\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.53.0\",\n            \"ios\": \"supported\",\n            \"android\": \"supported\"\n          }\n        }\n      },\n      \"+\": {\n        \"doc\": \"Returns the sum of the inputs.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"+\", 2, 3],\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          }\n        }\n      },\n      \"*\": {\n        \"doc\": \"Returns the product of the inputs.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"*\", 2, 3],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\"],\n              \"output-type\": \"number\"\n            },\n            {\n              \"parameters\": [\"single_input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"number\",\n              \"doc\": \"The number from which to subtract `input_2`.\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"number\",\n              \"doc\": \"The number to subtract from `input_1`.\"\n            },\n            {\n              \"name\": \"single_input\",\n              \"type\": \"number\",\n              \"doc\": \"The number to subtract from 0.\"\n            }\n          ]\n        },\n        \"example\": [\"-\", 10],\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          }\n        }\n      },\n      \"/\": {\n        \"doc\": \"Returns the result of floating point division of the first input by the second.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"number\",\n              \"doc\": \"The dividend.\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"number\",\n              \"doc\": \"The divisor.\"\n            }\n          ]\n        },\n        \"example\": [\"/\", [\"get\", \"population\"], [\"get\", \"sq-km\"]],\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          }\n        }\n      },\n      \"%\": {\n        \"doc\": \"Returns the remainder after integer division of the first input by the second.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"number\",\n              \"doc\": \"The dividend.\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"number\",\n              \"doc\": \"The divisor.\"\n            }\n          ]\n        },\n        \"example\": [\"%\", 10, 3],\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          }\n        }\n      },\n      \"^\": {\n        \"doc\": \"Returns the result of raising the first input to the power specified by the second.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"number\",\n              \"doc\": \"The base.\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"number\",\n              \"doc\": \"The exponent.\"\n            }\n          ]\n        },\n        \"example\": [\"^\", 2, 3],\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          }\n        }\n      },\n      \"sqrt\": {\n        \"doc\": \"Returns the square root of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\",\n              \"doc\": \"The radicand.\"\n            }\n          ]\n        },\n        \"example\": [\"sqrt\", 9],\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          }\n        }\n      },\n      \"log10\": {\n        \"doc\": \"Returns the base-ten logarithm of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"log10\", 8],\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          }\n        }\n      },\n      \"ln\": {\n        \"doc\": \"Returns the natural logarithm of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"ln\", 8],\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          }\n        }\n      },\n      \"log2\": {\n        \"doc\": \"Returns the base-two logarithm of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"log2\", 8],\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          }\n        }\n      },\n      \"sin\": {\n        \"doc\": \"Returns the sine of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"sin\", 1],\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          }\n        }\n      },\n      \"cos\": {\n        \"doc\": \"Returns the cosine of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"cos\", 1],\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          }\n        }\n      },\n      \"tan\": {\n        \"doc\": \"Returns the tangent of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"tan\", 1],\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          }\n        }\n      },\n      \"asin\": {\n        \"doc\": \"Returns the arcsine of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"asin\", 1],\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          }\n        }\n      },\n      \"acos\": {\n        \"doc\": \"Returns the arccosine of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"acos\", 1],\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          }\n        }\n      },\n      \"atan\": {\n        \"doc\": \"Returns the arctangent of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"atan\", 1],\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          }\n        }\n      },\n      \"min\": {\n        \"doc\": \"Returns the minimum value of the inputs.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"min\", 1, 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          }\n        }\n      },\n      \"max\": {\n        \"doc\": \"Returns the maximum value of the inputs.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"max\", 1, 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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"round\", 1.5],\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          }\n        }\n      },\n      \"abs\": {\n        \"doc\": \"Returns the absolute value of the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"abs\", -1.5],\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          }\n        }\n      },\n      \"ceil\": {\n        \"doc\": \"Returns the smallest integer that is greater than or equal to the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"ceil\", 1.5],\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          }\n        }\n      },\n      \"floor\": {\n        \"doc\": \"Returns the largest integer that is less than or equal to the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"number\"\n            }\n          ]\n        },\n        \"example\": [\"floor\", 1.5],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"geojson\"],\n              \"output-type\": \"number\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"geojson\",\n              \"type\": \"GeoJSON object\"\n            }\n          ]\n        },\n        \"example\": [\"distance\", {\"type\": \"Point\", \"coordinates\": [0, 0]}],\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"4.2.0\",\n            \"android\": \"9.2.0\",\n            \"ios\": \"5.9.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\\n - [Add multiple geometries from one GeoJSON source](https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\\n\\n - [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/display-buildings-in-3d/)\\n\\n - [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-symbols-by-toggling-a-list/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\"==\", \"$type\", \"Polygon\"],\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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"input_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_1\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"input_2\",\n              \"type\": \"any\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\"!=\", \"cluster\", 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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"string_1\", \"string_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            },\n            {\n              \"parameters\": [\"number_1\", \"number_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"string_i\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"number_i\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\">\", [\"get\", \"mag\"], 2],\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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"string_1\", \"string_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            },\n            {\n              \"parameters\": [\"number_1\", \"number_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"string_i\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"number_i\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\"<\", [\"get\", \"mag\"], 2],\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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"string_1\", \"string_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            },\n            {\n              \"parameters\": [\"number_1\", \"number_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"string_i\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"number_i\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\">=\", [\"get\", \"mag\"], 6],\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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"string_1\", \"string_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            },\n            {\n              \"parameters\": [\"number_1\", \"number_2\", \"collator?\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"string_i\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"number_i\",\n              \"type\": \"number\"\n            },\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\",\n              \"doc\": \"Options for locale-dependent comparison.\"\n            }\n          ]\n        },\n        \"example\": [\"<=\", [\"get\", \"mag\"], 6],\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          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.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\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"boolean\"\n            }\n          ]\n        },\n        \"example\": [\"all\", [\">=\", [\"get\", \"mag\"], 4], [\"<\", [\"get\", \"mag\"], 5]],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"boolean\"\n            }\n          ]\n        },\n        \"example\": [\"any\", [\">=\", [\"get\", \"mag\"], 4], [\"<\", [\"get\", \"mag\"], 5]],\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          }\n        }\n      },\n      \"!\": {\n        \"doc\": \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"boolean\"\n            }\n          ]\n        },\n        \"example\": [\"!\", [\"has\", \"point_count\"]],\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          }\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\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n\\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"geojson\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"geojson\",\n              \"type\": \"GeoJSON object\"\n            }\n          ]\n        },\n        \"example\": [\"within\", {\"type\": \"Polygon\", \"coordinates\": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]]}],\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          }\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 `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"boolean\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"is-supported-script\", \"दिल्ली\"],\n        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.6.0\",\n            \"ios\": \"supported\"\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\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"upcase\", [\"get\", \"name\"]],\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          }\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\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"downcase\", [\"get\", \"name\"]],\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          }\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\\n - [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-generated-icon-to-the-map/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)\\n\\n - [Variable label placement](https://maplibre.org/maplibre-gl-js/docs/examples/variable-label-placement/)\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input_1\", \"...\", \"input_n\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input_i\",\n              \"type\": \"any\"\n            }\n          ]\n        },\n        \"example\": [\"concat\", \"square-rgb-\", [\"get\", \"color\"]],\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          }\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        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"collator\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"collator\",\n              \"type\": \"collator\"\n            }\n          ]\n        },\n        \"example\": [\"resolved-locale\", [\n          \"collator\",\n          {\"case-sensitive\": true, \"diacritic-sensitive\": false, \"locale\": \"de\"}\n        ]],\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          }\n        }\n      },\n      \"split\": {\n        \"doc\": \"Returns an array of substrings formed by splitting an input string by a separator string.\",\n        \"group\": \"String\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\", \"separator\"],\n              \"output-type\": \"array<string>\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"separator\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"split\", [\"get\", \"name\"], \";\"],\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"5.20.0\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/4133\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4133\"\n          }\n        }\n      },\n      \"join\": {\n        \"doc\": \"Returns a string formed by concatenating the elements of the input array, inserting a separator between each element.\",\n        \"group\": \"String\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\"input\", \"separator\"],\n              \"output-type\": \"string\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"input\",\n              \"type\": \"array\"\n            },\n            {\n              \"name\": \"separator\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"example\": [\"join\", [\"split\", [\"get\", \"name\"], \";\"], \"\\n\"],\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"5.20.0\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/4133\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4133\"\n          }\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        }\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        }\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        }\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        }\n      }\n    }\n  },\n  \"sky\": {\n    \"sky-color\": {\n      \"type\": \"color\",\n      \"property-type\": \"data-constant\",\n      \"default\": \"#88C6FC\",\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"The base color for the sky.\"\n    },\n    \"horizon-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 base color at the horizon.\"\n    },\n    \"fog-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 base color for the fog. Requires 3D terrain.\"\n    },\n    \"fog-ground-blend\": {\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\": \"How to blend the fog over the 3D terrain. Where 0 is the map center and 1 is the horizon.\"\n    },\n    \"horizon-fog-blend\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 0.8,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"How to blend the fog color and the horizon color. Where 0 is using the horizon color only and 1 is using the fog color only.\"\n    },\n    \"sky-horizon-blend\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 0.8,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"How to blend the sky color and the horizon color. Where 1 is blending the color at the middle of the sky and 0 is not blending at all and using the sky color only.\"\n    },\n    \"atmosphere-blend\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 0.8,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection.\"\n    }\n  },\n  \"terrain\": {\n    \"source\": {\n      \"type\": \"string\",\n      \"doc\": \"The source for the terrain data.\",\n      \"required\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.2.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/252\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/252\"\n        }\n      }\n    },\n    \"exaggeration\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"doc\": \"The exaggeration of the terrain - how high it will look.\",\n      \"default\": 1.0,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.2.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/252\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/252\"\n        }\n      }\n    }\n  },\n  \"projection\": {\n    \"type\": {\n      \"type\": \"projectionDefinition\",\n      \"doc\": \"The projection definition type. Can be specified as a string, a transition state, or an expression.\",\n      \"default\": \"mercator\",\n      \"property-type\": \"data-constant\",\n      \"transition\": false,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\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_color-relief\",\n    \"paint_background\"\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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-layer-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"Opacity applied to the layer as a whole. Unlike `fill-opacity` and alpha values in `fill-color`, which are applied per feature and accumulate where fills overlap, `fill-layer-opacity` is applied once so overlapping fills appear as a single surface at the given opacity. When both `fill-opacity` and `fill-layer-opacity` are set, the per-feature, overlap accumulation is preserved, then `fill-layer-opacity` composites the result. This property affects only the layer it is set on and cannot be used to composite multiple layers together or control how this layer blends with layers above or below it.\\n\\n![fill-opacity vs. fill-layer-opacity](assets/fill-layer-opacity.svg)\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"6.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4298\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4298\"\n        },\n        \"`global state` expression\": {\n          \"js\": \"6.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\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. When used with an SDF fill pattern, this serves as the foreground color of the pattern.\",\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.19.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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-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        },\n        \"data-driven styling\": {\n          \"js\": \"0.19.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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-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        }\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        }\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\": true,\n      \"doc\": \"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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    \"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        }\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        }\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\": true,\n      \"doc\": \"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"fill-extrusion-height\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"units\": \"meters\",\n      \"doc\": \"The height with which to extrude this layer.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.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    \"fill-extrusion-vertical-gradient\": {\n      \"type\": \"boolean\",\n      \"default\": true,\n      \"doc\": \"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.\",\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.50.0\",\n          \"ios\": \"4.7.0\",\n          \"android\": \"7.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"line-layer-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"Opacity applied to the layer as a whole. Unlike `line-opacity` and alpha values in `line-color`, which are applied per feature and accumulate where lines overlap, `line-layer-opacity` is applied once so overlapping lines appear as a single surface at the given opacity. When both `line-opacity` and `line-layer-opacity` are set, the per-feature, overlap accumulation is preserved, then layer-opacity composites the result. This property affects only the layer it is set on and cannot be used to composite multiple layers together or control how this layer blends with layers above or below it.\\n\\n![line-opacity vs. line-layer-opacity](assets/line-layer-opacity.svg)\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"6.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4298\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4298\"\n        },\n        \"`global state` expression\": {\n          \"js\": \"6.0.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/3302\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/3302\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"global-state\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.23.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        }\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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. GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Zoom-dependent expressions will be evaluated only at integer zoom levels. The only way to create an array value is using `[\\\"literal\\\", [...]]`; arrays cannot be read from or derived from feature properties.\",\n      \"minimum\": 0,\n      \"transition\": true,\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        },\n        \"data-driven styling\": {\n          \"js\": \"5.8.0\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/744\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/744\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"line-pattern\": {\n      \"type\": \"resolvedImage\",\n      \"transition\": true,\n      \"doc\": \"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"line-gradient\": {\n      \"type\": \"color\",\n      \"doc\": \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n      \"transition\": false,\n      \"requires\": [\n        {\n          \"!\": \"line-dasharray\"\n        },\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        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"line-progress\"\n        ]\n      },\n      \"property-type\": \"color-ramp\"\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.18.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.18.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.20.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.20.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        }\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        }\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        }\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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  },\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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.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        },\n        \"data-driven styling\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.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        }\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        },\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"icon-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"transition\": true,\n      \"doc\": \"The color of the icon. This can only be used with SDF icons.\",\n      \"requires\": [\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"icon-halo-color\": {\n      \"type\": \"color\",\n      \"default\": \"rgba(0, 0, 0, 0)\",\n      \"transition\": true,\n      \"doc\": \"The color of the icon's halo. Icon halos can only be used with SDF icons.\",\n      \"requires\": [\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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\\nThe unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.\",\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        }\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        }\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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.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    \"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        }\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        }\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        }\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        }\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        }\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        }\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        }\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        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"resampling\": {\n      \"type\": \"enum\",\n      \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter.\\n![Visual comparison of linear resampling versus nearest resampling](assets/resampling.png)\",\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\": \"5.20.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4117\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4117\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\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. It is advised to use the generic `resampling` paint property instead.\",\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        }\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, or when a video is started or its coordinates are updated.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.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\": \"numberArray\",\n      \"default\": 335,\n      \"minimum\": 0,\n      \"maximum\": 359,\n      \"doc\": \"The direction of the light source(s) 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`. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.\",\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        },\n        \"multidirectional\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-illumination-altitude\": {\n      \"type\": \"numberArray\",\n      \"default\": 45,\n      \"minimum\": 0,\n      \"maximum\": 90,\n      \"doc\": \"The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.\",\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        },\n        \"multidirectional\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.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        }\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        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-shadow-color\": {\n      \"type\": \"colorArray\",\n      \"default\": \"#000000\",\n      \"doc\": \"The shading color of areas that face away from the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.\",\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        },\n        \"multidirectional\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.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\": \"colorArray\",\n      \"default\": \"#FFFFFF\",\n      \"doc\": \"The shading color of areas that faces towards the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.\",\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        },\n        \"multidirectional\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.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        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-method\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"standard\": {\n          \"doc\": \"The legacy hillshade method.\"\n        },\n        \"basic\": {\n          \"doc\": \"Basic hillshade. Uses a simple physics model where the reflected light intensity is proportional to the cosine of the angle between the incident light and the surface normal. Similar to GDAL's `gdaldem` default algorithm.\"\n        },\n        \"combined\": {\n          \"doc\": \"Hillshade algorithm whose intensity scales with slope. Similar to GDAL's `gdaldem` with `-combined` option.\"\n        },\n        \"igor\": {\n          \"doc\": \"Hillshade algorithm which tries to minimize effects on other map features beneath. Similar to GDAL's `gdaldem` with `-igor` option.\"\n        },\n        \"multidirectional\": {\n          \"doc\": \"Hillshade with multiple illumination directions. Uses the basic hillshade model with multiple independent light sources.\"\n        }\n      },\n      \"default\": \"standard\",\n      \"doc\": \"The hillshade algorithm to use, one of `standard`, `basic`, `combined`, `igor`, or `multidirectional`.\\n![Visual comparison of standard, basic, igor, combined, and multidirectional hillshade-method](assets/hillshade_methods.png)\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.5.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"resampling\": {\n      \"type\": \"enum\",\n      \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter.\\n![Visual comparison of linear resampling versus nearest resampling](assets/resampling.png)\",\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\": \"5.20.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4117\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4117\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_color-relief\": {\n    \"color-relief-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"The opacity at which the color-relief will be drawn.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.6.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"color-relief-color\": {\n      \"type\": \"color\",\n      \"doc\": \"Defines the color of each pixel based on its elevation. Should be an expression that uses `[\\\"elevation\\\"]` as input.\",\n      \"example\": [\n        \"interpolate\",\n        [\"linear\"],\n        [\"elevation\"],\n        0, \"black\",\n        8849, \"white\"\n      ],\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"5.6.0\",\n          \"android\": \"13.0.0\",\n          \"ios\": \"6.24.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"elevation\"\n        ]\n      },\n      \"property-type\": \"color-ramp\"\n    },\n    \"resampling\": {\n      \"type\": \"enum\",\n      \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter.\\n![Visual comparison of linear resampling versus nearest resampling](assets/resampling.png)\",\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\": \"5.20.0\",\n          \"android\": \"https://github.com/maplibre/maplibre-native/issues/4117\",\n          \"ios\": \"https://github.com/maplibre/maplibre-native/issues/4117\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\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        }\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\": true,\n      \"doc\": \"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"cross-faded\"\n    },\n    \"background-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"The opacity at which the background will be drawn.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\"\n        }\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    \"cross-faded\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n    },\n    \"cross-faded-data-driven\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression.\"\n    },\n    \"color-ramp\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n    },\n    \"data-constant\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is interpolable but cannot be represented using a property expression.\"\n    },\n    \"constant\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is constant across all zoom levels and property values.\"\n    }\n  },\n  \"promoteId\": {\n    \"*\": {\n      \"type\": \"string\",\n      \"doc\": \"A name of a feature property to use as ID for feature state.\"\n    }\n  },\n  \"interpolation\": {\n    \"type\": \"array\",\n    \"value\": \"interpolation_name\",\n    \"minimum\": 1,\n    \"doc\": \"An interpolation defines how to transition between items. The first element of an interpolation array is a string naming the interpolation operator, e.g. `\\\"linear\\\"` or `\\\"exponential\\\"`. Elements that follow (if any) are the _arguments_ to the interpolation.\"\n  },\n  \"interpolation_name\": {\n    \"doc\": \"First element in an interpolation array. May be followed by a number of arguments.\",\n    \"type\": \"enum\",\n    \"values\": {\n      \"linear\": {\n        \"doc\": \"Interpolates linearly between the pair of stops just less than and just greater than the input\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [],\n              \"output-type\": \"interpolation\"\n            }\n          ],\n          \"parameters\": []\n        },\n        \"example\": [\"linear\"],\n        \"sdk-support\": {\n          \"interpolate\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\"\n          },\n          \"interpolate-hcl\": {\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          },\n          \"interpolate-lab\":{\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          }\n        }\n      },\n      \"exponential\": {\n        \"doc\": \"Interpolates exponentially between the stops just less than and just greater than the input.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\n                \"base\"\n              ],\n              \"output-type\": \"interpolation\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"base\",\n              \"type\": \"number literal\",\n              \"doc\": \"rate at which the output increases in `f(x) = x^r`. Values higher than 1 increase, close to one behaves linearly, and below one decrease.\"\n            }\n          ]\n        },\n        \"example\": [\n          \"exponential\",\n          2\n        ],\n        \"sdk-support\": {\n          \"interpolate\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\"\n          },\n          \"interpolate-hcl\": {\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          },\n          \"interpolate-lab\":{\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          }\n        }\n      },\n      \"cubic-bezier\": {\n        \"doc\": \"Interpolates using the cubic bézier curve defined by the given control points.\",\n        \"syntax\": {\n          \"overloads\": [\n            {\n              \"parameters\": [\n                \"x1\",\n                \"y1\",\n                \"x2\",\n                \"y2\"\n              ],\n              \"output-type\": \"interpolation\"\n            }\n          ],\n          \"parameters\": [\n            {\n              \"name\": \"x1\",\n              \"type\": \"number literal\",\n              \"doc\": \"X-coordinate of the first control point. Must be between zero and one for a valid monotonic easing curve. Controls how quickly the curve speeds up at the beginning.\"\n            },\n            {\n              \"name\": \"y1\",\n              \"type\": \"number literal\",\n              \"doc\": \"Y-coordinate of the first control point. Typically between zero and one, but may exceed this range for overshoot effects. Influences the starting slope of the curve.\"\n            },\n            {\n              \"name\": \"x2\",\n              \"type\": \"number literal\",\n              \"doc\": \"X-coordinate of the second control point. Must be between zero and one for a valid monotonic easing curve. Controls when the curve begins to decelerate toward the end.\"\n            },\n            {\n              \"name\": \"y2\",\n              \"type\": \"number literal\",\n              \"doc\": \"Y-coordinate of the second control point. Typically between zero and one, but may exceed this range for overshoot effects. Influences the ending slope of the curve.\"\n            }\n          ]\n        },\n        \"example\": [\n          \"cubic-bezier\",\n          2,\n          3,\n          2,\n          3\n        ],\n        \"sdk-support\": {\n          \"interpolate\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\"\n          },\n          \"interpolate-hcl\": {\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          },\n          \"interpolate-lab\":{\n            \"js\": \"0.49.0\",\n            \"ios\": \"https://github.com/maplibre/maplibre-native/issues/2784\",\n            \"android\": \"https://github.com/maplibre/maplibre-native/issues/2784\"\n          }\n        }\n      }\n    }\n  }\n}\n","// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nconst stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nexport default function stringify(passedObj, options = {}) {\n  const indent = JSON.stringify(\n    [1],\n    undefined,\n    options.indent === undefined ? 2 : options.indent\n  ).slice(2, -3);\n\n  const maxLength =\n    indent === \"\"\n      ? Infinity\n      : options.maxLength === undefined\n      ? 80\n      : options.maxLength;\n\n  let { replacer } = options;\n\n  return (function _stringify(obj, currentIndent, reserved) {\n    if (obj && typeof obj.toJSON === \"function\") {\n      obj = obj.toJSON();\n    }\n\n    const string = JSON.stringify(obj, replacer);\n\n    if (string === undefined) {\n      return string;\n    }\n\n    const length = maxLength - currentIndent.length - reserved;\n\n    if (string.length <= length) {\n      const prettified = string.replace(\n        stringOrChar,\n        (match, stringLiteral) => {\n          return stringLiteral || `${match} `;\n        }\n      );\n      if (prettified.length <= length) {\n        return prettified;\n      }\n    }\n\n    if (replacer != null) {\n      obj = JSON.parse(string);\n      replacer = undefined;\n    }\n\n    if (typeof obj === \"object\" && obj !== null) {\n      const nextIndent = currentIndent + indent;\n      const items = [];\n      let index = 0;\n      let start;\n      let end;\n\n      if (Array.isArray(obj)) {\n        start = \"[\";\n        end = \"]\";\n        const { length } = obj;\n        for (; index < length; index++) {\n          items.push(\n            _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n              \"null\"\n          );\n        }\n      } else {\n        start = \"{\";\n        end = \"}\";\n        const keys = Object.keys(obj);\n        const { length } = keys;\n        for (; index < length; index++) {\n          const key = keys[index];\n          const keyPart = `${JSON.stringify(key)}: `;\n          const value = _stringify(\n            obj[key],\n            nextIndent,\n            keyPart.length + (index === length - 1 ? 0 : 1)\n          );\n          if (value !== undefined) {\n            items.push(keyPart + value);\n          }\n        }\n      }\n\n      if (items.length > 0) {\n        return [start, indent + items.join(`,\\n${nextIndent}`), end].join(\n          `\\n${currentIndent}`\n        );\n      }\n    }\n\n    return string;\n  })(passedObj, \"\", 0);\n}\n","import {latest} from './reference/latest';\nimport stringifyPretty from 'json-stringify-pretty-compact';\n\nfunction sortKeysBy(obj, reference) {\n    const result = {};\n    for (const key in reference) {\n        if (obj[key] !== undefined) {\n            result[key] = obj[key];\n        }\n    }\n    for (const key in obj) {\n        if (result[key] === undefined) {\n            result[key] = obj[key];\n        }\n    }\n    return result;\n}\n\n/**\n * Format a MapLibre Style.  Returns a stringified style with its keys\n * sorted in the same order as the reference style.\n *\n * The optional `space` argument is passed to\n * [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * to generate formatted output.\n *\n * If `space` is unspecified, a default of `2` spaces will be used.\n *\n * @private\n * @param {Object} style a MapLibre Style\n * @param {number} [space] space argument to pass to `JSON.stringify`\n * @returns {string} stringified formatted JSON\n * @example\n * var fs = require('fs');\n * var format = require('maplibre-gl-style-spec').format;\n * var style = fs.readFileSync('./source.json', 'utf8');\n * fs.writeFileSync('./dest.json', format(style));\n * fs.writeFileSync('./dest.min.json', format(style, 0));\n */\nexport function format(style, space = 2) {\n    style = sortKeysBy(style, latest.$root);\n\n    if (style.layers) {\n        style.layers = style.layers.map((layer) => sortKeysBy(layer, latest.layer));\n    }\n\n    return stringifyPretty(style, {indent: space});\n}\n","import Reference from './reference/v8.json' with {type: 'json'};\nimport type {StylePropertySpecification} from '.';\nimport type {\n    StyleSpecification,\n    SourceSpecification,\n    LayerSpecification,\n    PropertyValueSpecification,\n    DataDrivenPropertyValueSpecification\n} from './types.g';\n\nfunction getPropertyReference(propertyName: string): StylePropertySpecification | null {\n    for (let i = 0; i < Reference.layout.length; i++) {\n        for (const key in Reference[Reference.layout[i]]) {\n            if (key === propertyName) return Reference[Reference.layout[i]][key];\n        }\n    }\n    for (let i = 0; i < Reference.paint.length; i++) {\n        for (const key in Reference[Reference.paint[i]]) {\n            if (key === propertyName) return Reference[Reference.paint[i]][key];\n        }\n    }\n\n    return null;\n}\n\nexport function eachSource(style: StyleSpecification, callback: (_: SourceSpecification) => void) {\n    for (const k in style.sources) {\n        callback(style.sources[k]);\n    }\n}\n\nexport function eachLayer(style: StyleSpecification, callback: (_: LayerSpecification) => void) {\n    for (const layer of style.layers) {\n        callback(layer);\n    }\n}\n\ntype PropertyCallback = (a: {\n    path: [string, 'paint' | 'layout', string]; // [layerid, paint/layout, property key],\n    key: string;\n    value: PropertyValueSpecification<unknown> | DataDrivenPropertyValueSpecification<unknown>;\n    reference: StylePropertySpecification | null;\n    set: (\n        a: PropertyValueSpecification<unknown> | DataDrivenPropertyValueSpecification<unknown>\n    ) => void;\n}) => void;\n\nexport function eachProperty(\n    style: StyleSpecification,\n    options: {\n        paint?: boolean;\n        layout?: boolean;\n    },\n    callback: PropertyCallback\n) {\n    function inner(layer: LayerSpecification, propertyType: 'paint' | 'layout') {\n        const properties = layer[propertyType];\n        if (!properties) return;\n        Object.keys(properties).forEach((key) => {\n            callback({\n                path: [layer.id, propertyType, key],\n                key,\n                value: properties[key],\n                reference: getPropertyReference(key),\n                set(x) {\n                    properties[key] = x;\n                }\n            });\n        });\n    }\n\n    eachLayer(style, (layer) => {\n        if (options.paint) {\n            inner(layer, 'paint');\n        }\n        if (options.layout) {\n            inner(layer, 'layout');\n        }\n    });\n}\n","import {eachSource, eachLayer, eachProperty} from '../visit';\nimport type {LayerSpecification, StyleSpecification} from '../types.g';\n\nfunction eachLayout(\n    layer: LayerSpecification,\n    callback: (_: LayerSpecification['layout'], __: string) => void\n) {\n    for (const k in layer) {\n        if (k.indexOf('layout') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\n\nfunction eachPaint(\n    layer: LayerSpecification,\n    callback: (_: LayerSpecification['paint'], __: string) => void\n) {\n    for (const k in layer) {\n        if (k.indexOf('paint') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\n\nfunction resolveConstant(style: StyleSpecification, value: any) {\n    if (typeof value === 'string' && value[0] === '@') {\n        return resolveConstant(style, (style as any).constants[value]);\n    } else {\n        return value;\n    }\n}\n\nfunction isFunction(value) {\n    return Array.isArray(value.stops);\n}\n\nfunction renameProperty(obj: Object, from: string, to: string) {\n    obj[to] = obj[from];\n    delete obj[from];\n}\n\nexport function migrateV8(style: StyleSpecification) {\n    style.version = 8;\n\n    // Rename properties, reverse coordinates in source and layers\n    eachSource(style, (source) => {\n        if (source.type === 'video' && source['url'] !== undefined) {\n            renameProperty(source, 'url', 'urls');\n        }\n        if (source.type === 'video') {\n            source.coordinates.forEach((coord) => {\n                return coord.reverse();\n            });\n        }\n    });\n\n    eachLayer(style, (layer) => {\n        eachLayout(layer, (layout) => {\n            if (layout['symbol-min-distance'] !== undefined) {\n                renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n            }\n        });\n\n        eachPaint(layer, (paint) => {\n            if (paint['background-image'] !== undefined) {\n                renameProperty(paint, 'background-image', 'background-pattern');\n            }\n            if (paint['line-image'] !== undefined) {\n                renameProperty(paint, 'line-image', 'line-pattern');\n            }\n            if (paint['fill-image'] !== undefined) {\n                renameProperty(paint, 'fill-image', 'fill-pattern');\n            }\n        });\n    });\n\n    // Inline Constants\n    eachProperty(style, {paint: true, layout: true}, (property) => {\n        const value = resolveConstant(style, property.value);\n\n        if (isFunction(value)) {\n            value.stops.forEach((stop) => {\n                stop[1] = resolveConstant(style, stop[1]);\n            });\n        }\n\n        property.set(value);\n    });\n    delete style['constants'];\n\n    eachLayer(style, (layer) => {\n        // get rid of text-max-size, icon-max-size\n        // turn text-size, icon-size into layout properties\n        // https://github.com/mapbox/mapbox-gl-style-spec/issues/255\n\n        eachLayout(layer, (layout) => {\n            delete layout['text-max-size'];\n            delete layout['icon-max-size'];\n        });\n\n        eachPaint(layer, (paint) => {\n            if (paint['text-size']) {\n                if (!layer.layout) layer.layout = {};\n                layer.layout['text-size'] = paint['text-size'];\n                delete paint['text-size'];\n            }\n\n            if (paint['icon-size']) {\n                if (!layer.layout) layer.layout = {};\n                layer.layout['icon-size'] = paint['icon-size'];\n                delete paint['icon-size'];\n            }\n        });\n    });\n\n    function migrateFontStack(font) {\n        function splitAndTrim(string) {\n            return string.split(',').map((s) => {\n                return s.trim();\n            });\n        }\n\n        if (Array.isArray(font)) {\n            // Assume it's a previously migrated font-array.\n            return font;\n        } else if (typeof font === 'string') {\n            return splitAndTrim(font);\n        } else if (typeof font === 'object') {\n            font.stops.forEach((stop) => {\n                stop[1] = splitAndTrim(stop[1]);\n            });\n            return font;\n        } else {\n            throw new Error('unexpected font value');\n        }\n    }\n\n    eachLayer(style, (layer) => {\n        eachLayout(layer, (layout) => {\n            if (layout['text-font']) {\n                layout['text-font'] = migrateFontStack(layout['text-font']);\n            }\n        });\n    });\n\n    // Reverse order of symbol layers. This is an imperfect migration.\n    //\n    // The order of a symbol layer in the layers list affects two things:\n    // - how it is drawn relative to other layers (like oneway arrows below bridges)\n    // - the placement priority compared to other layers\n    //\n    // It's impossible to reverse the placement priority without breaking the draw order\n    // in some cases. This migration only reverses the order of symbol layers that\n    // are above all other types of layers.\n    //\n    // Symbol layers that are at the top of the map preserve their priority.\n    // Symbol layers that are below another type (line, fill) of layer preserve their draw order.\n\n    let firstSymbolLayer = 0;\n    for (let i = style.layers.length - 1; i >= 0; i--) {\n        const layer = style.layers[i];\n        if (layer.type !== 'symbol') {\n            firstSymbolLayer = i + 1;\n            break;\n        }\n    }\n\n    const symbolLayers = style.layers.splice(firstSymbolLayer);\n    symbolLayers.reverse();\n    style.layers = style.layers.concat(symbolLayers);\n\n    return style;\n}\n","export type NullTypeT = {\n    kind: 'null';\n};\nexport type NumberTypeT = {\n    kind: 'number';\n};\nexport type StringTypeT = {\n    kind: 'string';\n};\nexport type BooleanTypeT = {\n    kind: 'boolean';\n};\nexport type ColorTypeT = {\n    kind: 'color';\n};\nexport type ProjectionDefinitionTypeT = {\n    kind: 'projectionDefinition';\n};\nexport type ObjectTypeT = {\n    kind: 'object';\n};\nexport type ValueTypeT = {\n    kind: 'value';\n};\nexport type ErrorTypeT = {\n    kind: 'error';\n};\nexport type CollatorTypeT = {\n    kind: 'collator';\n};\nexport type FormattedTypeT = {\n    kind: 'formatted';\n};\nexport type PaddingTypeT = {\n    kind: 'padding';\n};\nexport type NumberArrayTypeT = {\n    kind: 'numberArray';\n};\nexport type ColorArrayTypeT = {\n    kind: 'colorArray';\n};\nexport type ResolvedImageTypeT = {\n    kind: 'resolvedImage';\n};\nexport type VariableAnchorOffsetCollectionTypeT = {\n    kind: 'variableAnchorOffsetCollection';\n};\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n    | NullTypeT\n    | NumberTypeT\n    | StringTypeT\n    | BooleanTypeT\n    | ColorTypeT\n    | ProjectionDefinitionTypeT\n    | ObjectTypeT\n    | ValueTypeT\n    | ArrayType\n    | ErrorTypeT\n    | CollatorTypeT\n    | FormattedTypeT\n    | PaddingTypeT\n    | NumberArrayTypeT\n    | ColorArrayTypeT\n    | ResolvedImageTypeT\n    | VariableAnchorOffsetCollectionTypeT;\n\nexport interface ArrayType<T extends Type = Type> {\n    kind: 'array';\n    itemType: T;\n    N: number;\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object';\n\nexport const NullType = {kind: 'null'} as NullTypeT;\nexport const NumberType = {kind: 'number'} as NumberTypeT;\nexport const StringType = {kind: 'string'} as StringTypeT;\nexport const BooleanType = {kind: 'boolean'} as BooleanTypeT;\nexport const ColorType = {kind: 'color'} as ColorTypeT;\nexport const ProjectionDefinitionType = {\n    kind: 'projectionDefinition'\n} as ProjectionDefinitionTypeT;\nexport const ObjectType = {kind: 'object'} as ObjectTypeT;\nexport const ValueType = {kind: 'value'} as ValueTypeT;\nexport const ErrorType = {kind: 'error'} as ErrorTypeT;\nexport const CollatorType = {kind: 'collator'} as CollatorTypeT;\nexport const FormattedType = {kind: 'formatted'} as FormattedTypeT;\nexport const PaddingType = {kind: 'padding'} as PaddingTypeT;\nexport const ColorArrayType = {kind: 'colorArray'} as ColorArrayTypeT;\nexport const NumberArrayType = {kind: 'numberArray'} as NumberArrayTypeT;\nexport const ResolvedImageType = {kind: 'resolvedImage'} as ResolvedImageTypeT;\nexport const VariableAnchorOffsetCollectionType = {\n    kind: 'variableAnchorOffsetCollection'\n} as VariableAnchorOffsetCollectionTypeT;\n\nexport function array<T extends Type>(itemType: T, N?: number | null): ArrayType<T> {\n    return {\n        kind: 'array',\n        itemType,\n        N\n    };\n}\n\nexport function typeToString(type: Type): string {\n    if (type.kind === 'array') {\n        const itemType = typeToString(type.itemType);\n        return typeof type.N === 'number'\n            ? `array<${itemType}, ${type.N}>`\n            : type.itemType.kind === 'value'\n              ? 'array'\n              : `array<${itemType}>`;\n    } else {\n        return type.kind;\n    }\n}\n\nconst valueMemberTypes = [\n    NullType,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    ProjectionDefinitionType,\n    FormattedType,\n    ObjectType,\n    array(ValueType),\n    PaddingType,\n    NumberArrayType,\n    ColorArrayType,\n    ResolvedImageType,\n    VariableAnchorOffsetCollectionType\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 (\n            t.kind === 'array' &&\n            ((t.N === 0 && t.itemType.kind === 'value') ||\n                !checkSubtype(expected.itemType, t.itemType)) &&\n            (typeof expected.N !== 'number' || expected.N === t.N)\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 ${typeToString(expected)} but found ${typeToString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array<Type>): boolean {\n    return allowedTypes.some((t) => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array<NativeType>): 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\n/**\n * Verify whether the specified type is of the same type as the specified sample.\n *\n * @param provided Type to verify\n * @param sample Sample type to reference\n * @returns `true` if both objects are of the same type, `false` otherwise\n * @example basic types\n * if (verifyType(outputType, ValueType)) {\n *     // type narrowed to:\n *     outputType.kind; // 'value'\n * }\n * @example array types\n * if (verifyType(outputType, array(NumberType))) {\n *     // type narrowed to:\n *     outputType.kind; // 'array'\n *     outputType.itemType; // NumberTypeT\n *     outputType.itemType.kind; // 'number'\n * }\n */\nexport function verifyType<T extends Type>(provided: Type, sample: T): provided is T {\n    if (provided.kind === 'array' && sample.kind === 'array') {\n        return provided.itemType.kind === sample.itemType.kind && typeof provided.N === 'number';\n    }\n    return provided.kind === sample.kind;\n}\n","/**\n * @param r Red component 0..1\n * @param g Green component 0..1\n * @param b Blue component 0..1\n * @param alpha Alpha component 0..1\n */\nexport type RGBColor = [r: number, g: number, b: number, alpha: number];\n\n/**\n * @param h Hue as degrees 0..360\n * @param s Saturation as percentage 0..100\n * @param l Lightness as percentage 0..100\n * @param alpha Alpha component 0..1\n */\nexport type HSLColor = [h: number, s: number, l: number, alpha: number];\n\n/**\n * @param h Hue as degrees 0..360\n * @param c Chroma 0..~230\n * @param l Lightness as percentage 0..100\n * @param alpha Alpha component 0..1\n */\nexport type HCLColor = [h: number, c: number, l: number, alpha: number];\n\n/**\n * @param l Lightness as percentage 0..100\n * @param a A axis value -125..125\n * @param b B axis value -125..125\n * @param alpha Alpha component 0..1\n */\nexport type LABColor = [l: number, a: number, b: number, alpha: number];\n\n// See https://observablehq.com/@mbostock/lab-and-rgb\nconst Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\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\nfunction constrainAngle(angle: number): number {\n    angle = angle % 360;\n    if (angle < 0) {\n        angle += 360;\n    }\n    return angle;\n}\n\nexport function rgbToLab([r, g, b, alpha]: RGBColor): LABColor {\n    r = rgb2xyz(r);\n    g = rgb2xyz(g);\n    b = rgb2xyz(b);\n    let x, z;\n    const y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn);\n    if (r === g && g === b) {\n        x = z = y;\n    } else {\n        x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n        z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n    }\n\n    const l = 116 * y - 16;\n    return [l < 0 ? 0 : l, 500 * (x - y), 200 * (y - z), alpha];\n}\n\nfunction rgb2xyz(x: number): number {\n    return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction xyz2lab(t: number): number {\n    return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nexport function labToRgb([l, a, b, alpha]: LABColor): RGBColor {\n    let y = (l + 16) / 116,\n        x = isNaN(a) ? y : y + a / 500,\n        z = isNaN(b) ? y : y - b / 200;\n\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n\n    return [\n        xyz2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), // D50 -> sRGB\n        xyz2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z),\n        xyz2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n        alpha\n    ];\n}\n\nfunction xyz2rgb(x: number): number {\n    x = x <= 0.00304 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;\n    return x < 0 ? 0 : x > 1 ? 1 : x; // clip to 0..1 range\n}\n\nfunction lab2xyz(t: number): number {\n    return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nexport function rgbToHcl(rgbColor: RGBColor): HCLColor {\n    const [l, a, b, alpha] = rgbToLab(rgbColor);\n    const c = Math.sqrt(a * a + b * b);\n    const h = Math.round(c * 10000) ? constrainAngle(Math.atan2(b, a) * rad2deg) : NaN;\n    return [h, c, l, alpha];\n}\n\nexport function hclToRgb([h, c, l, alpha]: HCLColor): RGBColor {\n    h = isNaN(h) ? 0 : h * deg2rad;\n    return labToRgb([l, Math.cos(h) * c, Math.sin(h) * c, alpha]);\n}\n\n// https://drafts.csswg.org/css-color-4/#hsl-to-rgb\nexport function hslToRgb([h, s, l, alpha]: HSLColor): RGBColor {\n    h = constrainAngle(h);\n    s /= 100;\n    l /= 100;\n\n    function f(n) {\n        const k = (n + h / 30) % 12;\n        const a = s * Math.min(l, 1 - l);\n        return l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));\n    }\n\n    return [f(0), f(8), f(4), alpha];\n}\n","type HasOwnPropertyFn = <TObject extends object>(\n    obj: TObject,\n    key: PropertyKey\n) => key is keyof TObject;\n\n// polyfill for Object.hasOwn\nconst hasOwnProperty: HasOwnPropertyFn =\n    (Object.hasOwn as HasOwnPropertyFn) ||\n    function hasOwnProperty<T extends object>(object: T, key: PropertyKey): key is keyof T {\n        return Object.prototype.hasOwnProperty.call(object, key);\n    };\n\nexport function getOwn<T extends object>(object: T, key: PropertyKey): T[keyof T] | undefined {\n    return hasOwnProperty(object, key) ? object[key] : undefined;\n}\n","import {getOwn} from '../../util/get_own';\nimport {HSLColor, hslToRgb, RGBColor} from './color_spaces';\n\n/**\n * CSS color parser compliant with CSS Color 4 Specification.\n * Supports: named colors, `transparent` keyword, all rgb hex notations,\n * rgb(), rgba(), hsl() and hsla() functions.\n * Does not round the parsed values to integers from the range 0..255.\n *\n * Syntax:\n *\n * <alpha-value> = <number> | <percentage>\n *         <hue> = <number> | <angle>\n *\n *         rgb() = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? )\n *         rgb() = rgb( <percentage>#{3} , <alpha-value>? )    | rgb( <number>#{3} , <alpha-value>? )\n *\n *         hsl() = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? )\n *         hsl() = hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )\n *\n * Caveats:\n *   - <angle> - <number> with optional `deg` suffix; `grad`, `rad`, `turn` are not supported\n *   - `none` keyword is not supported\n *   - comments inside rgb()/hsl() are not supported\n *   - legacy color syntax rgba() is supported with an identical grammar and behavior to rgb()\n *   - legacy color syntax hsla() is supported with an identical grammar and behavior to hsl()\n *\n * @param input CSS color string to parse.\n * @returns Color in sRGB color space, with `red`, `green`, `blue`\n * and `alpha` channels normalized to the range 0..1,\n * or `undefined` if the input is not a valid color string.\n */\nexport function parseCssColor(input: string): RGBColor | undefined {\n    input = input.toLowerCase().trim();\n\n    if (input === 'transparent') {\n        return [0, 0, 0, 0];\n    }\n\n    // 'white', 'black', 'blue'\n    const namedColorsMatch = getOwn(namedColors, input);\n    if (namedColorsMatch) {\n        const [r, g, b] = namedColorsMatch;\n        return [r / 255, g / 255, b / 255, 1];\n    }\n\n    // #f0c, #f0cf, #ff00cc, #ff00ccff\n    if (input.startsWith('#')) {\n        const hexRegexp = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/;\n        if (hexRegexp.test(input)) {\n            const step = input.length < 6 ? 1 : 2;\n            let i = 1;\n            return [\n                parseHex(input.slice(i, (i += step))),\n                parseHex(input.slice(i, (i += step))),\n                parseHex(input.slice(i, (i += step))),\n                parseHex(input.slice(i, i + step) || 'ff')\n            ];\n        }\n    }\n\n    // rgb(128 0 0), rgb(50% 0% 0%), rgba(255,0,255,0.6), rgb(255 0 255 / 60%), rgb(100% 0% 100% /.6)\n    if (input.startsWith('rgb')) {\n        const rgbRegExp =\n            /^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/;\n        const rgbMatch = input.match(rgbRegExp);\n        if (rgbMatch) {\n            const [\n                _, // eslint-disable-line @typescript-eslint/no-unused-vars\n                r, // <numeric>\n                rp, // %         (optional)\n                f1, // ,         (optional)\n                g, // <numeric>\n                gp, // %         (optional)\n                f2, // ,         (optional)\n                b, // <numeric>\n                bp, // %         (optional)\n                f3, // ,|/       (optional)\n                a, // <numeric> (optional)\n                ap // %         (optional)\n            ] = rgbMatch;\n\n            const argFormat = [f1 || ' ', f2 || ' ', f3].join('');\n            if (\n                argFormat === '  ' ||\n                argFormat === '  /' ||\n                argFormat === ',,' ||\n                argFormat === ',,,'\n            ) {\n                const valFormat = [rp, gp, bp].join('');\n                const maxValue = valFormat === '%%%' ? 100 : valFormat === '' ? 255 : 0;\n                if (maxValue) {\n                    const rgba: RGBColor = [\n                        clamp(+r / maxValue, 0, 1),\n                        clamp(+g / maxValue, 0, 1),\n                        clamp(+b / maxValue, 0, 1),\n                        a ? parseAlpha(+a, ap) : 1\n                    ];\n                    if (validateNumbers(rgba)) {\n                        return rgba;\n                    }\n                    // invalid numbers\n                }\n                // values must be all numbers or all percentages\n            }\n            return; // comma optional syntax requires no commas at all\n        }\n    }\n\n    // hsl(120 50% 80%), hsla(120deg,50%,80%,.9), hsl(12e1 50% 80% / 90%)\n    const hslRegExp =\n        /^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/;\n    const hslMatch = input.match(hslRegExp);\n    if (hslMatch) {\n        const [\n            _, // eslint-disable-line @typescript-eslint/no-unused-vars\n            h, // <numeric>\n            f1, // ,         (optional)\n            s, // <numeric>\n            f2, // ,         (optional)\n            l, // <numeric>\n            f3, // ,|/       (optional)\n            a, // <numeric> (optional)\n            ap // %         (optional)\n        ] = hslMatch;\n\n        const argFormat = [f1 || ' ', f2 || ' ', f3].join('');\n        if (\n            argFormat === '  ' ||\n            argFormat === '  /' ||\n            argFormat === ',,' ||\n            argFormat === ',,,'\n        ) {\n            const hsla: HSLColor = [\n                +h,\n                clamp(+s, 0, 100),\n                clamp(+l, 0, 100),\n                a ? parseAlpha(+a, ap) : 1\n            ];\n            if (validateNumbers(hsla)) {\n                return hslToRgb(hsla);\n            }\n            // invalid numbers\n        }\n        // comma optional syntax requires no commas at all\n    }\n}\n\nfunction parseHex(hex: string): number {\n    return parseInt(hex.padEnd(2, hex), 16) / 255;\n}\n\nfunction parseAlpha(a: number, asPercentage: string | undefined): number {\n    return clamp(asPercentage ? a / 100 : a, 0, 1);\n}\n\nfunction clamp(n: number, min: number, max: number): number {\n    return Math.min(Math.max(min, n), max);\n}\n\n/**\n * The regular expression for numeric values is not super specific, and it may\n * happen that it will accept a value that is not a valid number. In order to\n * detect and eliminate such values this function exists.\n *\n * @param array Array of uncertain numbers.\n * @returns `true` if the specified array contains only valid numbers, `false` otherwise.\n */\nfunction validateNumbers(array: number[]): boolean {\n    return !array.some(Number.isNaN);\n}\n\n/**\n * To generate:\n * - visit {@link https://www.w3.org/TR/css-color-4/#named-colors}\n * - run in the console:\n * @example\n * copy(`{\\n${[...document.querySelector('.named-color-table tbody').children].map((tr) => `${tr.cells[2].textContent.trim()}: [${tr.cells[4].textContent.trim().split(/\\s+/).join(', ')}],`).join('\\n')}\\n}`);\n */\nconst namedColors: Record<string, [number, number, number]> = {\n    aliceblue: [240, 248, 255],\n    antiquewhite: [250, 235, 215],\n    aqua: [0, 255, 255],\n    aquamarine: [127, 255, 212],\n    azure: [240, 255, 255],\n    beige: [245, 245, 220],\n    bisque: [255, 228, 196],\n    black: [0, 0, 0],\n    blanchedalmond: [255, 235, 205],\n    blue: [0, 0, 255],\n    blueviolet: [138, 43, 226],\n    brown: [165, 42, 42],\n    burlywood: [222, 184, 135],\n    cadetblue: [95, 158, 160],\n    chartreuse: [127, 255, 0],\n    chocolate: [210, 105, 30],\n    coral: [255, 127, 80],\n    cornflowerblue: [100, 149, 237],\n    cornsilk: [255, 248, 220],\n    crimson: [220, 20, 60],\n    cyan: [0, 255, 255],\n    darkblue: [0, 0, 139],\n    darkcyan: [0, 139, 139],\n    darkgoldenrod: [184, 134, 11],\n    darkgray: [169, 169, 169],\n    darkgreen: [0, 100, 0],\n    darkgrey: [169, 169, 169],\n    darkkhaki: [189, 183, 107],\n    darkmagenta: [139, 0, 139],\n    darkolivegreen: [85, 107, 47],\n    darkorange: [255, 140, 0],\n    darkorchid: [153, 50, 204],\n    darkred: [139, 0, 0],\n    darksalmon: [233, 150, 122],\n    darkseagreen: [143, 188, 143],\n    darkslateblue: [72, 61, 139],\n    darkslategray: [47, 79, 79],\n    darkslategrey: [47, 79, 79],\n    darkturquoise: [0, 206, 209],\n    darkviolet: [148, 0, 211],\n    deeppink: [255, 20, 147],\n    deepskyblue: [0, 191, 255],\n    dimgray: [105, 105, 105],\n    dimgrey: [105, 105, 105],\n    dodgerblue: [30, 144, 255],\n    firebrick: [178, 34, 34],\n    floralwhite: [255, 250, 240],\n    forestgreen: [34, 139, 34],\n    fuchsia: [255, 0, 255],\n    gainsboro: [220, 220, 220],\n    ghostwhite: [248, 248, 255],\n    gold: [255, 215, 0],\n    goldenrod: [218, 165, 32],\n    gray: [128, 128, 128],\n    green: [0, 128, 0],\n    greenyellow: [173, 255, 47],\n    grey: [128, 128, 128],\n    honeydew: [240, 255, 240],\n    hotpink: [255, 105, 180],\n    indianred: [205, 92, 92],\n    indigo: [75, 0, 130],\n    ivory: [255, 255, 240],\n    khaki: [240, 230, 140],\n    lavender: [230, 230, 250],\n    lavenderblush: [255, 240, 245],\n    lawngreen: [124, 252, 0],\n    lemonchiffon: [255, 250, 205],\n    lightblue: [173, 216, 230],\n    lightcoral: [240, 128, 128],\n    lightcyan: [224, 255, 255],\n    lightgoldenrodyellow: [250, 250, 210],\n    lightgray: [211, 211, 211],\n    lightgreen: [144, 238, 144],\n    lightgrey: [211, 211, 211],\n    lightpink: [255, 182, 193],\n    lightsalmon: [255, 160, 122],\n    lightseagreen: [32, 178, 170],\n    lightskyblue: [135, 206, 250],\n    lightslategray: [119, 136, 153],\n    lightslategrey: [119, 136, 153],\n    lightsteelblue: [176, 196, 222],\n    lightyellow: [255, 255, 224],\n    lime: [0, 255, 0],\n    limegreen: [50, 205, 50],\n    linen: [250, 240, 230],\n    magenta: [255, 0, 255],\n    maroon: [128, 0, 0],\n    mediumaquamarine: [102, 205, 170],\n    mediumblue: [0, 0, 205],\n    mediumorchid: [186, 85, 211],\n    mediumpurple: [147, 112, 219],\n    mediumseagreen: [60, 179, 113],\n    mediumslateblue: [123, 104, 238],\n    mediumspringgreen: [0, 250, 154],\n    mediumturquoise: [72, 209, 204],\n    mediumvioletred: [199, 21, 133],\n    midnightblue: [25, 25, 112],\n    mintcream: [245, 255, 250],\n    mistyrose: [255, 228, 225],\n    moccasin: [255, 228, 181],\n    navajowhite: [255, 222, 173],\n    navy: [0, 0, 128],\n    oldlace: [253, 245, 230],\n    olive: [128, 128, 0],\n    olivedrab: [107, 142, 35],\n    orange: [255, 165, 0],\n    orangered: [255, 69, 0],\n    orchid: [218, 112, 214],\n    palegoldenrod: [238, 232, 170],\n    palegreen: [152, 251, 152],\n    paleturquoise: [175, 238, 238],\n    palevioletred: [219, 112, 147],\n    papayawhip: [255, 239, 213],\n    peachpuff: [255, 218, 185],\n    peru: [205, 133, 63],\n    pink: [255, 192, 203],\n    plum: [221, 160, 221],\n    powderblue: [176, 224, 230],\n    purple: [128, 0, 128],\n    rebeccapurple: [102, 51, 153],\n    red: [255, 0, 0],\n    rosybrown: [188, 143, 143],\n    royalblue: [65, 105, 225],\n    saddlebrown: [139, 69, 19],\n    salmon: [250, 128, 114],\n    sandybrown: [244, 164, 96],\n    seagreen: [46, 139, 87],\n    seashell: [255, 245, 238],\n    sienna: [160, 82, 45],\n    silver: [192, 192, 192],\n    skyblue: [135, 206, 235],\n    slateblue: [106, 90, 205],\n    slategray: [112, 128, 144],\n    slategrey: [112, 128, 144],\n    snow: [255, 250, 250],\n    springgreen: [0, 255, 127],\n    steelblue: [70, 130, 180],\n    tan: [210, 180, 140],\n    teal: [0, 128, 128],\n    thistle: [216, 191, 216],\n    tomato: [255, 99, 71],\n    turquoise: [64, 224, 208],\n    violet: [238, 130, 238],\n    wheat: [245, 222, 179],\n    white: [255, 255, 255],\n    whitesmoke: [245, 245, 245],\n    yellow: [255, 255, 0],\n    yellowgreen: [154, 205, 50]\n};\n","export function interpolateNumber(from: number, to: number, t: number): number {\n    return from + t * (to - from);\n}\n\nexport function interpolateArray<T extends number[]>(from: T, to: T, t: number): T {\n    return from.map((d, i) => {\n        return interpolateNumber(d, to[i], t);\n    }) as T;\n}\n","import {HCLColor, hclToRgb, LABColor, labToRgb, RGBColor, rgbToHcl, rgbToLab} from './color_spaces';\nimport {parseCssColor} from './parse_css_color';\nimport {interpolateArray, interpolateNumber} from '../../util/interpolate-primitives';\n\nexport type InterpolationColorSpace = 'rgb' | 'hcl' | 'lab';\n\n/**\n * Checks whether the specified color space is one of the supported interpolation color spaces.\n *\n * @param colorSpace Color space key to verify.\n * @returns `true` if the specified color space is one of the supported\n * interpolation color spaces, `false` otherwise\n */\nexport function isSupportedInterpolationColorSpace(\n    colorSpace: string\n): colorSpace is InterpolationColorSpace {\n    return colorSpace === 'rgb' || colorSpace === 'hcl' || colorSpace === 'lab';\n}\n\n/**\n * Color representation used by WebGL.\n * Defined in sRGB color space and pre-blended with alpha.\n * @private\n */\nexport class Color {\n    readonly r: number;\n    readonly g: number;\n    readonly b: number;\n    readonly a: number;\n\n    /**\n     * @param r Red component premultiplied by `alpha` 0..1\n     * @param g Green component premultiplied by `alpha` 0..1\n     * @param b Blue component premultiplied by `alpha` 0..1\n     * @param [alpha=1] Alpha component 0..1\n     * @param [premultiplied=true] Whether the `r`, `g` and `b` values have already\n     * been multiplied by alpha. If `true` nothing happens if `false` then they will\n     * be multiplied automatically.\n     */\n    constructor(r: number, g: number, b: number, alpha = 1, premultiplied = true) {\n        this.r = r;\n        this.g = g;\n        this.b = b;\n        this.a = alpha;\n\n        if (!premultiplied) {\n            this.r *= alpha;\n            this.g *= alpha;\n            this.b *= alpha;\n\n            if (!alpha) {\n                // alpha = 0 erases completely rgb channels. This behavior is not desirable\n                // if this particular color is later used in color interpolation.\n                // Because of that, a reference to original color is saved.\n                this.overwriteGetter('rgb', [r, g, b, alpha]);\n            }\n        }\n    }\n\n    static black = new Color(0, 0, 0, 1);\n    static white = new Color(1, 1, 1, 1);\n    static transparent = new Color(0, 0, 0, 0);\n    static red = new Color(1, 0, 0, 1);\n\n    /**\n     * Parses CSS color strings and converts colors to sRGB color space if needed.\n     * Officially supported color formats:\n     * - keyword, e.g. 'aquamarine' or 'steelblue'\n     * - hex (with 3, 4, 6 or 8 digits), e.g. '#f0f' or '#e9bebea9'\n     * - rgb and rgba, e.g. 'rgb(0,240,120)' or 'rgba(0%,94%,47%,0.1)' or 'rgb(0 240 120 / .3)'\n     * - hsl and hsla, e.g. 'hsl(0,0%,83%)' or 'hsla(0,0%,83%,.5)' or 'hsl(0 0% 83% / 20%)'\n     *\n     * @param input CSS color string to parse.\n     * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n     */\n    static parse(input: Color | string | undefined | null): Color | undefined {\n        // in zoom-and-property function input could be an instance of Color class\n        if (input instanceof Color) {\n            return input;\n        }\n\n        if (typeof input !== 'string') {\n            return;\n        }\n\n        const rgba = parseCssColor(input);\n        if (rgba) {\n            return new Color(...rgba, false);\n        }\n    }\n\n    /**\n     * Used in color interpolation and by 'to-rgba' expression.\n     *\n     * @returns Gien color, with reversed alpha blending, in sRGB color space.\n     */\n    get rgb(): RGBColor {\n        const {r, g, b, a} = this;\n        const f = a || Infinity; // reverse alpha blending factor\n        return this.overwriteGetter('rgb', [r / f, g / f, b / f, a]);\n    }\n\n    /**\n     * Used in color interpolation.\n     *\n     * @returns Gien color, with reversed alpha blending, in HCL color space.\n     */\n    get hcl(): HCLColor {\n        return this.overwriteGetter('hcl', rgbToHcl(this.rgb));\n    }\n\n    /**\n     * Used in color interpolation.\n     *\n     * @returns Gien color, with reversed alpha blending, in LAB color space.\n     */\n    get lab(): LABColor {\n        return this.overwriteGetter('lab', rgbToLab(this.rgb));\n    }\n\n    /**\n     * Lazy getter pattern. When getter is called for the first time lazy value\n     * is calculated and then overwrites getter function in given object instance.\n     *\n     * @example:\n     * const redColor = Color.parse('red');\n     * let x = redColor.hcl; // this will invoke `get hcl()`, which will calculate\n     * // the value of red in HCL space and invoke this `overwriteGetter` function\n     * // which in turn will set a field with a key 'hcl' in the `redColor` object.\n     * // In other words it will override `get hcl()` from its `Color` prototype\n     * // with its own property: hcl = [calculated red value in hcl].\n     * let y = redColor.hcl; // next call will no longer invoke getter but simply\n     * // return the previously calculated value\n     * x === y; // true - `x` is exactly the same object as `y`\n     *\n     * @param getterKey Getter key\n     * @param lazyValue Lazily calculated value to be memoized by current instance\n     * @private\n     */\n    private overwriteGetter<T>(getterKey: string, lazyValue: T): T {\n        Object.defineProperty(this, getterKey, {value: lazyValue});\n        return lazyValue;\n    }\n\n    /**\n     * Used by 'to-string' expression.\n     *\n     * @returns Serialized color in format `rgba(r,g,b,a)`\n     * where r,g,b are numbers within 0..255 and alpha is number within 1..0\n     *\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.rgb;\n        return `rgba(${[r, g, b].map((n) => Math.round(n * 255)).join(',')},${a})`;\n    }\n\n    static interpolate(\n        from: Color,\n        to: Color,\n        t: number,\n        spaceKey: InterpolationColorSpace = 'rgb'\n    ): Color {\n        switch (spaceKey) {\n            case 'rgb': {\n                const [r, g, b, alpha] = interpolateArray(from.rgb, to.rgb, t);\n                return new Color(r, g, b, alpha, false);\n            }\n            case 'hcl': {\n                const [hue0, chroma0, light0, alphaF] = from.hcl;\n                const [hue1, chroma1, light1, alphaT] = to.hcl;\n\n                // https://github.com/gka/chroma.js/blob/cd1b3c0926c7a85cbdc3b1453b3a94006de91a92/src/interpolator/_hsx.js\n                let hue, chroma;\n\n                if (!isNaN(hue0) && !isNaN(hue1)) {\n                    let dh = hue1 - hue0;\n                    if (hue1 > hue0 && dh > 180) {\n                        dh -= 360;\n                    } else if (hue1 < hue0 && hue0 - hue1 > 180) {\n                        dh += 360;\n                    }\n                    hue = hue0 + t * dh;\n                } else if (!isNaN(hue0)) {\n                    hue = hue0;\n                    if (light1 === 1 || light1 === 0) chroma = chroma0;\n                } else if (!isNaN(hue1)) {\n                    hue = hue1;\n                    if (light0 === 1 || light0 === 0) chroma = chroma1;\n                } else {\n                    hue = NaN;\n                }\n\n                const [r, g, b, alpha] = hclToRgb([\n                    hue,\n                    chroma ?? interpolateNumber(chroma0, chroma1, t),\n                    interpolateNumber(light0, light1, t),\n                    interpolateNumber(alphaF, alphaT, t)\n                ]);\n                return new Color(r, g, b, alpha, false);\n            }\n            case 'lab': {\n                const [r, g, b, alpha] = labToRgb(interpolateArray(from.lab, to.lab, t));\n                return new Color(r, g, b, alpha, false);\n            }\n        }\n    }\n}\n","export 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) this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n        else this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n\n        this.locale = locale;\n        this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n            sensitivity: this.sensitivity,\n            usage: 'search'\n        });\n    }\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 : []).resolvedOptions().locale;\n    }\n}\n","import type {Color} from '../../expression/types/color';\nimport type {ResolvedImage} from '../types/resolved_image';\n\nexport const VERTICAL_ALIGN_OPTIONS = ['bottom', 'center', 'top'] as const;\nexport type VerticalAlign = (typeof VERTICAL_ALIGN_OPTIONS)[number];\n\nexport class FormattedSection {\n    text: string;\n    image: ResolvedImage | null;\n    scale: number | null;\n    fontStack: string | null;\n    textColor: Color | null;\n    verticalAlign: VerticalAlign | null;\n\n    constructor(\n        text: string,\n        image: ResolvedImage | null,\n        scale: number | null,\n        fontStack: string | null,\n        textColor: Color | null,\n        verticalAlign: VerticalAlign | null\n    ) {\n        this.text = text;\n        this.image = image;\n        this.scale = scale;\n        this.fontStack = fontStack;\n        this.textColor = textColor;\n        this.verticalAlign = verticalAlign;\n    }\n}\n\nexport class Formatted {\n    sections: Array<FormattedSection>;\n\n    constructor(sections: Array<FormattedSection>) {\n        this.sections = sections;\n    }\n\n    static fromString(unformatted: string): Formatted {\n        return new Formatted([new FormattedSection(unformatted, null, null, null, null, null)]);\n    }\n\n    isEmpty(): boolean {\n        if (this.sections.length === 0) return true;\n        return !this.sections.some(\n            (section) =>\n                section.text.length !== 0 || (section.image && section.image.name.length !== 0)\n        );\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","import {interpolateArray} from '../../util/interpolate-primitives';\n\n/**\n * A set of four numbers representing padding around a box. Create instances from\n * bare arrays or numeric values using the static method `Padding.parse`.\n * @private\n */\nexport class Padding {\n    /** Padding values are in CSS order: top, right, bottom, left */\n    values: [number, number, number, number];\n\n    constructor(values: [number, number, number, number]) {\n        this.values = values.slice() as [number, number, number, number];\n    }\n\n    /**\n     * Numeric padding values\n     * @param input A padding value\n     * @returns A `Padding` instance, or `undefined` if the input is not a valid padding value.\n     */\n    static parse(input?: number | number[] | Padding | null): Padding | undefined {\n        if (input instanceof Padding) {\n            return input;\n        }\n\n        // Backwards compatibility: bare number is treated the same as array with single value.\n        // Padding applies to all four sides.\n        if (typeof input === 'number') {\n            return new Padding([input, input, input, input]);\n        }\n\n        if (!Array.isArray(input)) {\n            return undefined;\n        }\n\n        if (input.length < 1 || input.length > 4) {\n            return undefined;\n        }\n\n        for (const val of input) {\n            if (typeof val !== 'number') {\n                return undefined;\n            }\n        }\n\n        // Expand shortcut properties into explicit 4-sided values\n        switch (input.length) {\n            case 1:\n                input = [input[0], input[0], input[0], input[0]];\n                break;\n            case 2:\n                input = [input[0], input[1], input[0], input[1]];\n                break;\n            case 3:\n                input = [input[0], input[1], input[2], input[1]];\n                break;\n        }\n\n        return new Padding(input as [number, number, number, number]);\n    }\n\n    toString(): string {\n        return JSON.stringify(this.values);\n    }\n\n    static interpolate(from: Padding, to: Padding, t: number): Padding {\n        return new Padding(interpolateArray(from.values, to.values, t));\n    }\n}\n","import {interpolateArray} from '../../util/interpolate-primitives';\n\n/**\n * An array of numbers. Create instances from\n * bare arrays or numeric values using the static method `NumberArray.parse`.\n * @private\n */\nexport class NumberArray {\n    values: number[];\n\n    constructor(values: number[]) {\n        this.values = values.slice();\n    }\n\n    /**\n     * Numeric NumberArray values\n     * @param input A NumberArray value\n     * @returns A `NumberArray` instance, or `undefined` if the input is not a valid NumberArray value.\n     */\n    static parse(input?: number | number[] | NumberArray | null): NumberArray | undefined {\n        if (input instanceof NumberArray) {\n            return input;\n        }\n\n        // Backwards compatibility (e.g. hillshade-illumination-direction): bare number is treated the same as array with single value.\n        if (typeof input === 'number') {\n            return new NumberArray([input]);\n        }\n\n        if (!Array.isArray(input)) {\n            return undefined;\n        }\n\n        for (const val of input) {\n            if (typeof val !== 'number') {\n                return undefined;\n            }\n        }\n\n        return new NumberArray(input);\n    }\n\n    toString(): string {\n        return JSON.stringify(this.values);\n    }\n\n    static interpolate(from: NumberArray, to: NumberArray, t: number): NumberArray {\n        return new NumberArray(interpolateArray(from.values, to.values, t));\n    }\n}\n","import {Color, InterpolationColorSpace} from './color';\n\n/**\n * An array of colors. Create instances from\n * bare arrays or strings using the static method `ColorArray.parse`.\n * @private\n */\nexport class ColorArray {\n    values: Color[];\n\n    constructor(values: Color[]) {\n        this.values = values.slice();\n    }\n\n    /**\n     * ColorArray values\n     * @param input A ColorArray value\n     * @returns A `ColorArray` instance, or `undefined` if the input is not a valid ColorArray value.\n     */\n    static parse(input?: string | string[] | ColorArray | null): ColorArray | undefined {\n        if (input instanceof ColorArray) {\n            return input;\n        }\n\n        // Backwards compatibility (e.g. hillshade-shadow-color): bare Color is treated the same as array with single value.\n        if (typeof input === 'string') {\n            const parsed_val = Color.parse(input);\n            if (!parsed_val) {\n                return undefined;\n            }\n            return new ColorArray([parsed_val]);\n        }\n\n        if (!Array.isArray(input)) {\n            return undefined;\n        }\n\n        const colors: Color[] = [];\n\n        for (const val of input) {\n            if (typeof val !== 'string') {\n                return undefined;\n            }\n            const parsed_val = Color.parse(val);\n            if (!parsed_val) {\n                return undefined;\n            }\n            colors.push(parsed_val);\n        }\n\n        return new ColorArray(colors);\n    }\n\n    toString(): string {\n        return JSON.stringify(this.values);\n    }\n\n    static interpolate(\n        from: ColorArray,\n        to: ColorArray,\n        t: number,\n        spaceKey: InterpolationColorSpace = 'rgb'\n    ): ColorArray {\n        const colors = [] as Color[];\n        if (from.values.length != to.values.length) {\n            throw new Error(\n                `colorArray: Arrays have mismatched length (${from.values.length} vs. ${to.values.length}), cannot interpolate.`\n            );\n        }\n        for (let i = 0; i < from.values.length; i++) {\n            colors.push(Color.interpolate(from.values[i], to.values[i], t, spaceKey));\n        }\n        return new ColorArray(colors);\n    }\n}\n","export class RuntimeError extends Error {\n    constructor(message: string) {\n        super(message);\n        this.name = 'RuntimeError';\n    }\n\n    toJSON() {\n        return this.message;\n    }\n}\n","import {RuntimeError} from '../runtime_error';\nimport {interpolateNumber} from '../../util/interpolate-primitives';\nimport type {VariableAnchorOffsetCollectionSpecification} from '../../types.g';\n\n/** Set of valid anchor positions, as a set for validation */\nconst anchors = new Set([\n    'center',\n    'left',\n    'right',\n    'top',\n    'bottom',\n    'top-left',\n    'top-right',\n    'bottom-left',\n    'bottom-right'\n]);\n\n/**\n * Utility class to assist managing values for text-variable-anchor-offset property. Create instances from\n * bare arrays using the static method `VariableAnchorOffsetCollection.parse`.\n * @private\n */\nexport class VariableAnchorOffsetCollection {\n    /** Series of paired of anchor (string) and offset (point) values */\n    values: VariableAnchorOffsetCollectionSpecification;\n\n    constructor(values: VariableAnchorOffsetCollectionSpecification) {\n        this.values = values.slice();\n    }\n\n    static parse(\n        input?: VariableAnchorOffsetCollectionSpecification | VariableAnchorOffsetCollection\n    ): VariableAnchorOffsetCollection | undefined {\n        if (input instanceof VariableAnchorOffsetCollection) {\n            return input;\n        }\n\n        if (!Array.isArray(input) || input.length < 1 || input.length % 2 !== 0) {\n            return undefined;\n        }\n\n        for (let i = 0; i < input.length; i += 2) {\n            // Elements in even positions should be anchor positions; Elements in odd positions should be offset values\n            const anchorValue = input[i];\n            const offsetValue = input[i + 1];\n\n            if (typeof anchorValue !== 'string' || !anchors.has(anchorValue)) {\n                return undefined;\n            }\n\n            if (\n                !Array.isArray(offsetValue) ||\n                offsetValue.length !== 2 ||\n                typeof offsetValue[0] !== 'number' ||\n                typeof offsetValue[1] !== 'number'\n            ) {\n                return undefined;\n            }\n        }\n\n        return new VariableAnchorOffsetCollection(input);\n    }\n\n    toString(): string {\n        return JSON.stringify(this.values);\n    }\n\n    static interpolate(\n        from: VariableAnchorOffsetCollection,\n        to: VariableAnchorOffsetCollection,\n        t: number\n    ): VariableAnchorOffsetCollection {\n        const fromValues = from.values;\n        const toValues = to.values;\n\n        if (fromValues.length !== toValues.length) {\n            throw new RuntimeError(\n                `Cannot interpolate values of different length. from: ${from.toString()}, to: ${to.toString()}`\n            );\n        }\n\n        const output: VariableAnchorOffsetCollectionSpecification = [];\n\n        for (let i = 0; i < fromValues.length; i += 2) {\n            // Anchor entries must match\n            if (fromValues[i] !== toValues[i]) {\n                throw new RuntimeError(\n                    `Cannot interpolate values containing mismatched anchors. from[${i}]: ${fromValues[i]}, to[${i}]: ${toValues[i]}`\n                );\n            }\n            output.push(fromValues[i]);\n\n            // Interpolate the offset values for each anchor\n            const [fx, fy] = fromValues[i + 1] as [number, number];\n            const [tx, ty] = toValues[i + 1] as [number, number];\n            output.push([interpolateNumber(fx, tx, t), interpolateNumber(fy, ty, t)]);\n        }\n\n        return new VariableAnchorOffsetCollection(output);\n    }\n}\n","export type ResolvedImageOptions = {\n    name: string;\n    available: boolean;\n};\n\nexport 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","export class ProjectionDefinition {\n    readonly from: string;\n    readonly to: string;\n    readonly transition: number;\n\n    constructor(from: string, to: string, transition: number) {\n        this.from = from;\n        this.to = to;\n        this.transition = transition;\n    }\n\n    static interpolate(from: string, to: string, t: number) {\n        return new ProjectionDefinition(from, to, t);\n    }\n\n    static parse(input?: any): ProjectionDefinition {\n        if (input instanceof ProjectionDefinition) {\n            return input;\n        }\n        if (\n            Array.isArray(input) &&\n            input.length === 3 &&\n            typeof input[0] === 'string' &&\n            typeof input[1] === 'string' &&\n            typeof input[2] === 'number'\n        ) {\n            return new ProjectionDefinition(input[0], input[1], input[2]);\n        }\n\n        if (\n            typeof input === 'object' &&\n            typeof input.from === 'string' &&\n            typeof input.to === 'string' &&\n            typeof input.transition === 'number'\n        ) {\n            return new ProjectionDefinition(input.from, input.to, input.transition);\n        }\n\n        if (typeof input === 'string') {\n            return new ProjectionDefinition(input, input, 1);\n        }\n        return undefined;\n    }\n}\n","import {Color} from './types/color';\nimport {Collator} from './types/collator';\nimport {Formatted} from './types/formatted';\nimport {Padding} from './types/padding';\nimport {NumberArray} from './types/number_array';\nimport {ColorArray} from './types/color_array';\nimport {VariableAnchorOffsetCollection} from './types/variable_anchor_offset_collection';\nimport {ResolvedImage} from './types/resolved_image';\nimport {ProjectionDefinition} from './types/projection_definition';\nimport {\n    NullType,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    ObjectType,\n    ValueType,\n    CollatorType,\n    FormattedType,\n    ResolvedImageType,\n    array,\n    PaddingType,\n    NumberArrayType,\n    ColorArrayType,\n    VariableAnchorOffsetCollectionType,\n    ProjectionDefinitionType\n} from './types';\n\nimport type {Type} from './types';\n\nexport function validateRGBA(r: unknown, g: unknown, b: unknown, a?: unknown): string | null {\n    if (\n        !(\n            typeof r === 'number' &&\n            r >= 0 &&\n            r <= 255 &&\n            typeof g === 'number' &&\n            g >= 0 &&\n            g <= 255 &&\n            typeof b === 'number' &&\n            b >= 0 &&\n            b <= 255\n        )\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 (!(typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1))) {\n        return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n    }\n\n    return null;\n}\n\nexport type Value =\n    | null\n    | string\n    | boolean\n    | number\n    | Color\n    | ProjectionDefinition\n    | Collator\n    | Formatted\n    | Padding\n    | NumberArray\n    | ColorArray\n    | ResolvedImage\n    | VariableAnchorOffsetCollection\n    | ReadonlyArray<Value>\n    | {\n          readonly [x: string]: Value;\n      };\n\nexport function isValue(mixed: unknown): boolean {\n    if (\n        mixed === null ||\n        typeof mixed === 'string' ||\n        typeof mixed === 'boolean' ||\n        typeof mixed === 'number' ||\n        mixed instanceof ProjectionDefinition ||\n        mixed instanceof Color ||\n        mixed instanceof Collator ||\n        mixed instanceof Formatted ||\n        mixed instanceof Padding ||\n        mixed instanceof NumberArray ||\n        mixed instanceof ColorArray ||\n        mixed instanceof VariableAnchorOffsetCollection ||\n        mixed instanceof ResolvedImage\n    ) {\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 ProjectionDefinition) {\n        return ProjectionDefinitionType;\n    } else if (value instanceof Collator) {\n        return CollatorType;\n    } else if (value instanceof Formatted) {\n        return FormattedType;\n    } else if (value instanceof Padding) {\n        return PaddingType;\n    } else if (value instanceof NumberArray) {\n        return NumberArrayType;\n    } else if (value instanceof ColorArray) {\n        return ColorArrayType;\n    } else if (value instanceof VariableAnchorOffsetCollection) {\n        return VariableAnchorOffsetCollectionType;\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        return ObjectType;\n    }\n}\n\nexport function valueToString(value: Value) {\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 (\n        value instanceof Color ||\n        value instanceof ProjectionDefinition ||\n        value instanceof Formatted ||\n        value instanceof Padding ||\n        value instanceof NumberArray ||\n        value instanceof ColorArray ||\n        value instanceof VariableAnchorOffsetCollection ||\n        value instanceof ResolvedImage\n    ) {\n        return value.toString();\n    } else {\n        return JSON.stringify(value);\n    }\n}\n","import {isValue, typeOf} from '../values';\n\nimport type {Type} from '../types';\nimport type {Value} from '../values';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2)\n            return context.error(\n                `'literal' expression requires exactly one argument, but found ${args.length - 1} instead.`\n            ) as null;\n\n        if (!isValue(args[1])) return context.error('invalid value') as null;\n\n        const value = args[1] as 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() {\n        return this.value;\n    }\n\n    eachChild() {}\n\n    outputDefined() {\n        return true;\n    }\n}\n","import {\n    ObjectType,\n    ValueType,\n    StringType,\n    NumberType,\n    BooleanType,\n    checkSubtype,\n    typeToString,\n    array\n} from '../types';\nimport {RuntimeError} from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nconst types = {\n    string: StringType,\n    number: NumberType,\n    boolean: BooleanType,\n    object: ObjectType\n};\n\nexport class Assertion implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length < 2) return context.error('Expected at least one argument.') as null;\n\n        let i = 1;\n        let type;\n\n        const name: string = args[0] as 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(\n                        'The item type argument of \"array\" must be one of string, number, boolean',\n                        1\n                    ) as null;\n                itemType = types[type];\n                i++;\n            } else {\n                itemType = ValueType;\n            }\n\n            let N;\n            if (args.length > 3) {\n                if (\n                    args[2] !== null &&\n                    (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))\n                ) {\n                    return context.error(\n                        'The length argument to \"array\" must be a positive integer literal',\n                        2\n                    ) as null;\n                }\n                N = args[2];\n                i++;\n            }\n\n            type = array(itemType, N);\n        } else {\n            if (!types[name]) throw new Error(`Types doesn't contain 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) {\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(\n                    `Expected value to be of type ${typeToString(this.type)}, but found ${typeToString(typeOf(value))} instead.`\n                );\n            }\n        }\n\n        throw new Error();\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","import {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types';\nimport {valueToString, validateRGBA} from '../values';\nimport {RuntimeError} from '../runtime_error';\nimport {Formatted} from '../types/formatted';\nimport {ResolvedImage} from '../types/resolved_image';\nimport {Color} from '../types/color';\nimport {Padding} from '../types/padding';\nimport {NumberArray} from '../types/number_array';\nimport {ColorArray} from '../types/color_array';\nimport {VariableAnchorOffsetCollection} from '../types/variable_anchor_offset_collection';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\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 */\nexport class Coercion implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length < 2) return context.error('Expected at least one argument.') as null;\n\n        const name: string = args[0] as any;\n        if (!types[name])\n            throw new Error(`Can't parse ${name} as it is not part of the known types`);\n        if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n            return context.error('Expected one argument.') as null;\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) {\n        switch (this.type.kind) {\n            case 'boolean':\n                return Boolean(this.args[0].evaluate(ctx));\n            case '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 rgba 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(\n                                (input[0] as any) / 255,\n                                (input[1] as any) / 255,\n                                (input[2] as any) / 255,\n                                input[3] as any\n                            );\n                        }\n                    }\n                }\n                throw new RuntimeError(\n                    error ||\n                        `Could not parse color from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`\n                );\n            }\n            case 'padding': {\n                let input;\n                for (const arg of this.args) {\n                    input = arg.evaluate(ctx);\n\n                    const pad = Padding.parse(input);\n                    if (pad) {\n                        return pad;\n                    }\n                }\n                throw new RuntimeError(\n                    `Could not parse padding from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`\n                );\n            }\n            case 'numberArray': {\n                let input;\n                for (const arg of this.args) {\n                    input = arg.evaluate(ctx);\n\n                    const val = NumberArray.parse(input);\n                    if (val) {\n                        return val;\n                    }\n                }\n                throw new RuntimeError(\n                    `Could not parse numberArray from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`\n                );\n            }\n            case 'colorArray': {\n                let input;\n                for (const arg of this.args) {\n                    input = arg.evaluate(ctx);\n\n                    const val = ColorArray.parse(input);\n                    if (val) {\n                        return val;\n                    }\n                }\n                throw new RuntimeError(\n                    `Could not parse colorArray from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`\n                );\n            }\n            case 'variableAnchorOffsetCollection': {\n                let input;\n                for (const arg of this.args) {\n                    input = arg.evaluate(ctx);\n\n                    const coll = VariableAnchorOffsetCollection.parse(input);\n                    if (coll) {\n                        return coll;\n                    }\n                }\n                throw new RuntimeError(\n                    `Could not parse variableAnchorOffsetCollection from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`\n                );\n            }\n            case '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            }\n            case '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            case 'resolvedImage':\n                return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n            case 'projectionDefinition':\n                return this.args[0].evaluate(ctx);\n            default:\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","import type {Type} from '../types';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\n\nexport class 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) {\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<unknown>, context: ParsingContext): Expression {\n        if (args.length < 4)\n            return context.error(\n                `Expected at least 3 arguments, but found ${args.length - 1} instead.`\n            ) as null;\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(\n                    `Expected string, but found ${typeof name} instead.`,\n                    i\n                ) as null;\n            }\n\n            if (/[^a-zA-Z0-9_]/.test(name)) {\n                return context.error(\n                    \"Variable names must contain only alphanumeric characters or '_'.\",\n                    i\n                ) as null;\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(\n            args[args.length - 1],\n            args.length - 1,\n            context.expectedType,\n            bindings\n        );\n        if (!result) return null;\n\n        return new Let(bindings, result);\n    }\n\n    outputDefined() {\n        return this.result.outputDefined();\n    }\n}\n","import type {Type} from '../types';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2 || typeof args[1] !== 'string')\n            return context.error(\n                \"'var' expression requires exactly one string literal argument.\"\n            ) as null;\n\n        const name = args[1];\n        if (!context.scope.has(name)) {\n            return context.error(\n                `Unknown variable \"${name}\". Make sure \"${name}\" has been bound in an enclosing \"let\" expression before using it.`,\n                1\n            ) as null;\n        }\n\n        return new Var(name, context.scope.get(name));\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        return this.boundExpression.evaluate(ctx);\n    }\n\n    eachChild() {}\n\n    outputDefined() {\n        return false;\n    }\n}\n","import {array, ValueType, NumberType} from '../types';\n\nimport {RuntimeError} from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type, ArrayType} from '../types';\nimport type {Value} from '../values';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 3)\n            return context.error(\n                `Expected 2 arguments, but found ${args.length - 1} instead.`\n            ) as null;\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 as any;\n        return new At(t.itemType, index, input);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const index = this.index.evaluate(ctx) as any as number;\n        const array = this.input.evaluate(ctx) as any as Array<Value>;\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() {\n        return false;\n    }\n}\n","import {\n    BooleanType,\n    StringType,\n    ValueType,\n    NullType,\n    typeToString,\n    NumberType,\n    isValidType,\n    isValidNativeType\n} from '../types';\nimport {RuntimeError} from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 3) {\n            return context.error(\n                `Expected 2 arguments, but found ${args.length - 1} instead.`\n            ) as null;\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(\n                `Expected first argument to be of type boolean, string, number or null, but found ${typeToString(needle.type)} instead`\n            ) as null;\n        }\n\n        return new In(needle, haystack);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const needle = this.needle.evaluate(ctx) as any;\n        const haystack = this.haystack.evaluate(ctx) as any;\n\n        if (!haystack) return false;\n\n        if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n            throw new RuntimeError(\n                `Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(needle))} instead.`\n            );\n        }\n\n        if (!isValidNativeType(haystack, ['string', 'array'])) {\n            throw new RuntimeError(\n                `Expected second argument to be of type array or string, but found ${typeToString(typeOf(haystack))} instead.`\n            );\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() {\n        return true;\n    }\n}\n","import {\n    BooleanType,\n    StringType,\n    ValueType,\n    NullType,\n    typeToString,\n    NumberType,\n    isValidType,\n    isValidNativeType\n} from '../types';\nimport {RuntimeError} from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length <= 2 || args.length >= 5) {\n            return context.error(\n                `Expected 2 or 3 arguments, but found ${args.length - 1} instead.`\n            ) as null;\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(\n                `Expected first argument to be of type boolean, string, number or null, but found ${typeToString(needle.type)} instead`\n            ) as null;\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) {\n        const needle = this.needle.evaluate(ctx) as any;\n        const haystack = this.haystack.evaluate(ctx) as any;\n\n        if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n            throw new RuntimeError(\n                `Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(needle))} instead.`\n            );\n        }\n\n        let fromIndex;\n        if (this.fromIndex) {\n            fromIndex = this.fromIndex.evaluate(ctx) as number;\n        }\n\n        if (isValidNativeType(haystack, ['string'])) {\n            const rawIndex = haystack.indexOf(needle, fromIndex);\n            if (rawIndex === -1) {\n                return -1;\n            } else {\n                // The index may be affected by surrogate pairs, so get the length of the preceding substring.\n                return [...haystack.slice(0, rawIndex)].length;\n            }\n        } else if (isValidNativeType(haystack, ['array'])) {\n            return haystack.indexOf(needle, fromIndex);\n        } else {\n            throw new RuntimeError(\n                `Expected second argument to be of type array or string, but found ${typeToString(typeOf(haystack))} instead.`\n            );\n        }\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() {\n        return false;\n    }\n}\n","import {typeOf} from '../values';\nimport {ValueType} from '../types';\n\nimport type {Type} from '../types';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\n\n// Map input label values to output expression index\ntype Cases = {\n    [k in number | string]: number;\n};\n\nexport class Match implements Expression {\n    type: Type;\n    inputType: Type;\n\n    input: Expression;\n    cases: Cases;\n    outputs: Array<Expression>;\n    otherwise: Expression;\n\n    constructor(\n        inputType: Type,\n        outputType: Type,\n        input: Expression,\n        cases: Cases,\n        outputs: Array<Expression>,\n        otherwise: Expression\n    ) {\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<unknown>, context: ParsingContext): Expression {\n        if (args.length < 5)\n            return context.error(\n                `Expected at least 4 arguments, but found only ${args.length - 1}.`\n            ) as null;\n        if (args.length % 2 !== 1)\n            return context.error('Expected an even number of arguments.') as null;\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] as unknown[];\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.') as null;\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.') as null;\n                } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n                    return labelContext.error(\n                        `Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`\n                    ) as null;\n                } else if (typeof label === 'number' && Math.floor(label) !== label) {\n                    return labelContext.error(\n                        'Numeric branch labels must be integer values.'\n                    ) as null;\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.') as null;\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        if (\n            input.type.kind !== 'value' &&\n            context.concat(1).checkSubtype(inputType as any, input.type)\n        ) {\n            return null;\n        }\n\n        return new Match(inputType as any, outputType as any, input, cases, outputs, otherwise);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const input = this.input.evaluate(ctx) as any;\n        const output =\n            (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","import {BooleanType} from '../types';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\ntype Branches = Array<[Expression, Expression]>;\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length < 4)\n            return context.error(\n                `Expected at least 3 arguments, but found only ${args.length - 1}.`\n            ) as null;\n        if (args.length % 2 !== 0)\n            return context.error('Expected an odd number of arguments.') as null;\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        if (!outputType) throw new Error(\"Can't infer output type\");\n        return new Case(outputType as any, branches, otherwise);\n    }\n\n    evaluate(ctx: EvaluationContext) {\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 (\n            this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined()\n        );\n    }\n}\n","import {\n    ValueType,\n    NumberType,\n    StringType,\n    array,\n    typeToString,\n    isValidType,\n    isValidNativeType\n} from '../types';\nimport {RuntimeError} from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class 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    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length <= 2 || args.length >= 5) {\n            return context.error(\n                `Expected 2 or 3 arguments, but found ${args.length - 1} instead.`\n            ) as null;\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(\n                `Expected first argument to be of type array or string, but found ${typeToString(input.type)} instead`\n            ) as null;\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) {\n        const input = this.input.evaluate(ctx) as any;\n        const beginIndex = this.beginIndex.evaluate(ctx) as number;\n\n        let endIndex;\n        if (this.endIndex) {\n            endIndex = this.endIndex.evaluate(ctx) as number;\n        }\n\n        if (isValidNativeType(input, ['string'])) {\n            // Indices may be affected by surrogate pairs.\n            return [...input].slice(beginIndex, endIndex).join('');\n        } else if (isValidNativeType(input, ['array'])) {\n            return input.slice(beginIndex, endIndex);\n        } else {\n            throw new RuntimeError(\n                `Expected first argument to be of type array or string, but found ${typeToString(typeOf(input))} instead.`\n            );\n        }\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() {\n        return false;\n    }\n}\n","import {RuntimeError} from './runtime_error';\n\nimport type {Expression} from './expression';\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<number>, input: 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) {\n                // 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","import {NumberType} from '../types';\n\nimport {findStopLessThanOrEqualTo} from '../stops';\n\nimport type {Stops} from '../stops';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class Step implements Expression {\n    type: Type;\n\n    input: Expression;\n    labels: Array<number>;\n    outputs: Array<Expression>;\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<unknown>, context: ParsingContext): Expression {\n        if (args.length - 1 < 4) {\n            return context.error(\n                `Expected at least 4 arguments, but found only ${args.length - 1}.`\n            ) as null;\n        }\n\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error('Expected an even number of arguments.') as null;\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;\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(\n                    'Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',\n                    labelKey\n                ) as null;\n            }\n\n            if (stops.length && stops[stops.length - 1][0] >= label) {\n                return context.error(\n                    'Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',\n                    labelKey\n                ) as null;\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) {\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) as any as 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","\nexport default function unitBezier(p1x, p1y, p2x, p2y) {\n    // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n    const cx = 3 * p1x;\n    const bx = 3 * (p2x - p1x) - cx;\n    const ax = 1 - cx - bx;\n\n    const cy = 3 * p1y;\n    const by = 3 * (p2y - p1y) - cy;\n    const ay = 1 - cy - by;\n\n    return function solve(x, epsilon = 1e-6) {\n        if (x <= 0) return 0;\n        if (x >= 1) return 1;\n\n        let t = x;\n\n        // First try a few iterations of Newton's method - normally very fast.\n        // `ax t^3 + bx t^2 + cx t` expanded using Horner's rule.\n        for (let i = 0; i < 8; i++) {\n            const x2 = ((ax * t + bx) * t + cx) * t - x;\n            if (Math.abs(x2) < epsilon) return ((ay * t + by) * t + cy) * t;\n\n            const d2 = (3 * ax * t + 2 * bx) * t + cx;\n            if (Math.abs(d2) < 1e-6) break;\n\n            t -= x2 / d2;\n        }\n\n        // Fall back to the bisection method for reliability.\n        let t0 = 0;\n        let t1 = 1;\n        t = x;\n\n        for (let i = 0; i < 20; i++) {\n            const x2 = ((ax * t + bx) * t + cx) * t;\n            if (Math.abs(x2 - x) < epsilon) break;\n\n            if (x > x2) t0 = t;\n            else t1 = t;\n\n            t = (t0 + t1) * 0.5;\n        }\n\n        return ((ay * t + by) * t + cy) * t;\n    };\n}\n","import unitBezier from '@mapbox/unitbezier';\n\nimport {\n    array,\n    ArrayType,\n    ColorType,\n    ColorTypeT,\n    NumberType,\n    NumberTypeT,\n    PaddingType,\n    PaddingTypeT,\n    NumberArrayTypeT,\n    ColorArrayTypeT,\n    VariableAnchorOffsetCollectionType,\n    VariableAnchorOffsetCollectionTypeT,\n    typeToString,\n    verifyType,\n    ProjectionDefinitionType,\n    ColorArrayType,\n    NumberArrayType\n} from '../types';\nimport {findStopLessThanOrEqualTo} from '../stops';\nimport {Color} from '../types/color';\nimport {interpolateArray, interpolateNumber} from '../../util/interpolate-primitives';\nimport {Padding} from '../types/padding';\nimport {ColorArray} from '../types/color_array';\nimport {NumberArray} from '../types/number_array';\nimport {VariableAnchorOffsetCollection} from '../types/variable_anchor_offset_collection';\nimport {ProjectionDefinition} from '../types/projection_definition';\n\nimport type {Stops} from '../stops';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ProjectionDefinitionTypeT, Type} from '../types';\n\nexport type InterpolationType =\n    | {\n          name: 'linear';\n      }\n    | {\n          name: 'exponential';\n          base: number;\n      }\n    | {\n          name: 'cubic-bezier';\n          controlPoints: [number, number, number, number];\n      };\ntype InterpolatedValueType =\n    | NumberTypeT\n    | ColorTypeT\n    | ProjectionDefinitionTypeT\n    | PaddingTypeT\n    | NumberArrayTypeT\n    | ColorArrayTypeT\n    | VariableAnchorOffsetCollectionTypeT\n    | ArrayType<NumberTypeT>;\nexport class Interpolate implements Expression {\n    type: InterpolatedValueType;\n\n    operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n    interpolation: InterpolationType;\n    input: Expression;\n    labels: Array<number>;\n    outputs: Array<Expression>;\n\n    constructor(\n        type: InterpolatedValueType,\n        operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab',\n        interpolation: InterpolationType,\n        input: Expression,\n        stops: Stops\n    ) {\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(\n        interpolation: InterpolationType,\n        input: number,\n        lower: number,\n        upper: number\n    ) {\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 = unitBezier(c[0], c[1], c[2], c[3]);\n            t = ub(exponentialInterpolation(input, 1, lower, upper));\n        }\n        return t;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\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) as null;\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(\n                    'Exponential interpolation requires a numeric base.',\n                    1,\n                    1\n                ) as null;\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(\n                    'Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.',\n                    1\n                ) as null;\n            }\n\n            interpolation = {\n                name: 'cubic-bezier',\n                controlPoints: controlPoints as any\n            };\n        } else {\n            return context.error(\n                `Unknown interpolation type ${String(interpolation[0])}`,\n                1,\n                0\n            ) as null;\n        }\n\n        if (args.length - 1 < 4) {\n            return context.error(\n                `Expected at least 4 arguments, but found only ${args.length - 1}.`\n            ) as null;\n        }\n\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error('Expected an even number of arguments.') as null;\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;\n        if (\n            (operator === 'interpolate-hcl' || operator === 'interpolate-lab') &&\n            context.expectedType != ColorArrayType\n        ) {\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(\n                    'Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',\n                    labelKey\n                ) as null;\n            }\n\n            if (stops.length && stops[stops.length - 1][0] >= label) {\n                return context.error(\n                    'Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',\n                    labelKey\n                ) as null;\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 (\n            !verifyType(outputType, NumberType) &&\n            !verifyType(outputType, ProjectionDefinitionType) &&\n            !verifyType(outputType, ColorType) &&\n            !verifyType(outputType, PaddingType) &&\n            !verifyType(outputType, NumberArrayType) &&\n            !verifyType(outputType, ColorArrayType) &&\n            !verifyType(outputType, VariableAnchorOffsetCollectionType) &&\n            !verifyType(outputType, array(NumberType))\n        ) {\n            return context.error(`Type ${typeToString(outputType)} is not interpolatable.`) as null;\n        }\n\n        return new Interpolate(\n            outputType,\n            operator as any,\n            interpolation as InterpolationType,\n            input as Expression,\n            stops\n        );\n    }\n\n    evaluate(ctx: EvaluationContext) {\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: number = this.input.evaluate(ctx);\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        switch (this.operator) {\n            case 'interpolate':\n                switch (this.type.kind) {\n                    case 'number':\n                        return interpolateNumber(outputLower, outputUpper, t);\n                    case 'color':\n                        return Color.interpolate(outputLower, outputUpper, t);\n                    case 'padding':\n                        return Padding.interpolate(outputLower, outputUpper, t);\n                    case 'colorArray':\n                        return ColorArray.interpolate(outputLower, outputUpper, t);\n                    case 'numberArray':\n                        return NumberArray.interpolate(outputLower, outputUpper, t);\n                    case 'variableAnchorOffsetCollection':\n                        return VariableAnchorOffsetCollection.interpolate(\n                            outputLower,\n                            outputUpper,\n                            t\n                        );\n                    case 'array':\n                        return interpolateArray(outputLower, outputUpper, t);\n                    case 'projectionDefinition':\n                        return ProjectionDefinition.interpolate(outputLower, outputUpper, t);\n                }\n            case 'interpolate-hcl':\n                switch (this.type.kind) {\n                    case 'color':\n                        return Color.interpolate(outputLower, outputUpper, t, 'hcl');\n                    case 'colorArray':\n                        return ColorArray.interpolate(outputLower, outputUpper, t, 'hcl');\n                }\n            case 'interpolate-lab':\n                switch (this.type.kind) {\n                    case 'color':\n                        return Color.interpolate(outputLower, outputUpper, t, 'lab');\n                    case 'colorArray':\n                        return ColorArray.interpolate(outputLower, outputUpper, t, 'lab');\n                }\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\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 const interpolateFactory = {\n    color: Color.interpolate,\n    number: interpolateNumber,\n    padding: Padding.interpolate,\n    numberArray: NumberArray.interpolate,\n    colorArray: ColorArray.interpolate,\n    variableAnchorOffsetCollection: VariableAnchorOffsetCollection.interpolate,\n    array: interpolateArray\n};\n","import {checkSubtype, ValueType} from '../types';\nimport {ResolvedImage} from '../types/resolved_image';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class Coalesce implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length < 2) {\n            return context.error('Expected at least one argument.') as null;\n        }\n        let outputType: Type = null;\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, {\n                typeAnnotation: 'omit'\n            });\n            if (!parsed) return null;\n            outputType = outputType || parsed.type;\n            parsedArgs.push(parsed);\n        }\n        if (!outputType) throw new Error('No output type');\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 =\n            expectedType && parsedArgs.some((arg) => checkSubtype(expectedType, arg.type));\n\n        return needsAnnotation\n            ? new Coalesce(ValueType, parsedArgs)\n            : new Coalesce(outputType as any, parsedArgs);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        let result = null;\n        let argCount = 0;\n        let requestedImageName;\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 name so styleimagemissing can fire\n            if (result && result instanceof ResolvedImage && !result.available) {\n                if (!requestedImageName) {\n                    requestedImageName = result.name;\n                }\n                result = null;\n                if (argCount === this.args.length) {\n                    result = requestedImageName;\n                }\n            }\n\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","import {typeToString, ValueType, BooleanType, CollatorType} from '../types';\nimport {Assertion} from './assertion';\nimport {typeOf} from '../values';\nimport {RuntimeError} from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ParsingContext} from '../parsing_context';\nimport type {Type} from '../types';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=';\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n    if (op === '==' || op === '!=') {\n        // equality operator\n        return (\n            type.kind === 'boolean' ||\n            type.kind === 'string' ||\n            type.kind === 'number' ||\n            type.kind === 'null' ||\n            type.kind === 'value'\n        );\n    } else {\n        // ordering operator\n        return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n    }\n}\n\nfunction eq(ctx, a, b) {\n    return a === b;\n}\nfunction neq(ctx, a, b) {\n    return a !== b;\n}\nfunction lt(ctx, a, b) {\n    return a < b;\n}\nfunction gt(ctx, a, b) {\n    return a > b;\n}\nfunction lteq(ctx, a, b) {\n    return a <= b;\n}\nfunction gteq(ctx, a, b) {\n    return a >= b;\n}\n\nfunction eqCollate(ctx, a, b, c) {\n    return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n    return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n    return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n    return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) >= 0;\n}\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, compareWithCollator) {\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 | null) {\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<unknown>, context: ParsingContext): Expression {\n            if (args.length !== 3 && args.length !== 4)\n                return context.error('Expected two or three arguments.') as null;\n\n            const op: ComparisonOperator = args[0] as 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\n                    .concat(1)\n                    .error(\n                        `\"${op}\" comparisons are not supported for type '${typeToString(lhs.type)}'.`\n                    ) as null;\n            }\n            let rhs = context.parse(args[2], 2, ValueType);\n            if (!rhs) return null;\n            if (!isComparableType(op, rhs.type)) {\n                return context\n                    .concat(2)\n                    .error(\n                        `\"${op}\" comparisons are not supported for type '${typeToString(rhs.type)}'.`\n                    ) as null;\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(\n                    `Cannot compare types '${typeToString(lhs.type)}' and '${typeToString(rhs.type)}'.`\n                ) as null;\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(\n                        'Cannot use collator to compare non-string types.'\n                    ) as null;\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) {\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(\n                        `Expected arguments for \"${op}\" to be (string, string) or (number, number), but found (${lt.kind}, ${rt.kind}) instead.`\n                    );\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}\n\nexport const Equals = makeComparison('==', eq, eqCollate);\nexport const NotEquals = makeComparison('!=', neq, neqCollate);\nexport const LessThan = makeComparison('<', lt, ltCollate);\nexport const GreaterThan = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nexport const GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n","import {StringType, BooleanType, CollatorType} from '../types';\nimport {Collator} from '../types/collator';\n\nimport type {Expression} from '../expression';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ParsingContext} from '../parsing_context';\nimport type {Type} from '../types';\n\nexport class CollatorExpression implements Expression {\n    type: Type;\n    caseSensitive: Expression;\n    diacriticSensitive: Expression;\n    locale: Expression | null;\n\n    constructor(\n        caseSensitive: Expression,\n        diacriticSensitive: Expression,\n        locale: Expression | null\n    ) {\n        this.type = CollatorType;\n        this.locale = locale;\n        this.caseSensitive = caseSensitive;\n        this.diacriticSensitive = diacriticSensitive;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2) return context.error('Expected one argument.') as null;\n\n        const options = args[1] as any;\n        if (typeof options !== 'object' || Array.isArray(options))\n            return context.error('Collator options argument must be an object.') as null;\n\n        const caseSensitive = context.parse(\n            options['case-sensitive'] === undefined ? false : options['case-sensitive'],\n            1,\n            BooleanType\n        );\n        if (!caseSensitive) return null;\n\n        const diacriticSensitive = context.parse(\n            options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'],\n            1,\n            BooleanType\n        );\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) {\n        return new Collator(\n            this.caseSensitive.evaluate(ctx),\n            this.diacriticSensitive.evaluate(ctx),\n            this.locale ? this.locale.evaluate(ctx) : null\n        );\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() {\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","import {StringType, NumberType} from '../types';\n\nimport type {Expression} from '../expression';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ParsingContext} from '../parsing_context';\nimport type {Type} from '../types';\n\nexport class NumberFormat implements Expression {\n    type: Type;\n    number: Expression;\n    /**\n     * BCP 47 language tag\n     */\n    locale: Expression | null;\n    /**\n     * ISO 4217 currency code, required if style=currency\n     */\n    currency: Expression | null;\n    /**\n     * CLDR or ECMA-402 unit specifier, required if style=unit\n     */\n    unit: Expression | null;\n    /**\n     * @default 0\n     */\n    minFractionDigits: Expression | null;\n    /**\n     * @default 3\n     */\n    maxFractionDigits: Expression | null;\n\n    constructor(\n        number: Expression,\n        locale: Expression | null,\n        currency: Expression | null,\n        unit: Expression | null,\n        minFractionDigits: Expression | null,\n        maxFractionDigits: Expression | null\n    ) {\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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 3) return context.error('Expected two arguments.') as null;\n\n        const number = context.parse(args[1], 1, NumberType);\n        if (!number) return null;\n\n        const options = args[2] as any;\n        if (typeof options !== 'object' || Array.isArray(options))\n            return context.error('NumberFormat options argument must be an object.') as 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        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        if (currency && unit) {\n            return context.error(\n                'NumberFormat options `currency` and `unit` are mutually exclusive'\n            ) as 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(\n            number,\n            locale,\n            currency,\n            unit,\n            minFractionDigits,\n            maxFractionDigits\n        );\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n            style: this.currency ? 'currency' : this.unit ? 'unit' : 'decimal',\n            currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n            unit: this.unit ? this.unit.evaluate(ctx) : undefined,\n            minimumFractionDigits: this.minFractionDigits\n                ? this.minFractionDigits.evaluate(ctx)\n                : undefined,\n            maximumFractionDigits: this.maxFractionDigits\n                ? this.maxFractionDigits.evaluate(ctx)\n                : 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() {\n        return false;\n    }\n}\n","import {\n    NumberType,\n    ValueType,\n    FormattedType,\n    array,\n    StringType,\n    ColorType,\n    ResolvedImageType\n} from '../types';\nimport {\n    Formatted,\n    FormattedSection,\n    VERTICAL_ALIGN_OPTIONS,\n    VerticalAlign\n} from '../types/formatted';\nimport {valueToString, typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ParsingContext} from '../parsing_context';\nimport type {Type} from '../types';\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    verticalAlign: Expression | null;\n};\n\nexport class FormatExpression implements Expression {\n    type: Type;\n    sections: Array<FormattedSectionExpression>;\n\n    constructor(sections: Array<FormattedSectionExpression>) {\n        this.type = FormattedType;\n        this.sections = sections;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length < 2) {\n            return context.error('Expected at least one argument.') as null;\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.') as null;\n        }\n\n        const sections: Array<FormattedSectionExpression> = [];\n        let nextTokenMayBeObject = false;\n        for (let i = 1; i <= args.length - 1; ++i) {\n            const arg = args[i] as 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                let verticalAlign = null;\n                if (arg['vertical-align']) {\n                    if (\n                        typeof arg['vertical-align'] === 'string' &&\n                        !VERTICAL_ALIGN_OPTIONS.includes(arg['vertical-align'] as VerticalAlign)\n                    ) {\n                        return context.error(\n                            `'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${arg['vertical-align']}' instead.`\n                        ) as null;\n                    }\n\n                    verticalAlign = context.parse(arg['vertical-align'], 1, StringType);\n                    if (!verticalAlign) return null;\n                }\n\n                const lastExpression = sections[sections.length - 1];\n                lastExpression.scale = scale;\n                lastExpression.font = font;\n                lastExpression.textColor = textColor;\n                lastExpression.verticalAlign = verticalAlign;\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 (\n                    kind !== 'string' &&\n                    kind !== 'value' &&\n                    kind !== 'null' &&\n                    kind !== 'resolvedImage'\n                )\n                    return context.error(\n                        \"Formatted text type must be 'string', 'value', 'image' or 'null'.\"\n                    ) as null;\n\n                nextTokenMayBeObject = true;\n                sections.push({\n                    content,\n                    scale: null,\n                    font: null,\n                    textColor: null,\n                    verticalAlign: null\n                });\n            }\n        }\n\n        return new FormatExpression(sections);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const evaluateSection = (section) => {\n            const evaluatedContent = section.content.evaluate(ctx);\n            if (typeOf(evaluatedContent) === ResolvedImageType) {\n                return new FormattedSection(\n                    '',\n                    evaluatedContent,\n                    null,\n                    null,\n                    null,\n                    section.verticalAlign ? section.verticalAlign.evaluate(ctx) : null\n                );\n            }\n\n            return new FormattedSection(\n                valueToString(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                section.verticalAlign ? section.verticalAlign.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            if (section.verticalAlign) {\n                fn(section.verticalAlign);\n            }\n        }\n    }\n\n    outputDefined() {\n        // Technically the combinatoric set of all children\n        // Usually, this.text will be undefined anyway\n        return false;\n    }\n}\n","import {ResolvedImageType, StringType} from '../types';\nimport {ResolvedImage} from '../types/resolved_image';\n\nimport type {Expression} from '../expression';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {ParsingContext} from '../parsing_context';\nimport type {Type} from '../types';\n\nexport 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2) {\n            return context.error('Expected two arguments.') as null;\n        }\n\n        const name = context.parse(args[1], 1, StringType);\n        if (!name) return context.error('No image name provided.') as null;\n\n        return new ImageExpression(name);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const evaluatedImageName = this.input.evaluate(ctx);\n\n        const value = ResolvedImage.fromString(evaluatedImageName);\n        if (value && ctx.availableImages)\n            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() {\n        // The output of image is determined by the list of available images in the evaluation context\n        return false;\n    }\n}\n","import {NumberType, typeToString} from '../types';\n\nimport {typeOf} from '../values';\nimport {RuntimeError} from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport class 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<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2)\n            return context.error(\n                `Expected 1 argument, but found ${args.length - 1} instead.`\n            ) as null;\n\n        const input = context.parse(args[1], 1);\n        if (!input) return null;\n\n        if (\n            input.type.kind !== 'array' &&\n            input.type.kind !== 'string' &&\n            input.type.kind !== 'value'\n        )\n            return context.error(\n                `Expected argument of type string or array, but found ${typeToString(input.type)} instead.`\n            ) as null;\n\n        return new Length(input);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const input = this.input.evaluate(ctx);\n        if (typeof input === 'string') {\n            // The length may be affected by surrogate pairs.\n            return [...input].length;\n        } else if (Array.isArray(input)) {\n            return input.length;\n        } else {\n            throw new RuntimeError(\n                `Expected value to be of type string or array, but found ${typeToString(typeOf(input))} instead.`\n            );\n        }\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n    }\n\n    outputDefined() {\n        return false;\n    }\n}\n","import {ICanonicalTileID} from '../tiles_and_coordinates';\n\n// minX, minY, maxX, maxY\nexport type BBox = [number, number, number, number];\n\nexport const EXTENT = 8192;\n\nexport function getTileCoordinates(\n    p: GeoJSON.Position,\n    canonical: ICanonicalTileID\n): [number, number] {\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\nexport function getLngLatFromTileCoord(\n    coord: [number, number],\n    canonical: ICanonicalTileID\n): GeoJSON.Position {\n    const tilesAtZoom = Math.pow(2, canonical.z);\n    const x = (coord[0] / EXTENT + canonical.x) / tilesAtZoom;\n    const y = (coord[1] / EXTENT + canonical.y) / tilesAtZoom;\n    return [lngFromMercatorXfromLng(x), latFromMercatorY(y)];\n}\n\nfunction mercatorXfromLng(lng: number) {\n    return (180 + lng) / 360;\n}\n\nfunction lngFromMercatorXfromLng(mercatorX: number) {\n    return mercatorX * 360 - 180;\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 latFromMercatorY(mercatorY: number) {\n    return (360 / Math.PI) * Math.atan(Math.exp(((180 - mercatorY * 360) * Math.PI) / 180)) - 90;\n}\n\nexport function updateBBox(bbox: BBox, coord: GeoJSON.Position) {\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\nexport function 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\nexport function rayIntersect(\n    p: [number, number],\n    p1: [number, number],\n    p2: [number, number]\n): boolean {\n    return (\n        p1[1] > p[1] !== p2[1] > p[1] &&\n        p[0] < ((p2[0] - p1[0]) * (p[1] - p1[1])) / (p2[1] - p1[1]) + p1[0]\n    );\n}\n\nfunction pointOnBoundary(p: [number, number], p1: [number, number], p2: [number, number]): boolean {\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\n// a, b are end points for line segment1, c and d are end points for line segment2\nexport function segmentIntersectSegment(\n    a: [number, number],\n    b: [number, number],\n    c: [number, number],\n    d: [number, number]\n) {\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: [number, number] = [b[0] - a[0], b[1] - a[1]];\n    const vectorQ: [number, number] = [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\nexport function 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 (segmentIntersectSegment(p1, p2, ring[j], ring[j + 1])) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\n// ray casting algorithm for detecting if point is in polygon\nexport function pointWithinPolygon(\n    point: [number, number],\n    rings: [number, number][][],\n    trueIfOnBoundary = false\n) {\n    let inside = false;\n    for (const ring of rings) {\n        for (let j = 0; j < ring.length - 1; j++) {\n            if (pointOnBoundary(point, ring[j], ring[j + 1])) return trueIfOnBoundary;\n            if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n        }\n    }\n    return inside;\n}\n\nexport function pointWithinPolygons(point: [number, number], polygons: [number, number][][][]) {\n    for (const polygon of polygons) {\n        if (pointWithinPolygon(point, polygon)) return true;\n    }\n    return false;\n}\n\nexport function lineStringWithinPolygon(line: [number, number][], polygon: [number, number][][]) {\n    // First, check if geometry points of line segments are all inside polygon\n    for (const point of line) {\n        if (!pointWithinPolygon(point, 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\nexport function lineStringWithinPolygons(\n    line: [number, number][],\n    polygons: [number, number][][][]\n) {\n    for (const polygon of polygons) {\n        if (lineStringWithinPolygon(line, polygon)) return true;\n    }\n    return false;\n}\n\nfunction perp(v1: [number, number], v2: [number, number]) {\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(\n    p1: [number, number],\n    p2: [number, number],\n    q1: [number, number],\n    q2: [number, number]\n) {\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","import {isValue} from '../values';\nimport type {Type} from '../types';\nimport {BooleanType} from '../types';\nimport type {Expression} from '../expression';\nimport type {ParsingContext} from '../parsing_context';\nimport type {EvaluationContext} from '../evaluation_context';\nimport {ICanonicalTileID} from '../../tiles_and_coordinates';\nimport {\n    BBox,\n    EXTENT,\n    boxWithinBox,\n    getTileCoordinates,\n    lineStringWithinPolygon,\n    lineStringWithinPolygons,\n    pointWithinPolygon,\n    pointWithinPolygons,\n    updateBBox\n} from '../../util/geometry_util';\nimport {Point2D} from '../../point2d';\n\ntype GeoJSONPolygons = GeoJSON.Polygon | GeoJSON.MultiPolygon;\n\nfunction getTilePolygon(\n    coordinates: GeoJSON.Position[][],\n    bbox: BBox,\n    canonical: ICanonicalTileID\n) {\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(\n    coordinates: GeoJSON.Position[][][],\n    bbox: BBox,\n    canonical: ICanonicalTileID\n) {\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: GeoJSON.Position, bbox: BBox, polyBBox: BBox, worldSize: number) {\n    if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n        const halfWorldSize = worldSize * 0.5;\n        let shift =\n            p[0] - polyBBox[0] > halfWorldSize\n                ? -worldSize\n                : polyBBox[0] - p[0] > halfWorldSize\n                  ? worldSize\n                  : 0;\n        if (shift === 0) {\n            shift =\n                p[0] - polyBBox[2] > halfWorldSize\n                    ? -worldSize\n                    : polyBBox[2] - p[0] > halfWorldSize\n                      ? worldSize\n                      : 0;\n        }\n        p[0] += shift;\n    }\n    updateBBox(bbox, p);\n}\n\nfunction resetBBox(bbox: BBox) {\n    bbox[0] = bbox[1] = Infinity;\n    bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(\n    geometry: Point2D[][],\n    pointBBox: BBox,\n    polyBBox: BBox,\n    canonical: ICanonicalTileID\n): [number, number][] {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n    const tilePoints: [number, number][] = [];\n    for (const points of geometry) {\n        for (const point of points) {\n            const p: [number, number] = [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(\n    geometry: Point2D[][],\n    lineBBox: BBox,\n    polyBBox: BBox,\n    canonical: ICanonicalTileID\n): [number, number][][] {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n    const tileLines: [number, number][][] = [];\n    for (const line of geometry) {\n        const tileLine: [number, number][] = [];\n        for (const point of line) {\n            const p: [number, number] = [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: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n    const polyBBox: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n    const canonical = ctx.canonicalID();\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: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n    const polyBBox: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n    const canonical = ctx.canonicalID();\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\nexport class Within implements Expression {\n    type: Type;\n    geojson: GeoJSON.GeoJSON;\n    geometries: GeoJSONPolygons;\n\n    constructor(geojson: GeoJSON.GeoJSON, geometries: GeoJSONPolygons) {\n        this.type = BooleanType;\n        this.geojson = geojson;\n        this.geometries = geometries;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2)\n            return context.error(\n                `'within' expression requires exactly one argument, but found ${args.length - 1} instead.`\n            ) as null;\n        if (isValue(args[1])) {\n            const geojson = args[1] as any;\n            if (geojson.type === 'FeatureCollection') {\n                const polygonsCoords: GeoJSON.Position[][][] = [];\n                for (const polygon of geojson.features) {\n                    const {type, coordinates} = polygon.geometry;\n                    if (type === 'Polygon') {\n                        polygonsCoords.push(coordinates);\n                    }\n                    if (type === 'MultiPolygon') {\n                        polygonsCoords.push(...coordinates);\n                    }\n                }\n                if (polygonsCoords.length) {\n                    const multipolygonWrapper: GeoJSON.MultiPolygon = {\n                        type: 'MultiPolygon',\n                        coordinates: polygonsCoords\n                    };\n                    return new Within(geojson, multipolygonWrapper);\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(\n            \"'within' expression requires valid geojson object that contains polygon geometry type.\"\n        ) as null;\n    }\n\n    evaluate(ctx: EvaluationContext) {\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","\nexport default class TinyQueue {\n    constructor(data = [], compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0)) {\n        this.data = data;\n        this.length = this.data.length;\n        this.compare = compare;\n\n        if (this.length > 0) {\n            for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);\n        }\n    }\n\n    push(item) {\n        this.data.push(item);\n        this._up(this.length++);\n    }\n\n    pop() {\n        if (this.length === 0) return undefined;\n\n        const top = this.data[0];\n        const bottom = this.data.pop();\n\n        if (--this.length > 0) {\n            this.data[0] = bottom;\n            this._down(0);\n        }\n\n        return top;\n    }\n\n    peek() {\n        return this.data[0];\n    }\n\n    _up(pos) {\n        const {data, compare} = this;\n        const item = data[pos];\n\n        while (pos > 0) {\n            const parent = (pos - 1) >> 1;\n            const current = data[parent];\n            if (compare(item, current) >= 0) break;\n            data[pos] = current;\n            pos = parent;\n        }\n\n        data[pos] = item;\n    }\n\n    _down(pos) {\n        const {data, compare} = this;\n        const halfLength = this.length >> 1;\n        const item = data[pos];\n\n        while (pos < halfLength) {\n            let bestChild = (pos << 1) + 1; // initially it is the left child\n            const right = bestChild + 1;\n\n            if (right < this.length && compare(data[right], data[bestChild]) < 0) {\n                bestChild = right;\n            }\n            if (compare(data[bestChild], item) >= 0) break;\n\n            data[pos] = data[bestChild];\n            pos = bestChild;\n        }\n\n        data[pos] = item;\n    }\n}\n","\n/**\n * Rearranges items so that all items in the [left, k] are the smallest.\n * The k-th element will have the (k - left + 1)-th smallest value in [left, right].\n *\n * @template T\n * @param {T[]} arr the array to partially sort (in place)\n * @param {number} k middle index for partial sorting (as defined above)\n * @param {number} [left=0] left index of the range to sort\n * @param {number} [right=arr.length-1] right index\n * @param {(a: T, b: T) => number} [compare = (a, b) => a - b] compare function\n */\nexport default function quickselect(arr, k, left = 0, right = arr.length - 1, compare = defaultCompare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            const n = right - left + 1;\n            const m = k - left + 1;\n            const z = Math.log(n);\n            const s = 0.5 * Math.exp(2 * z / 3);\n            const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselect(arr, k, newLeft, newRight, compare);\n        }\n\n        const t = arr[k];\n        let i = left;\n        /** @type {number} */\n        let j = right;\n\n        swap(arr, left, k);\n        if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) i++;\n            while (compare(arr[j], t) > 0) j--;\n        }\n\n        if (compare(arr[left], t) === 0) swap(arr, left, j);\n        else {\n            j++;\n            swap(arr, j, right);\n        }\n\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n\n/**\n * @template T\n * @param {T[]} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {number}\n */\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n","import quickselect from 'quickselect';\nimport {Point2D} from '../point2d';\n\nexport type RingWithArea<T extends Point2D> = T[] & {area?: number};\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n * @param rings - the rings to classify\n * @param maxRings - the maximum number of rings to include in a polygon, use 0 to include all rings\n * @returns an array of polygons with internal rings as holes\n */\nexport function classifyRings<T extends Point2D>(\n    rings: RingWithArea<T>[],\n    maxRings?: number\n): RingWithArea<T>[][] {\n    const len = rings.length;\n\n    if (len <= 1) return [rings];\n\n    const polygons: RingWithArea<T>[][] = [];\n    let polygon: RingWithArea<T>[];\n    let ccw: boolean | undefined;\n\n    for (const ring of rings) {\n        const area = calculateSignedArea(ring);\n        if (area === 0) continue;\n\n        ring.area = Math.abs(area);\n\n        if (ccw === undefined) ccw = area < 0;\n\n        if (ccw === area < 0) {\n            if (polygon) polygons.push(polygon);\n            polygon = [ring];\n        } else {\n            polygon.push(ring);\n        }\n    }\n    if (polygon) polygons.push(polygon);\n\n    // Earcut performance degrades with the # of rings in a polygon. For this\n    // reason, we limit strip out all but the `maxRings` largest rings.\n    if (maxRings > 1) {\n        for (let j = 0; j < polygons.length; j++) {\n            if (polygons[j].length <= maxRings) continue;\n            quickselect(polygons[j], maxRings, 1, polygons[j].length - 1, compareAreas);\n            polygons[j] = polygons[j].slice(0, maxRings);\n        }\n    }\n\n    return polygons;\n}\n\nfunction compareAreas<T extends Point2D>(a: RingWithArea<T>, b: RingWithArea<T>): number {\n    return b.area - a.area;\n}\n\n/**\n * Returns the signed area for the polygon ring.  Positive areas are exterior rings and\n * have a clockwise winding.  Negative areas are interior rings and have a counter clockwise\n * ordering.\n *\n * @param ring - Exterior or interior ring\n * @returns Signed area\n */\nfunction calculateSignedArea(ring: Point2D[]): number {\n    let sum = 0;\n    for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n        p1 = ring[i];\n        p2 = ring[j];\n        sum += (p2.x - p1.x) * (p1.y + p2.y);\n    }\n    return sum;\n}\n","// This is taken from https://github.com/mapbox/cheap-ruler/ in order to take only the relevant parts\n\n// Values that define WGS84 ellipsoid model of the Earth\nconst RE = 6378.137; // equatorial radius\nconst FE = 1 / 298.257223563; // flattening\n\nconst E2 = FE * (2 - FE);\nconst RAD = Math.PI / 180;\n\nexport class CheapRuler {\n    private kx: number;\n    private ky: number;\n\n    constructor(lat: number) {\n        // Curvature formulas from https://en.wikipedia.org/wiki/Earth_radius#Meridional\n        const m = RAD * RE * 1000;\n        const coslat = Math.cos(lat * RAD);\n        const w2 = 1 / (1 - E2 * (1 - coslat * coslat));\n        const w = Math.sqrt(w2);\n\n        // multipliers for converting longitude and latitude degrees into distance\n        this.kx = m * w * coslat; // based on normal radius of curvature\n        this.ky = m * w * w2 * (1 - E2); // based on meridional radius of curvature\n    }\n\n    /**\n     * Given two points of the form [longitude, latitude], returns the distance.\n     *\n     * @param a - point [longitude, latitude]\n     * @param b - point [longitude, latitude]\n     * @returns distance\n     * @example\n     * const distance = ruler.distance([30.5, 50.5], [30.51, 50.49]);\n     * //=distance\n     */\n    public distance(a: [number, number], b: [number, number]) {\n        const dx = this.wrap(a[0] - b[0]) * this.kx;\n        const dy = (a[1] - b[1]) * this.ky;\n        return Math.sqrt(dx * dx + dy * dy);\n    }\n\n    /**\n     * Returns an object of the form {point, index, t}, where point is closest point on the line\n     * from the given point, index is the start index of the segment with the closest point,\n     * and t is a parameter from 0 to 1 that indicates where the closest point is on that segment.\n     *\n     * @param line - an array of points that form the line\n     * @param p - point [longitude, latitude]\n     * @returns the nearest point, its index in the array and the proportion along the line\n     * @example\n     * const point = ruler.pointOnLine(line, [-67.04, 50.5]).point;\n     * //=point\n     */\n    public pointOnLine(line: [number, number][], p: [number, number]) {\n        let minDist = Infinity;\n        let minX: number, minY: number, minI: number, minT: number;\n\n        for (let i = 0; i < line.length - 1; i++) {\n            let x = line[i][0];\n            let y = line[i][1];\n            let dx = this.wrap(line[i + 1][0] - x) * this.kx;\n            let dy = (line[i + 1][1] - y) * this.ky;\n            let t = 0;\n\n            if (dx !== 0 || dy !== 0) {\n                t =\n                    (this.wrap(p[0] - x) * this.kx * dx + (p[1] - y) * this.ky * dy) /\n                    (dx * dx + dy * dy);\n\n                if (t > 1) {\n                    x = line[i + 1][0];\n                    y = line[i + 1][1];\n                } else if (t > 0) {\n                    x += (dx / this.kx) * t;\n                    y += (dy / this.ky) * t;\n                }\n            }\n\n            dx = this.wrap(p[0] - x) * this.kx;\n            dy = (p[1] - y) * this.ky;\n\n            const sqDist = dx * dx + dy * dy;\n            if (sqDist < minDist) {\n                minDist = sqDist;\n                minX = x;\n                minY = y;\n                minI = i;\n                minT = t;\n            }\n        }\n\n        return {\n            point: [minX, minY] as [number, number],\n            index: minI,\n            t: Math.max(0, Math.min(1, minT))\n        };\n    }\n\n    private wrap(deg: number) {\n        while (deg < -180) deg += 360;\n        while (deg > 180) deg -= 360;\n        return deg;\n    }\n}\n","import TinyQueue from 'tinyqueue';\nimport {Expression} from '../expression';\nimport {ParsingContext} from '../parsing_context';\nimport {NumberType, Type} from '../types';\nimport {isValue} from '../values';\nimport {EvaluationContext} from '../evaluation_context';\nimport {\n    BBox,\n    boxWithinBox,\n    getLngLatFromTileCoord,\n    pointWithinPolygon,\n    segmentIntersectSegment,\n    updateBBox\n} from '../../util/geometry_util';\nimport {classifyRings} from '../../util/classify_rings';\nimport {CheapRuler} from '../../util/cheap_ruler';\n\ntype SimpleGeometry = GeoJSON.Polygon | GeoJSON.LineString | GeoJSON.Point;\n\nconst MinPointsSize = 100;\nconst MinLinePointsSize = 50;\n\ntype IndexRange = [number, number];\ntype DistPair = [number, IndexRange, IndexRange];\n\nfunction compareDistPair(a: DistPair, b: DistPair): number {\n    return b[0] - a[0];\n}\n\nfunction getRangeSize(range: IndexRange) {\n    return range[1] - range[0] + 1;\n}\n\nfunction isRangeSafe(range: IndexRange, threshold: number): boolean {\n    return range[1] >= range[0] && range[1] < threshold;\n}\n\nfunction splitRange(range: IndexRange, isLine: boolean): [IndexRange, IndexRange] {\n    if (range[0] > range[1]) {\n        return [null, null];\n    }\n    const size = getRangeSize(range);\n    if (isLine) {\n        if (size === 2) {\n            return [range, null];\n        }\n        const size1 = Math.floor(size / 2);\n        return [\n            [range[0], range[0] + size1],\n            [range[0] + size1, range[1]]\n        ];\n    }\n    if (size === 1) {\n        return [range, null];\n    }\n    const size1 = Math.floor(size / 2) - 1;\n    return [\n        [range[0], range[0] + size1],\n        [range[0] + size1 + 1, range[1]]\n    ];\n}\n\nfunction getBBox(coords: [number, number][], range: IndexRange): BBox {\n    if (!isRangeSafe(range, coords.length)) {\n        return [Infinity, Infinity, -Infinity, -Infinity];\n    }\n\n    const bbox: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n    for (let i = range[0]; i <= range[1]; ++i) {\n        updateBBox(bbox, coords[i]);\n    }\n    return bbox;\n}\n\nfunction getPolygonBBox(polygon: [number, number][][]): BBox {\n    const bbox: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n    for (const ring of polygon) {\n        for (const coord of ring) {\n            updateBBox(bbox, coord);\n        }\n    }\n    return bbox;\n}\n\nfunction isValidBBox(bbox: BBox): boolean {\n    return (\n        bbox[0] !== -Infinity &&\n        bbox[1] !== -Infinity &&\n        bbox[2] !== Infinity &&\n        bbox[3] !== Infinity\n    );\n}\n\n// Calculate the distance between two bounding boxes.\n// Calculate the delta in x and y direction, and use two fake points {0.0, 0.0}\n// and {dx, dy} to calculate the distance. Distance will be 0.0 if bounding box are overlapping.\nfunction bboxToBBoxDistance(bbox1: BBox, bbox2: BBox, ruler: CheapRuler): number {\n    if (!isValidBBox(bbox1) || !isValidBBox(bbox2)) {\n        return NaN;\n    }\n    let dx = 0.0;\n    let dy = 0.0;\n    // bbox1 in left side\n    if (bbox1[2] < bbox2[0]) {\n        dx = bbox2[0] - bbox1[2];\n    }\n    // bbox1 in right side\n    if (bbox1[0] > bbox2[2]) {\n        dx = bbox1[0] - bbox2[2];\n    }\n    // bbox1 in above side\n    if (bbox1[1] > bbox2[3]) {\n        dy = bbox1[1] - bbox2[3];\n    }\n    // bbox1 in down side\n    if (bbox1[3] < bbox2[1]) {\n        dy = bbox2[1] - bbox1[3];\n    }\n    return ruler.distance([0.0, 0.0], [dx, dy]);\n}\n\nfunction pointToLineDistance(\n    point: [number, number],\n    line: [number, number][],\n    ruler: CheapRuler\n): number {\n    const nearestPoint = ruler.pointOnLine(line, point);\n    return ruler.distance(point, nearestPoint.point);\n}\n\nfunction segmentToSegmentDistance(\n    p1: [number, number],\n    p2: [number, number],\n    q1: [number, number],\n    q2: [number, number],\n    ruler: CheapRuler\n): number {\n    const dist1 = Math.min(\n        pointToLineDistance(p1, [q1, q2], ruler),\n        pointToLineDistance(p2, [q1, q2], ruler)\n    );\n    const dist2 = Math.min(\n        pointToLineDistance(q1, [p1, p2], ruler),\n        pointToLineDistance(q2, [p1, p2], ruler)\n    );\n    return Math.min(dist1, dist2);\n}\n\nfunction lineToLineDistance(\n    line1: [number, number][],\n    range1: IndexRange,\n    line2: [number, number][],\n    range2: IndexRange,\n    ruler: CheapRuler\n): number {\n    const rangeSafe = isRangeSafe(range1, line1.length) && isRangeSafe(range2, line2.length);\n    if (!rangeSafe) {\n        return Infinity;\n    }\n\n    let dist = Infinity;\n    for (let i = range1[0]; i < range1[1]; ++i) {\n        const p1 = line1[i];\n        const p2 = line1[i + 1];\n        for (let j = range2[0]; j < range2[1]; ++j) {\n            const q1 = line2[j];\n            const q2 = line2[j + 1];\n            if (segmentIntersectSegment(p1, p2, q1, q2)) {\n                return 0.0;\n            }\n            dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n        }\n    }\n    return dist;\n}\n\nfunction pointsToPointsDistance(\n    points1: [number, number][],\n    range1: IndexRange,\n    points2: [number, number][],\n    range2: IndexRange,\n    ruler: CheapRuler\n): number {\n    const rangeSafe = isRangeSafe(range1, points1.length) && isRangeSafe(range2, points2.length);\n    if (!rangeSafe) {\n        return NaN;\n    }\n\n    let dist = Infinity;\n    for (let i = range1[0]; i <= range1[1]; ++i) {\n        for (let j = range2[0]; j <= range2[1]; ++j) {\n            dist = Math.min(dist, ruler.distance(points1[i], points2[j]));\n            if (dist === 0.0) {\n                return dist;\n            }\n        }\n    }\n    return dist;\n}\n\nfunction pointToPolygonDistance(\n    point: [number, number],\n    polygon: [number, number][][],\n    ruler: CheapRuler\n): number {\n    if (pointWithinPolygon(point, polygon, true)) {\n        return 0.0;\n    }\n    let dist = Infinity;\n    for (const ring of polygon) {\n        const front = ring[0];\n        const back = ring[ring.length - 1];\n        if (front !== back) {\n            dist = Math.min(dist, pointToLineDistance(point, [back, front], ruler));\n            if (dist === 0.0) {\n                return dist;\n            }\n        }\n        const nearestPoint = ruler.pointOnLine(ring, point);\n        dist = Math.min(dist, ruler.distance(point, nearestPoint.point));\n        if (dist === 0.0) {\n            return dist;\n        }\n    }\n    return dist;\n}\n\nfunction lineToPolygonDistance(\n    line: [number, number][],\n    range: IndexRange,\n    polygon: [number, number][][],\n    ruler: CheapRuler\n): number {\n    if (!isRangeSafe(range, line.length)) {\n        return NaN;\n    }\n\n    for (let i = range[0]; i <= range[1]; ++i) {\n        if (pointWithinPolygon(line[i], polygon, true)) {\n            return 0.0;\n        }\n    }\n\n    let dist = Infinity;\n    for (let i = range[0]; i < range[1]; ++i) {\n        const p1 = line[i];\n        const p2 = line[i + 1];\n        for (const ring of polygon) {\n            for (let j = 0, len = ring.length, k = len - 1; j < len; k = j++) {\n                const q1 = ring[k];\n                const q2 = ring[j];\n                if (segmentIntersectSegment(p1, p2, q1, q2)) {\n                    return 0.0;\n                }\n                dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n            }\n        }\n    }\n    return dist;\n}\n\nfunction polygonIntersect(poly1: [number, number][][], poly2: [number, number][][]): boolean {\n    for (const ring of poly1) {\n        for (const point of ring) {\n            if (pointWithinPolygon(point, poly2, true)) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nfunction polygonToPolygonDistance(\n    polygon1: [number, number][][],\n    polygon2: [number, number][][],\n    ruler,\n    currentMiniDist = Infinity\n): number {\n    const bbox1 = getPolygonBBox(polygon1);\n    const bbox2 = getPolygonBBox(polygon2);\n    if (\n        currentMiniDist !== Infinity &&\n        bboxToBBoxDistance(bbox1, bbox2, ruler) >= currentMiniDist\n    ) {\n        return currentMiniDist;\n    }\n\n    if (boxWithinBox(bbox1, bbox2)) {\n        if (polygonIntersect(polygon1, polygon2)) {\n            return 0.0;\n        }\n    } else if (polygonIntersect(polygon2, polygon1)) {\n        return 0.0;\n    }\n\n    let dist = Infinity;\n    for (const ring1 of polygon1) {\n        for (let i = 0, len1 = ring1.length, l = len1 - 1; i < len1; l = i++) {\n            const p1 = ring1[l];\n            const p2 = ring1[i];\n            for (const ring2 of polygon2) {\n                for (let j = 0, len2 = ring2.length, k = len2 - 1; j < len2; k = j++) {\n                    const q1 = ring2[k];\n                    const q2 = ring2[j];\n                    if (segmentIntersectSegment(p1, p2, q1, q2)) {\n                        return 0.0;\n                    }\n                    dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n                }\n            }\n        }\n    }\n    return dist;\n}\n\nfunction updateQueue(\n    distQueue: TinyQueue<DistPair>,\n    miniDist: number,\n    ruler: CheapRuler,\n    points: [number, number][],\n    polyBBox: BBox,\n    rangeA?: IndexRange\n) {\n    if (!rangeA) {\n        return;\n    }\n    const tempDist = bboxToBBoxDistance(getBBox(points, rangeA), polyBBox, ruler);\n    // Insert new pair to the queue if the bbox distance is less than\n    // miniDist, The pair with biggest distance will be at the top\n    if (tempDist < miniDist) {\n        distQueue.push([tempDist, rangeA, [0, 0]]);\n    }\n}\n\nfunction updateQueueTwoSets(\n    distQueue: TinyQueue<DistPair>,\n    miniDist: number,\n    ruler: CheapRuler,\n    pointSet1: [number, number][],\n    pointSet2: [number, number][],\n    range1?: IndexRange,\n    range2?: IndexRange\n) {\n    if (!range1 || !range2) {\n        return;\n    }\n    const tempDist = bboxToBBoxDistance(\n        getBBox(pointSet1, range1),\n        getBBox(pointSet2, range2),\n        ruler\n    );\n    // Insert new pair to the queue if the bbox distance is less than\n    // miniDist, The pair with biggest distance will be at the top\n    if (tempDist < miniDist) {\n        distQueue.push([tempDist, range1, range2]);\n    }\n}\n\n// Divide and conquer, the time complexity is O(n*lgn), faster than Brute force\n// O(n*n) Most of the time, use index for in-place processing.\nfunction pointsToPolygonDistance(\n    points: [number, number][],\n    isLine: boolean,\n    polygon: [number, number][][],\n    ruler: CheapRuler,\n    currentMiniDist = Infinity\n) {\n    let miniDist = Math.min(ruler.distance(points[0], polygon[0][0]), currentMiniDist);\n    if (miniDist === 0.0) {\n        return miniDist;\n    }\n\n    const distQueue = new TinyQueue<DistPair>(\n        [[0, [0, points.length - 1], [0, 0]]],\n        compareDistPair\n    );\n\n    const polyBBox = getPolygonBBox(polygon);\n    while (distQueue.length > 0) {\n        const distPair = distQueue.pop();\n        if (distPair[0] >= miniDist) {\n            continue;\n        }\n\n        const range = distPair[1];\n\n        // In case the set size are relatively small, we could use brute-force directly\n        const threshold = isLine ? MinLinePointsSize : MinPointsSize;\n        if (getRangeSize(range) <= threshold) {\n            if (!isRangeSafe(range, points.length)) {\n                return NaN;\n            }\n            if (isLine) {\n                const tempDist = lineToPolygonDistance(points, range, polygon, ruler);\n                if (isNaN(tempDist) || tempDist === 0.0) {\n                    return tempDist;\n                }\n                miniDist = Math.min(miniDist, tempDist);\n            } else {\n                for (let i = range[0]; i <= range[1]; ++i) {\n                    const tempDist = pointToPolygonDistance(points[i], polygon, ruler);\n                    miniDist = Math.min(miniDist, tempDist);\n                    if (miniDist === 0.0) {\n                        return 0.0;\n                    }\n                }\n            }\n        } else {\n            const newRangesA = splitRange(range, isLine);\n\n            updateQueue(distQueue, miniDist, ruler, points, polyBBox, newRangesA[0]);\n            updateQueue(distQueue, miniDist, ruler, points, polyBBox, newRangesA[1]);\n        }\n    }\n    return miniDist;\n}\n\nfunction pointSetToPointSetDistance(\n    pointSet1: [number, number][],\n    isLine1: boolean,\n    pointSet2: [number, number][],\n    isLine2: boolean,\n    ruler: CheapRuler,\n    currentMiniDist = Infinity\n): number {\n    let miniDist = Math.min(currentMiniDist, ruler.distance(pointSet1[0], pointSet2[0]));\n    if (miniDist === 0.0) {\n        return miniDist;\n    }\n\n    const distQueue = new TinyQueue<DistPair>(\n        [[0, [0, pointSet1.length - 1], [0, pointSet2.length - 1]]],\n        compareDistPair\n    );\n\n    while (distQueue.length > 0) {\n        const distPair = distQueue.pop();\n        if (distPair[0] >= miniDist) {\n            continue;\n        }\n\n        const rangeA = distPair[1];\n        const rangeB = distPair[2];\n        const threshold1 = isLine1 ? MinLinePointsSize : MinPointsSize;\n        const threshold2 = isLine2 ? MinLinePointsSize : MinPointsSize;\n\n        // In case the set size are relatively small, we could use brute-force directly\n        if (getRangeSize(rangeA) <= threshold1 && getRangeSize(rangeB) <= threshold2) {\n            if (!isRangeSafe(rangeA, pointSet1.length) && isRangeSafe(rangeB, pointSet2.length)) {\n                return NaN;\n            }\n            let tempDist: number;\n            if (isLine1 && isLine2) {\n                tempDist = lineToLineDistance(pointSet1, rangeA, pointSet2, rangeB, ruler);\n                miniDist = Math.min(miniDist, tempDist);\n            } else if (isLine1 && !isLine2) {\n                const sublibe = pointSet1.slice(rangeA[0], rangeA[1] + 1);\n                for (let i = rangeB[0]; i <= rangeB[1]; ++i) {\n                    tempDist = pointToLineDistance(pointSet2[i], sublibe, ruler);\n                    miniDist = Math.min(miniDist, tempDist);\n                    if (miniDist === 0.0) {\n                        return miniDist;\n                    }\n                }\n            } else if (!isLine1 && isLine2) {\n                const sublibe = pointSet2.slice(rangeB[0], rangeB[1] + 1);\n                for (let i = rangeA[0]; i <= rangeA[1]; ++i) {\n                    tempDist = pointToLineDistance(pointSet1[i], sublibe, ruler);\n                    miniDist = Math.min(miniDist, tempDist);\n                    if (miniDist === 0.0) {\n                        return miniDist;\n                    }\n                }\n            } else {\n                tempDist = pointsToPointsDistance(pointSet1, rangeA, pointSet2, rangeB, ruler);\n                miniDist = Math.min(miniDist, tempDist);\n            }\n        } else {\n            const newRangesA = splitRange(rangeA, isLine1);\n            const newRangesB = splitRange(rangeB, isLine2);\n            updateQueueTwoSets(\n                distQueue,\n                miniDist,\n                ruler,\n                pointSet1,\n                pointSet2,\n                newRangesA[0],\n                newRangesB[0]\n            );\n            updateQueueTwoSets(\n                distQueue,\n                miniDist,\n                ruler,\n                pointSet1,\n                pointSet2,\n                newRangesA[0],\n                newRangesB[1]\n            );\n            updateQueueTwoSets(\n                distQueue,\n                miniDist,\n                ruler,\n                pointSet1,\n                pointSet2,\n                newRangesA[1],\n                newRangesB[0]\n            );\n            updateQueueTwoSets(\n                distQueue,\n                miniDist,\n                ruler,\n                pointSet1,\n                pointSet2,\n                newRangesA[1],\n                newRangesB[1]\n            );\n        }\n    }\n    return miniDist;\n}\n\nfunction pointToGeometryDistance(ctx: EvaluationContext, geometries: SimpleGeometry[]) {\n    const tilePoints = ctx.geometry();\n    const pointPosition = tilePoints\n        .flat()\n        .map((p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical) as [number, number]);\n    if (tilePoints.length === 0) {\n        return NaN;\n    }\n    const ruler = new CheapRuler(pointPosition[0][1]);\n    let dist = Infinity;\n    for (const geometry of geometries) {\n        switch (geometry.type) {\n            case 'Point':\n                dist = Math.min(\n                    dist,\n                    pointSetToPointSetDistance(\n                        pointPosition,\n                        false,\n                        [geometry.coordinates as [number, number]],\n                        false,\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n            case 'LineString':\n                dist = Math.min(\n                    dist,\n                    pointSetToPointSetDistance(\n                        pointPosition,\n                        false,\n                        geometry.coordinates as [number, number][],\n                        true,\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n            case 'Polygon':\n                dist = Math.min(\n                    dist,\n                    pointsToPolygonDistance(\n                        pointPosition,\n                        false,\n                        geometry.coordinates as [number, number][][],\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n        }\n        if (dist === 0.0) {\n            return dist;\n        }\n    }\n    return dist;\n}\n\nfunction lineStringToGeometryDistance(ctx: EvaluationContext, geometries: SimpleGeometry[]) {\n    const tileLine = ctx.geometry();\n    const linePositions = tileLine\n        .flat()\n        .map((p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical) as [number, number]);\n    if (tileLine.length === 0) {\n        return NaN;\n    }\n    const ruler = new CheapRuler(linePositions[0][1]);\n    let dist = Infinity;\n    for (const geometry of geometries) {\n        switch (geometry.type) {\n            case 'Point':\n                dist = Math.min(\n                    dist,\n                    pointSetToPointSetDistance(\n                        linePositions,\n                        true,\n                        [geometry.coordinates as [number, number]],\n                        false,\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n            case 'LineString':\n                dist = Math.min(\n                    dist,\n                    pointSetToPointSetDistance(\n                        linePositions,\n                        true,\n                        geometry.coordinates as [number, number][],\n                        true,\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n            case 'Polygon':\n                dist = Math.min(\n                    dist,\n                    pointsToPolygonDistance(\n                        linePositions,\n                        true,\n                        geometry.coordinates as [number, number][][],\n                        ruler,\n                        dist\n                    )\n                );\n                break;\n        }\n        if (dist === 0.0) {\n            return dist;\n        }\n    }\n    return dist;\n}\n\nfunction polygonToGeometryDistance(ctx: EvaluationContext, geometries: SimpleGeometry[]) {\n    const tilePolygon = ctx.geometry();\n    if (tilePolygon.length === 0 || tilePolygon[0].length === 0) {\n        return NaN;\n    }\n    const polygons = classifyRings(tilePolygon, 0).map((polygon) => {\n        return polygon.map((ring) => {\n            return ring.map(\n                (p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical) as [number, number]\n            );\n        });\n    });\n    const ruler = new CheapRuler(polygons[0][0][0][1]);\n    let dist = Infinity;\n    for (const geometry of geometries) {\n        for (const polygon of polygons) {\n            switch (geometry.type) {\n                case 'Point':\n                    dist = Math.min(\n                        dist,\n                        pointsToPolygonDistance(\n                            [geometry.coordinates as [number, number]],\n                            false,\n                            polygon,\n                            ruler,\n                            dist\n                        )\n                    );\n                    break;\n                case 'LineString':\n                    dist = Math.min(\n                        dist,\n                        pointsToPolygonDistance(\n                            geometry.coordinates as [number, number][],\n                            true,\n                            polygon,\n                            ruler,\n                            dist\n                        )\n                    );\n                    break;\n                case 'Polygon':\n                    dist = Math.min(\n                        dist,\n                        polygonToPolygonDistance(\n                            polygon,\n                            geometry.coordinates as [number, number][][],\n                            ruler,\n                            dist\n                        )\n                    );\n                    break;\n            }\n            if (dist === 0.0) {\n                return dist;\n            }\n        }\n    }\n    return dist;\n}\n\nfunction toSimpleGeometry(\n    geometry: Exclude<GeoJSON.Geometry, GeoJSON.GeometryCollection>\n): SimpleGeometry[] {\n    if (geometry.type === 'MultiPolygon') {\n        return geometry.coordinates.map((polygon) => {\n            return {\n                type: 'Polygon',\n                coordinates: polygon\n            };\n        });\n    }\n    if (geometry.type === 'MultiLineString') {\n        return geometry.coordinates.map((lineString) => {\n            return {\n                type: 'LineString',\n                coordinates: lineString\n            };\n        });\n    }\n    if (geometry.type === 'MultiPoint') {\n        return geometry.coordinates.map((point) => {\n            return {\n                type: 'Point',\n                coordinates: point\n            };\n        });\n    }\n    return [geometry];\n}\n\nexport class Distance implements Expression {\n    type: Type;\n    geojson: GeoJSON.GeoJSON;\n    geometries: SimpleGeometry[];\n\n    constructor(geojson: GeoJSON.GeoJSON, geometries: SimpleGeometry[]) {\n        this.type = NumberType;\n        this.geojson = geojson;\n        this.geometries = geometries;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2)\n            return context.error(\n                `'distance' expression requires exactly one argument, but found ${args.length - 1} instead.`\n            ) as null;\n        if (isValue(args[1])) {\n            const geojson = args[1] as any;\n            if (geojson.type === 'FeatureCollection') {\n                return new Distance(\n                    geojson,\n                    geojson.features.map((feature) => toSimpleGeometry(feature.geometry)).flat()\n                );\n            } else if (geojson.type === 'Feature') {\n                return new Distance(geojson, toSimpleGeometry(geojson.geometry));\n            } else if ('type' in geojson && 'coordinates' in geojson) {\n                return new Distance(geojson, toSimpleGeometry(geojson));\n            }\n        }\n        return context.error(\n            \"'distance' expression requires valid geojson object that contains polygon geometry type.\"\n        ) as null;\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        if (ctx.geometry() != null && ctx.canonicalID() != null) {\n            if (ctx.geometryType() === 'Point') {\n                return pointToGeometryDistance(ctx, this.geometries);\n            } else if (ctx.geometryType() === 'LineString') {\n                return lineStringToGeometryDistance(ctx, this.geometries);\n            } else if (ctx.geometryType() === 'Polygon') {\n                return polygonToGeometryDistance(ctx, this.geometries);\n            }\n        }\n        return NaN;\n    }\n\n    eachChild() {}\n\n    outputDefined(): boolean {\n        return true;\n    }\n}\n","import {Type, ValueType} from '../types';\nimport type {Expression} from '../expression';\nimport {ParsingContext} from '../parsing_context';\nimport {EvaluationContext} from '../evaluation_context';\nimport {getOwn} from '../../util/get_own';\n\nexport class GlobalState implements Expression {\n    type: Type;\n    key: string;\n\n    constructor(key: string) {\n        this.type = ValueType;\n        this.key = key;\n    }\n\n    static parse(args: ReadonlyArray<unknown>, context: ParsingContext): Expression {\n        if (args.length !== 2) {\n            return context.error(\n                `Expected 1 argument, but found ${args.length - 1} instead.`\n            ) as null;\n        }\n\n        const key = args[1];\n\n        if (key === undefined || key === null) {\n            return context.error('Global state property must be defined.') as null;\n        }\n\n        if (typeof key !== 'string') {\n            return context.error(\n                `Global state property must be string, but found ${typeof args[1]} instead.`\n            ) as null;\n        }\n\n        return new GlobalState(key);\n    }\n\n    evaluate(ctx: EvaluationContext) {\n        const globalState = ctx.globals?.globalState;\n\n        if (!globalState || Object.keys(globalState).length === 0) return null;\n\n        return getOwn(globalState, this.key) ?? null;\n    }\n\n    eachChild() {}\n\n    outputDefined() {\n        return false;\n    }\n}\n","import {Let} from './let';\nimport {Var} from './var';\nimport {Literal} from './literal';\nimport {Assertion} from './assertion';\nimport {Coercion} from './coercion';\nimport {At} from './at';\nimport {In} from './in';\nimport {IndexOf} from './index_of';\nimport {Match} from './match';\nimport {Case} from './case';\nimport {Slice} from './slice';\nimport {Step} from './step';\nimport {Interpolate} from './interpolate';\nimport {Coalesce} from './coalesce';\nimport {\n    Equals,\n    NotEquals,\n    LessThan,\n    GreaterThan,\n    LessThanOrEqual,\n    GreaterThanOrEqual\n} from './comparison';\nimport {CollatorExpression} from './collator';\nimport {NumberFormat} from './number_format';\nimport {FormatExpression} from './format';\nimport {ImageExpression} from './image';\nimport {Length} from './length';\nimport {Within} from './within';\nimport {Distance} from './distance';\nimport {GlobalState} from './global_state';\n\nimport type {ExpressionRegistry} from '../expression';\n\nexport const 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    distance: Distance,\n    'global-state': GlobalState\n};\n","import {extendBy} from '../util/extend';\nimport {ExpressionParsingError} from './parsing_error';\nimport {ParsingContext} from './parsing_context';\nimport {EvaluationContext} from './evaluation_context';\n\nimport {\n    CompoundExpression,\n    isFeatureConstant,\n    isGlobalPropertyConstant,\n    isStateConstant,\n    isExpressionConstant\n} from './compound_expression';\n\nimport {Step} from './definitions/step';\nimport {Interpolate} from './definitions/interpolate';\nimport {Coalesce} from './definitions/coalesce';\nimport {Let} from './definitions/let';\nimport {expressions} from './definitions';\n\nimport {RuntimeError} from './runtime_error';\nimport {success, error} from '../util/result';\nimport {\n    supportsPropertyExpression,\n    supportsZoomExpression,\n    supportsInterpolation\n} from '../util/properties';\n\nimport {\n    ColorType,\n    StringType,\n    NumberType,\n    BooleanType,\n    ValueType,\n    FormattedType,\n    PaddingType,\n    ResolvedImageType,\n    VariableAnchorOffsetCollectionType,\n    array,\n    type Type,\n    type EvaluationKind,\n    ProjectionDefinitionType,\n    NumberArrayType,\n    ColorArrayType\n} from './types';\nimport type {Value} from './values';\nimport type {Expression} from './expression';\nimport {type StylePropertySpecification} from '..';\nimport type {Result} from '../util/result';\nimport type {InterpolationType} from './definitions/interpolate';\nimport type {\n    PaddingSpecification,\n    NumberArraySpecification,\n    ColorArraySpecification,\n    PropertyValueSpecification,\n    VariableAnchorOffsetCollectionSpecification\n} from '../types.g';\nimport type {FormattedSection} from './types/formatted';\nimport type {Point2D} from '../point2d';\n\nimport {ICanonicalTileID} from '../tiles_and_coordinates';\nimport {isFunction, createFunction} from '../function';\nimport {Color} from './types/color';\nimport {Padding} from './types/padding';\nimport {NumberArray} from './types/number_array';\nimport {ColorArray} from './types/color_array';\nimport {VariableAnchorOffsetCollection} from './types/variable_anchor_offset_collection';\nimport {ProjectionDefinition} from './types/projection_definition';\nimport {GlobalState} from './definitions/global_state';\n\nexport type Feature = {\n    readonly type:\n        | 0\n        | 1\n        | 2\n        | 3\n        | 'Unknown'\n        | 'Point'\n        | 'MultiPoint'\n        | 'LineString'\n        | 'MultiLineString'\n        | 'Polygon'\n        | 'MultiPolygon';\n    readonly id?: any;\n    readonly properties: {[_: string]: any};\n    readonly patterns?: {\n        [_: string]: {\n            min: string;\n            mid: string;\n            max: string;\n        };\n    };\n    readonly dashes?: {\n        [_: string]: {\n            min: string;\n            mid: string;\n            max: string;\n        };\n    };\n    readonly geometry?: Array<Array<Point2D>>;\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = Readonly<{\n    zoom: number;\n    heatmapDensity?: number;\n    elevation?: number;\n    lineProgress?: number;\n    isSupportedScript?: (_: string) => boolean;\n    accumulated?: Value;\n    globalState?: Record<string, any>;\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    readonly _globalState: Record<string, any>;\n\n    constructor(\n        expression: Expression,\n        propertySpec?: StylePropertySpecification | null,\n        globalState?: Record<string, any>\n    ) {\n        this.expression = expression;\n        this._warningHistory = {};\n        this._evaluator = new EvaluationContext();\n        this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n        this._enumValues =\n            propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n        this._globalState = globalState;\n    }\n\n    evaluateWithoutErrorHandling(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature;\n        this._evaluator.featureState = featureState;\n        this._evaluator.canonical = canonical;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection;\n\n        return this.expression.evaluate(this._evaluator);\n    }\n\n    evaluate(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature || null;\n        this._evaluator.featureState = featureState || null;\n        this._evaluator.canonical = canonical;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection || null;\n\n        try {\n            const val = this.expression.evaluate(this._evaluator);\n            if (val === null || val === undefined || (typeof val === 'number' && val !== val)) {\n                return this._defaultValue;\n            }\n            if (this._enumValues && !(val in this._enumValues)) {\n                throw new RuntimeError(\n                    `Expected value to be one of ${Object.keys(this._enumValues)\n                        .map((v) => JSON.stringify(v))\n                        .join(', ')}, but found ${JSON.stringify(val)} instead.`\n                );\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: unknown) {\n    return (\n        Array.isArray(expression) &&\n        expression.length > 0 &&\n        typeof expression[0] === 'string' &&\n        expression[0] in expressions\n    );\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(\n    expression: unknown,\n    propertySpec?: StylePropertySpecification | null,\n    globalState?: Record<string, any>\n): Result<StyleExpression, Array<ExpressionParsingError>> {\n    const parser = new ParsingContext(\n        expressions,\n        isExpressionConstant,\n        [],\n        propertySpec ? getExpectedType(propertySpec) : undefined\n    );\n\n    // For string-valued properties, coerce to string at the top level rather than asserting.\n    const parsed = parser.parse(\n        expression,\n        undefined,\n        undefined,\n        undefined,\n        propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined\n    );\n\n    if (!parsed) {\n        return error(parser.errors);\n    }\n\n    return success(new StyleExpression(parsed, propertySpec, globalState));\n}\n\nexport class ZoomConstantExpression<Kind extends EvaluationKind> {\n    kind: Kind;\n    isStateDependent: boolean;\n    globalStateRefs: Set<string>;\n    _styleExpression: StyleExpression;\n    readonly _globalState: Record<string, any>;\n\n    constructor(kind: Kind, expression: StyleExpression, globalState?: Record<string, any>) {\n        this.kind = kind;\n        this._styleExpression = expression;\n        this.isStateDependent =\n            kind !== ('constant' as EvaluationKind) && !isStateConstant(expression.expression);\n        this.globalStateRefs = findGlobalStateRefs(expression.expression);\n        this._globalState = globalState;\n    }\n\n    evaluateWithoutErrorHandling(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        return this._styleExpression.evaluateWithoutErrorHandling(\n            globals,\n            feature,\n            featureState,\n            canonical,\n            availableImages,\n            formattedSection\n        );\n    }\n\n    evaluate(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        return this._styleExpression.evaluate(\n            globals,\n            feature,\n            featureState,\n            canonical,\n            availableImages,\n            formattedSection\n        );\n    }\n}\n\nexport class ZoomDependentExpression<Kind extends EvaluationKind> {\n    kind: Kind;\n    zoomStops: Array<number>;\n    isStateDependent: boolean;\n    globalStateRefs: Set<string>;\n    _styleExpression: StyleExpression;\n    interpolationType: InterpolationType;\n    readonly _globalState: Record<string, any>;\n\n    constructor(\n        kind: Kind,\n        expression: StyleExpression,\n        zoomStops: Array<number>,\n        interpolationType?: InterpolationType,\n        globalState?: Record<string, any>\n    ) {\n        this.kind = kind;\n        this.zoomStops = zoomStops;\n        this._styleExpression = expression;\n        this.isStateDependent =\n            kind !== ('camera' as EvaluationKind) && !isStateConstant(expression.expression);\n        this.globalStateRefs = findGlobalStateRefs(expression.expression);\n        this.interpolationType = interpolationType;\n        this._globalState = globalState;\n    }\n\n    evaluateWithoutErrorHandling(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        return this._styleExpression.evaluateWithoutErrorHandling(\n            globals,\n            feature,\n            featureState,\n            canonical,\n            availableImages,\n            formattedSection\n        );\n    }\n\n    evaluate(\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ): any {\n        if (this._globalState) {\n            globals = addGlobalState(globals, this._globalState);\n        }\n        return this._styleExpression.evaluate(\n            globals,\n            feature,\n            featureState,\n            canonical,\n            availableImages,\n            formattedSection\n        );\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 function isZoomExpression(\n    expression: any\n): expression is ZoomConstantExpression<'source'> | ZoomDependentExpression<'source'> {\n    return (expression as ZoomConstantExpression<'source'>)._styleExpression !== undefined;\n}\n\nexport type ConstantExpression = {\n    kind: 'constant';\n    globalStateRefs: Set<string>;\n    readonly _globalState: Record<string, any>;\n    readonly evaluate: (\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>\n    ) => any;\n};\n\nexport type SourceExpression = {\n    kind: 'source';\n    isStateDependent: boolean;\n    globalStateRefs: Set<string>;\n    readonly _globalState: Record<string, any>;\n    readonly evaluate: (\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ) => any;\n};\n\nexport type CameraExpression = {\n    kind: 'camera';\n    globalStateRefs: Set<string>;\n    readonly _globalState: Record<string, any>;\n    readonly evaluate: (\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>\n    ) => any;\n    readonly interpolationFactor: (input: number, lower: number, upper: number) => number;\n    zoomStops: Array<number>;\n    interpolationType: InterpolationType;\n};\n\nexport type CompositeExpression = {\n    kind: 'composite';\n    isStateDependent: boolean;\n    globalStateRefs: Set<string>;\n    readonly _globalState: Record<string, any>;\n    readonly evaluate: (\n        globals: GlobalProperties,\n        feature?: Feature,\n        featureState?: FeatureState,\n        canonical?: ICanonicalTileID,\n        availableImages?: Array<string>,\n        formattedSection?: FormattedSection\n    ) => any;\n    readonly interpolationFactor: (input: number, lower: number, upper: number) => number;\n    zoomStops: Array<number>;\n    interpolationType: InterpolationType;\n};\n\nexport type StylePropertyExpression =\n    | ConstantExpression\n    | SourceExpression\n    | CameraExpression\n    | CompositeExpression;\n\nexport function createPropertyExpression(\n    expressionInput: unknown,\n    propertySpec: StylePropertySpecification,\n    globalState?: Record<string, any>\n): Result<StylePropertyExpression, Array<ExpressionParsingError>> {\n    const expression = createExpression(expressionInput, propertySpec, globalState);\n    if (expression.result === 'error') {\n        return expression;\n    }\n\n    const parsed = expression.value.expression;\n\n    const isFeatureConstantResult = isFeatureConstant(parsed);\n    if (!isFeatureConstantResult && !supportsPropertyExpression(propertySpec)) {\n        return error([new ExpressionParsingError('', 'data expressions not supported')]);\n    }\n\n    const isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n    if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n        return error([new ExpressionParsingError('', 'zoom expressions not supported')]);\n    }\n\n    const zoomCurve = findZoomCurve(parsed);\n    if (!zoomCurve && !isZoomConstant) {\n        return error([\n            new ExpressionParsingError(\n                '',\n                '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'\n            )\n        ]);\n    } else if (zoomCurve instanceof ExpressionParsingError) {\n        return error([zoomCurve]);\n    } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n        return error([\n            new ExpressionParsingError(\n                '',\n                '\"interpolate\" expressions cannot be used with this property'\n            )\n        ]);\n    }\n\n    if (!zoomCurve) {\n        return success(\n            isFeatureConstantResult\n                ? (new ZoomConstantExpression(\n                      'constant',\n                      expression.value,\n                      globalState\n                  ) as ConstantExpression)\n                : (new ZoomConstantExpression(\n                      'source',\n                      expression.value,\n                      globalState\n                  ) as SourceExpression)\n        );\n    }\n\n    const interpolationType =\n        zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n    return success(\n        isFeatureConstantResult\n            ? (new ZoomDependentExpression(\n                  'camera',\n                  expression.value,\n                  zoomCurve.labels,\n                  interpolationType,\n                  globalState\n              ) as CameraExpression)\n            : (new ZoomDependentExpression(\n                  'composite',\n                  expression.value,\n                  zoomCurve.labels,\n                  interpolationType,\n                  globalState\n              ) as CompositeExpression)\n    );\n}\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction<T> {\n    _parameters: PropertyValueSpecification<T>;\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<number>;\n\n    constructor(\n        parameters: PropertyValueSpecification<T>,\n        specification: StylePropertySpecification\n    ) {\n        this._parameters = parameters;\n        this._specification = specification;\n        extendBy(this, createFunction(this._parameters, this._specification));\n    }\n\n    static deserialize<T>(serialized: {\n        _parameters: PropertyValueSpecification<T>;\n        _specification: StylePropertySpecification;\n    }) {\n        return new StylePropertyFunction(\n            serialized._parameters,\n            serialized._specification\n        ) as StylePropertyFunction<T>;\n    }\n\n    static serialize<T>(input: StylePropertyFunction<T>) {\n        return {\n            _parameters: input._parameters,\n            _specification: input._specification\n        };\n    }\n}\n\nexport function normalizePropertyExpression<T>(\n    value: PropertyValueSpecification<T>,\n    specification: StylePropertySpecification,\n    globalState?: Record<string, any>\n): StylePropertyExpression {\n    if (isFunction(value)) {\n        return new StylePropertyFunction(value, specification) as any;\n    } else if (isExpression(value)) {\n        const expression = createPropertyExpression(value, specification, globalState);\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    } else {\n        let constant: any = value;\n        if (specification.type === 'color' && typeof value === 'string') {\n            constant = Color.parse(value);\n        } else if (\n            specification.type === 'padding' &&\n            (typeof value === 'number' || Array.isArray(value))\n        ) {\n            constant = Padding.parse(value as PaddingSpecification);\n        } else if (\n            specification.type === 'numberArray' &&\n            (typeof value === 'number' || Array.isArray(value))\n        ) {\n            constant = NumberArray.parse(value as NumberArraySpecification);\n        } else if (\n            specification.type === 'colorArray' &&\n            (typeof value === 'string' || Array.isArray(value))\n        ) {\n            constant = ColorArray.parse(value as ColorArraySpecification);\n        } else if (\n            specification.type === 'variableAnchorOffsetCollection' &&\n            Array.isArray(value)\n        ) {\n            constant = VariableAnchorOffsetCollection.parse(\n                value as VariableAnchorOffsetCollectionSpecification\n            );\n        } else if (specification.type === 'projectionDefinition' && typeof value === 'string') {\n            constant = ProjectionDefinition.parse(value);\n        }\n        return {\n            globalStateRefs: new Set<string>(),\n            _globalState: null,\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 | ExpressionParsingError | null {\n    let result = null;\n    if (expression instanceof Let) {\n        result = findZoomCurve(expression.result);\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    } else if (\n        (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 ExpressionParsingError) {\n        return result;\n    }\n\n    expression.eachChild((child) => {\n        const childResult = findZoomCurve(child);\n        if (childResult instanceof ExpressionParsingError) {\n            result = childResult;\n        } else if (!result && childResult) {\n            result = new ExpressionParsingError(\n                '',\n                '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'\n            );\n        } else if (result && childResult && result !== childResult) {\n            result = new ExpressionParsingError(\n                '',\n                'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'\n            );\n        }\n    });\n\n    return result;\n}\n\nexport function findGlobalStateRefs(\n    expression: Expression,\n    results = new Set<string>()\n): Set<string> {\n    if (expression instanceof GlobalState) {\n        results.add(expression.key);\n    }\n\n    expression.eachChild((childExpression) => {\n        findGlobalStateRefs(childExpression, results);\n    });\n    return results;\n}\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        padding: PaddingType,\n        numberArray: NumberArrayType,\n        colorArray: ColorArrayType,\n        projectionDefinition: ProjectionDefinitionType,\n        resolvedImage: ResolvedImageType,\n        variableAnchorOffsetCollection: VariableAnchorOffsetCollectionType\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)) {\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    }\n    switch (spec.type) {\n        case 'color':\n            return Color.parse(spec.default) || null;\n        case 'padding':\n            return Padding.parse(spec.default) || null;\n        case 'numberArray':\n            return NumberArray.parse(spec.default) || null;\n        case 'colorArray':\n            return ColorArray.parse(spec.default) || null;\n        case 'variableAnchorOffsetCollection':\n            return VariableAnchorOffsetCollection.parse(spec.default) || null;\n        case 'projectionDefinition':\n            return ProjectionDefinition.parse(spec.default) || null;\n        default:\n            return spec.default === undefined ? null : spec.default;\n    }\n}\n\nfunction addGlobalState(\n    globals: GlobalProperties,\n    globalState: Record<string, any>\n): GlobalProperties {\n    const {zoom, heatmapDensity, elevation, lineProgress, isSupportedScript, accumulated} =\n        globals ?? {};\n    return {\n        zoom,\n        heatmapDensity,\n        elevation,\n        lineProgress,\n        isSupportedScript,\n        accumulated,\n        globalState\n    };\n}\n","import type {StylePropertySpecification} from '..';\n\nfunction convertLiteral(value) {\n    return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport function convertFunction(parameters: any, propertySpec: StylePropertySpecification) {\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 as any).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<unknown> {\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 ['match', get, Object.keys(propertySpec.values), get, parameters.default];\n    } else {\n        const expression = [\n            propertySpec.type === 'color' ? 'to-color' : propertySpec.type,\n            get,\n            convertLiteral(parameters.default)\n        ];\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':\n            return 'interpolate-hcl';\n        case 'lab':\n            return 'interpolate-lab';\n        default:\n            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(\n                featureFunctionParameters[z],\n                propertySpec,\n                featureFunctionStops[z]\n            );\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(\n                featureFunctionParameters[z],\n                propertySpec,\n                featureFunctionStops[z]\n            );\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        const expression: any = ['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\n            ? expression\n            : [\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\n            ? expression\n            : [\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 = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : ['exponential', base],\n            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        return (propertySpec.expression as any).interpolated ? 'exponential' : 'interval';\n    }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string) {\n    const result: any = ['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","import {createExpression, findGlobalStateRefs} from '../expression';\nimport type {GlobalProperties, Feature} from '../expression';\nimport {ICanonicalTileID} from '../tiles_and_coordinates';\nimport {StylePropertySpecification} from '..';\nimport {ExpressionFilterSpecification, type FilterSpecification} from '../types.g';\n\ntype FilterExpression = (\n    globalProperties: GlobalProperties,\n    feature: Feature,\n    canonical?: ICanonicalTileID\n) => boolean;\n\nexport type FeatureFilter = {\n    filter: FilterExpression;\n    needGeometry: boolean;\n    getGlobalStateRefs: () => Set<string>;\n};\n\ntype MixedFilterDiagnostic = {\n    path: Array<number>;\n    legacyFilter: Array<any>;\n};\n\nexport function isExpressionFilter(filter: any): filter is ExpressionFilterSpecification {\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 (\n                filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]))\n            );\n\n        case '!in':\n        case '!has':\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 'none': {\n            for (const f of filter.slice(1)) {\n                if (typeof f === 'boolean') continue;\n                if (isExpressionFilter(f)) {\n                    return true;\n                }\n            }\n            return false;\n        }\n\n        case 'any':\n        case 'all': {\n            let hasLegacy = false;\n            for (const f of filter.slice(1)) {\n                if (typeof f === 'boolean') continue;\n                if (isExpressionFilter(f)) {\n                    // If any child is definitely an expression, treat the whole filter as an expression\n                    // that will go through extensive validation to surface mixed syntax issues.\n                    return true;\n                }\n                hasLegacy = true;\n            }\n            return !hasLegacy;\n        }\n\n        default:\n            return true;\n    }\n}\n\nfunction getFilterPropertyExpression(property: string): unknown {\n    if (property === '$type') return ['geometry-type'];\n    if (property === '$id') return ['id'];\n    return ['get', property];\n}\n\nfunction getLegacyFilterExpressionSuggestion(filter: Array<any>): unknown {\n    switch (filter[0]) {\n        case '==':\n        case '!=':\n        case '<':\n        case '<=':\n        case '>':\n        case '>=':\n            if (filter.length !== 3 || typeof filter[1] !== 'string') return null;\n            return [filter[0], getFilterPropertyExpression(filter[1]), filter[2]];\n\n        case 'in':\n        case '!in': {\n            if (filter.length < 2 || typeof filter[1] !== 'string') return null;\n            const expression = [\n                'in',\n                getFilterPropertyExpression(filter[1]),\n                ['literal', filter.slice(2)]\n            ];\n            return filter[0] === '!in' ? ['!', expression] : expression;\n        }\n\n        case 'has':\n        case '!has': {\n            if (filter.length !== 2 || typeof filter[1] !== 'string') return null;\n            if (filter[1] === '$type' || filter[1] === '$id') return null;\n            const expression = ['has', filter[1]];\n            return filter[0] === '!has' ? ['!', expression] : expression;\n        }\n\n        default:\n            return null;\n    }\n}\n\nexport function getMixedFilterErrorMessage(filter: Array<any>): string {\n    if (\n        (filter[0] === '<' || filter[0] === '<=' || filter[0] === '>' || filter[0] === '>=') &&\n        filter[1] === '$type'\n    ) {\n        return `\"$type\" cannot be use with operator \"${filter[0]}\"`;\n    }\n\n    const suggestion = getLegacyFilterExpressionSuggestion(filter);\n    if (suggestion) {\n        return `Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(filter)} with ${JSON.stringify(suggestion)}.`;\n    }\n\n    return `Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(filter)} to expression syntax.`;\n}\n\nfunction checkChild(\n    index: number,\n    path: Array<number>,\n    filter: unknown\n): MixedFilterDiagnostic | null {\n    const child = filter[index];\n    if (!Array.isArray(child)) {\n        return null;\n    }\n    if (!isExpressionFilter(child)) {\n        return {path: path.concat(index), legacyFilter: child};\n    }\n    return findMixedLegacyFilter(child, path.concat(index));\n}\n\nexport function findMixedLegacyFilter(\n    filter: unknown,\n    path: Array<number> = []\n): MixedFilterDiagnostic | null {\n    if (!Array.isArray(filter) || filter.length < 1) {\n        return null;\n    }\n\n    switch (filter[0]) {\n        case 'all':\n        case 'any':\n        case 'none':\n            for (let i = 1; i < filter.length; i++) {\n                const diagnostic = checkChild(i, path, filter);\n                if (diagnostic) return diagnostic;\n            }\n            break;\n\n        case '!': {\n            const diagnostic = checkChild(1, path, filter);\n            if (diagnostic) return diagnostic;\n            break;\n        }\n\n        case 'case':\n            for (let i = 1; i < filter.length - 1; i += 2) {\n                const diagnostic = checkChild(i, path, filter);\n                if (diagnostic) return diagnostic;\n            }\n            break;\n    }\n\n    return null;\n}\n\nexport function validateNoMixedExpressionFilter(filter: FilterSpecification) {\n    const diagnostic = findMixedLegacyFilter(filter);\n    if (diagnostic) {\n        throw new Error(getMixedFilterErrorMessage(diagnostic.legacyFilter));\n    }\n}\n\nconst filterSpec = {\n    type: 'boolean',\n    default: false,\n    transition: false,\n    'property-type': 'data-driven',\n    expression: {\n        interpolated: false,\n        parameters: ['zoom', 'feature']\n    }\n};\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 filter MapLibre filter\n * @param [globalState] Global state object to be used for evaluating 'global-state' expressions\n * @returns filter-evaluating function\n */\nexport function featureFilter(\n    filter: FilterSpecification | void,\n    globalState?: Record<string, any>\n): FeatureFilter {\n    if (filter === null || filter === undefined) {\n        return {filter: () => true, needGeometry: false, getGlobalStateRefs: () => new Set()};\n    }\n\n    if (Array.isArray(filter) && filter[0] === 'none' && isExpressionFilter(filter)) {\n        validateNoMixedExpressionFilter(filter);\n        filter = convertFilter(filter as Array<any>) as ExpressionFilterSpecification;\n    } else if (!isExpressionFilter(filter)) {\n        filter = convertFilter(filter) as ExpressionFilterSpecification;\n    } else {\n        validateNoMixedExpressionFilter(filter);\n    }\n\n    const compiled = createExpression(\n        filter,\n        filterSpec as StylePropertySpecification,\n        globalState\n    );\n    if (compiled.result === 'error') {\n        throw new Error(compiled.value.map((err) => `${err.key}: ${err.message}`).join(', '));\n    } else {\n        const needGeometry = geometryNeeded(filter);\n        return {\n            filter: (\n                globalProperties: GlobalProperties,\n                feature: Feature,\n                canonical?: ICanonicalTileID\n            ) => compiled.value.evaluate(globalProperties, feature, {}, canonical),\n            needGeometry,\n            getGlobalStateRefs: () => findGlobalStateRefs(compiled.value.expression)\n        };\n    }\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' || filter[0] === 'distance') 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<any> | null | void): unknown {\n    if (!filter) return true;\n    const op = filter[0];\n    if (filter.length <= 1) return op !== 'any';\n    const converted =\n        op === '=='\n            ? convertComparisonOp(filter[1], filter[2], '==')\n            : op === '!='\n              ? convertNegation(convertComparisonOp(filter[1], filter[2], '=='))\n              : op === '<' || op === '>' || op === '<=' || op === '>='\n                ? convertComparisonOp(filter[1], filter[2], op)\n                : op === 'any'\n                  ? convertDisjunctionOp(filter.slice(1))\n                  : op === 'all'\n                    ? ['all' as unknown].concat(filter.slice(1).map(convertFilter))\n                    : op === 'none'\n                      ? ['all' as unknown].concat(\n                            filter.slice(1).map(convertFilter).map(convertNegation)\n                        )\n                      : op === 'in'\n                        ? convertInOp(filter[1], filter.slice(2))\n                        : op === '!in'\n                          ? convertNegation(convertInOp(filter[1], filter.slice(2)))\n                          : op === 'has'\n                            ? convertHasOp(filter[1])\n                            : op === '!has'\n                              ? convertNegation(convertHasOp(filter[1]))\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<Array<any>>) {\n    return ['any' as unknown].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array<any>) {\n    if (values.length === 0) {\n        return false;\n    }\n    switch (property) {\n        case '$type':\n            return ['filter-type-in', ['literal', values]];\n        case '$id':\n            return ['filter-id-in', ['literal', values]];\n        default:\n            if (values.length > 200 && !values.some((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: unknown) {\n    return ['!', filter];\n}\n","import {isExpressionFilter} from './index';\n\nimport type {\n    ExpressionFilterSpecification,\n    ExpressionInputType,\n    ExpressionSpecification,\n    FilterSpecification,\n    LegacyFilterSpecification\n} from '../types.g';\n\ntype ExpectedTypes = {[_: string]: ExpressionInputType};\n\n/*\n * Convert the given filter to an expression, storing the expected types for\n * any feature properties referenced in expectedTypes.\n *\n * These expected types are needed in order to construct preflight type checks\n * needed for handling 'any' filters. A preflight type check is necessary in\n * order to mimic legacy filters' semantics around expected type mismatches.\n * For example, consider the legacy filter:\n *\n *     [\"any\", [\"all\", [\">\", \"y\", 0], [\">\", \"y\", 0]], [\">\", \"x\", 0]]\n *\n * Naively, we might convert this to the expression:\n *\n *     [\"any\", [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]], [\">\", [\"get\", \"x\"], 0]]\n *\n * But if we tried to evaluate this against, say `{x: 1, y: null, z: 0}`, the\n * [\">\", [\"get\", \"y\"], 0] would cause an evaluation error, leading to the\n * entire filter returning false. Legacy filter semantics, though, ask for\n * [\">\", \"y\", 0] to simply return `false` when `y` is of the wrong type,\n * allowing the subsequent terms of the outer \"any\" expression to be evaluated\n * (resulting, in this case, in a `true` value, because x > 0).\n *\n * We account for this by inserting a preflight type-checking expression before\n * each \"any\" term, allowing us to avoid evaluating the actual converted filter\n * if any type mismatches would cause it to produce an evaluation error:\n *\n *     [\"any\",\n *       [\"case\",\n *         [\"all\", [\"==\", [\"typeof\", [\"get\", \"y\"]], \"number\"], [\"==\", [\"typeof\", [\"get\", \"z\"], \"number]],\n *         [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]],\n *         false\n *       ],\n *       [\"case\",\n *         [\"==\", [\"typeof\", [\"get\", \"x\"], \"number\"]],\n *         [\">\", [\"get\", \"x\"], 0],\n *         false\n *       ]\n *     ]\n *\n * An alternative, possibly more direct approach would be to use type checks\n * in the conversion of each comparison operator, so that the converted version\n * of each individual ==, >=, etc. would mimic the legacy filter semantics. The\n * downside of this approach is that it can lead to many more type checks than\n * would otherwise be necessary: outside the context of an \"any\" expression,\n * bailing out due to a runtime type error (expression semantics) and returning\n * false (legacy filter semantics) are equivalent: they cause the filter to\n * produce a `false` result.\n */\nexport function convertFilter(\n    filter: FilterSpecification,\n    expectedTypes: ExpectedTypes = {}\n): ExpressionFilterSpecification {\n    if (isExpressionFilter(filter)) return filter;\n    if (!filter) return true;\n\n    const legacyFilter = filter as LegacyFilterSpecification;\n    const legacyOp = legacyFilter[0];\n    if (filter.length <= 1) return legacyOp !== 'any';\n\n    switch (legacyOp) {\n        case '==':\n        case '!=':\n        case '<':\n        case '>':\n        case '<=':\n        case '>=': {\n            const [, property, value] = filter;\n            return convertComparisonOp(property as string, value, legacyOp, expectedTypes);\n        }\n        case 'any': {\n            const [, ...conditions] = legacyFilter;\n            const children = conditions.map((f: LegacyFilterSpecification) => {\n                const types = {};\n                const child = convertFilter(f, types);\n                const typechecks = runtimeTypeChecks(types);\n                return typechecks === true\n                    ? child\n                    : (['case', typechecks, child, false] as ExpressionSpecification);\n            });\n            return ['any', ...children];\n        }\n        case 'all': {\n            const [, ...conditions] = legacyFilter;\n            const children = conditions.map((f) => convertFilter(f, expectedTypes));\n            return children.length > 1 ? ['all', ...children] : children[0];\n        }\n        case 'none': {\n            const [, ...conditions] = legacyFilter;\n            return ['!', convertFilter(['any', ...conditions], {})];\n        }\n        case 'in': {\n            const [, property, ...values] = legacyFilter;\n            return convertInOp(property, values);\n        }\n        case '!in': {\n            const [, property, ...values] = legacyFilter;\n            return convertInOp(property, values, true);\n        }\n        case 'has':\n            return convertHasOp(legacyFilter[1]);\n        case '!has':\n            return ['!', convertHasOp(legacyFilter[1])];\n        default:\n            return true;\n    }\n}\n\n// Given a set of feature properties and an expected type for each one,\n// construct an boolean expression that tests whether each property has the\n// right type.\n// E.g.: for {name: 'string', population: 'number'}, return\n// [ 'all',\n//   ['==', ['typeof', ['get', 'name'], 'string']],\n//   ['==', ['typeof', ['get', 'population'], 'number]]\n// ]\nfunction runtimeTypeChecks(expectedTypes: ExpectedTypes): ExpressionFilterSpecification {\n    const conditions = [];\n    for (const property in expectedTypes) {\n        const get = property === '$id' ? ['id'] : ['get', property];\n        conditions.push(['==', ['typeof', get], expectedTypes[property]]);\n    }\n    if (conditions.length === 0) return true;\n    if (conditions.length === 1) return conditions[0];\n    return ['all', ...conditions];\n}\n\nfunction convertComparisonOp(\n    property: string,\n    value: any,\n    op: string,\n    expectedTypes?: ExpectedTypes | null\n): ExpressionFilterSpecification {\n    let get;\n    if (property === '$type') {\n        return [op, ['geometry-type'], value] as ExpressionFilterSpecification;\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = ['get', property];\n    }\n\n    if (expectedTypes && value !== null) {\n        const type = typeof value as any;\n        expectedTypes[property] = type;\n    }\n\n    if (op === '==' && property !== '$id' && value === null) {\n        return [\n            'all',\n            ['has', property], // missing property != null for legacy filters\n            ['==', get, null]\n        ];\n    } else if (op === '!=' && property !== '$id' && value === null) {\n        return [\n            'any',\n            ['!', ['has', property]], // missing property != null for legacy filters\n            ['!=', get, null]\n        ];\n    }\n\n    return [op, get, value] as ExpressionFilterSpecification;\n}\n\nfunction convertInOp(\n    property: string,\n    values: Array<any>,\n    negate = false\n): ExpressionFilterSpecification {\n    if (values.length === 0) return negate;\n\n    let get: ExpressionSpecification;\n    if (property === '$type') {\n        get = ['geometry-type'];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = ['get', property];\n    }\n\n    // Determine if the list of values to be searched is homogenously typed.\n    // If so (and if the type is string or number), then we can use a\n    // [match, input, [...values], true, false] construction rather than a\n    // bunch of `==` tests.\n    let uniformTypes = true;\n    const type = typeof values[0];\n    for (const value of values) {\n        if (typeof value !== type) {\n            uniformTypes = false;\n            break;\n        }\n    }\n\n    if (uniformTypes && (type === 'string' || type === 'number')) {\n        // Match expressions must have unique values.\n        const uniqueValues = values.sort().filter((v, i) => i === 0 || values[i - 1] !== v);\n        return ['match', get, uniqueValues, !negate, negate];\n    }\n\n    if (negate) {\n        return ['all', ...values.map((v) => ['!=', get, v] as ExpressionSpecification)];\n    } else {\n        return ['any', ...values.map((v) => ['==', get, v] as ExpressionSpecification)];\n    }\n}\n\nfunction convertHasOp(property: string): ExpressionFilterSpecification {\n    if (property === '$type') {\n        return true;\n    } else if (property === '$id') {\n        return ['!=', ['id'], null];\n    } else {\n        return ['has', property];\n    }\n}\n","import {eachLayer, eachProperty} from '../visit';\nimport {isExpression} from '../expression';\nimport {convertFunction, convertTokenString} from '../function/convert';\nimport {convertFilter} from '../feature_filter/convert';\n\nimport type {FilterSpecification, LayerSpecification, StyleSpecification} from '../types.g';\n\n/**\n * Migrate the given style object in place to use expressions. Specifically,\n * this will convert (a) \"stop\" functions, and (b) legacy filters to their\n * expression equivalents.\n * @param style The style object to migrate.\n * @returns The migrated style object.\n */\nexport function expressions(style: StyleSpecification) {\n    const converted = [];\n\n    eachLayer(style, (layer: LayerSpecification & {filter?: FilterSpecification}) => {\n        if (layer.filter) {\n            layer.filter = convertFilter(layer.filter);\n        }\n    });\n\n    eachProperty(style, {paint: true, layout: true}, ({path, key, value, reference, set}) => {\n        if (isExpression(value) || key.endsWith('-transition') || reference === null) return;\n        if (typeof value === 'object' && !Array.isArray(value)) {\n            set(convertFunction(value, reference));\n            converted.push(path.join('.'));\n        } else if ((reference as any).tokens && typeof value === 'string') {\n            set(convertTokenString(value));\n        }\n    });\n\n    return style;\n}\n","/**\n * Migrate color style values to supported format.\n *\n * @param colorToMigrate Color value to migrate, could be a string or an expression.\n * @returns Color style value in supported format.\n */\nexport function migrateColors<T>(colorToMigrate: T): T {\n    return JSON.parse(migrateHslColors(JSON.stringify(colorToMigrate)));\n}\n\n/**\n * Created to migrate from colors supported by the former CSS color parsing\n * library `csscolorparser` but not compliant with the CSS Color specification,\n * like `hsl(900, 0.15, 90%)`.\n *\n * @param colorToMigrate Serialized color style value.\n * @returns A serialized color style value in which all non-standard hsl color values\n * have been converted to a format that complies with the CSS Color specification.\n *\n * @example\n * migrateHslColors('\"hsl(900, 0.15, 90%)\"'); // returns '\"hsl(900, 15%, 90%)\"'\n * migrateHslColors('\"hsla(900, .15, .9)\"'); // returns '\"hsl(900, 15%, 90%)\"'\n * migrateHslColors('\"hsl(900, 15%, 90%)\"'); // returns '\"hsl(900, 15%, 90%)\"' - no changes\n */\nfunction migrateHslColors(colorToMigrate: string): string {\n    return colorToMigrate.replace(/\"hsla?\\((.+?)\\)\"/gi, (match, hslArgs) => {\n        const argsMatch = hslArgs.match(/^(.+?)\\s*,\\s*(.+?)\\s*,\\s*(.+?)(?:\\s*,\\s*(.+))?$/i);\n        if (argsMatch) {\n            let [h, s, l, a] = argsMatch.slice(1);\n            [s, l] = [s, l].map((v) => (v.endsWith('%') ? v : `${parseFloat(v) * 100}%`));\n            return `\"hsl${typeof a === 'string' ? 'a' : ''}(${[h, s, l, a].filter(Boolean).join(',')})\"`;\n        }\n        return match;\n    });\n}\n","import {migrateV8} from './migrate/v8';\nimport {expressions} from './migrate/expressions';\nimport {migrateColors} from './migrate/migrate_colors';\nimport {eachProperty} from './visit';\nimport type {StyleSpecification} from './types.g';\n\n/**\n * Migrate a Mapbox/MapLibre GL Style to the latest version.\n *\n * @param style - a MapLibre Style\n * @returns a migrated style\n * @example\n * const fs = require('fs');\n * const migrate = require('@maplibre/maplibre-gl-style-spec').migrate;\n * const style = fs.readFileSync('./style.json', 'utf8');\n * fs.writeFileSync('./style.json', JSON.stringify(migrate(style)));\n */\nexport function migrate(style: StyleSpecification): StyleSpecification {\n    let migrated = false;\n\n    if ((style.version as any) === 7) {\n        style = migrateV8(style);\n        migrated = true;\n    }\n\n    if (style.version === 8) {\n        migrated = !!expressions(style);\n        migrated = true;\n    }\n\n    eachProperty(style, {paint: true, layout: true}, ({value, reference, set}) => {\n        if (reference?.type === 'color') {\n            set(migrateColors(value));\n        }\n    });\n\n    if (!migrated) {\n        throw new Error(`Cannot migrate from ${style.version}`);\n    }\n\n    return style;\n}\n","#!/usr/bin/env node\n\nimport fs from 'fs';\nimport minimist from 'minimist';\nimport {format} from '../src/format';\nimport {migrate} from '../src/migrate';\nconst argv = minimist(process.argv.slice(2));\n\nif (argv.help || argv.h || (!argv._.length && process.stdin.isTTY)) {\n    help();\n} else {\n    console.log(format(migrate(JSON.parse(fs.readFileSync(argv._[0]).toString()))));\n}\n\nfunction help() {\n    console.log('usage:');\n    console.log('  gl-style-migrate style-v7.json > style-v8.json');\n}\n"],"x_google_ignoreList":[0,2,35,46,47],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,SAAS,OAAO,KAAK,MAAM;EAC1B,IAAI,IAAI;EACR,KAAK,MAAM,GAAG,EAAE,CAAC,CAAC,QAAQ,SAAU,KAAK;GACxC,IAAI,EAAE,QAAQ,CAAC;EAChB,CAAC;EAGD,OADU,KAAK,KAAK,SAAS,MACf;CACf;CAEA,SAAS,SAAS,GAAG;EACpB,IAAI,OAAO,MAAM,UAAY,OAAO;EACpC,IAAK,iBAAkB,KAAK,CAAC,GAAK,OAAO;EACzC,OAAQ,6CAA8C,KAAK,CAAC;CAC7D;CAEA,SAAS,qBAAqB,KAAK,KAAK;EACvC,OAAQ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